https://github.com/pubky/pubky-core
An open protocol for per-public-key backends for censorship resistant web applications.
https://github.com/pubky/pubky-core
client-server cloud pkarr publickey-authentication web
Last synced: 7 months ago
JSON representation
An open protocol for per-public-key backends for censorship resistant web applications.
- Host: GitHub
- URL: https://github.com/pubky/pubky-core
- Owner: pubky
- License: mit
- Created: 2023-12-07T15:23:01.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-14T12:30:06.000Z (about 1 year ago)
- Last Synced: 2024-11-14T13:24:30.580Z (about 1 year ago)
- Topics: client-server, cloud, pkarr, publickey-authentication, web
- Language: Rust
- Homepage: https://pubky.github.io/pubky-core/
- Size: 3.35 MB
- Stars: 28
- Watchers: 4
- Forks: 7
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pubky - pubky-core - core.svg?style=social) - An open protocol for per-public-key backends for censorship resistant web applications (Uncategorized / Uncategorized)
README

An open protocol for per-public-key backends for censorship resistant web applications.
[](https://github.com/pubky/pubky-core/releases/latest/)
[](https://crates.io/crates/pubky)
[](https://t.me/pubkycore)
[](https://github.com/pubky/pubky-core/blob/main/LICENSE)
> The Web, long centralized, must decentralize; Long decentralized, must centralize.
## Overview
Pubky-core combines a [censorship resistant public-key based alternative to DNS](https://pkarr.org) with conventional, tried and tested web technologies, to keep users in control of their identities and data, while enabling developers to build software with as much availability as web apps, without the costs of managing a central database.
## Features
- Public key based authentication.
- Public key based 3rd party authorization.
- Key-value store through PUT/GET/DELETE HTTP API + pagination.
## Getting started
This repository contains a [Homeserver](./pubky-homeserver), and a [Client](./pubky-client) (both Rust and JS wasm bindings).
You can a run a local homeserver using `cargo run` with more instructions in the README.
Check the [Examples](./examples) directory for small feature-focesed examples of how to use the Pubky client.
### JavaScript
If you prefer to use JavaScript in NodeJs/Browser or any runtime with Wasm support, you can either install from npm [`@synonymdev/pubky`](https://www.npmjs.com/package/@synonymdev/pubky)
or build the bindings yourself:
```bash
cd pubky-client/pkg
npm i
npm run build
```
#### Testing
There are unit tests for the JavaScript bindings in both NodeJs and headless web browser, but first you need to run a local temporary Homeserver
```bash
npm run testnet
```
Then in a different terminal window:
```bash
npm test
```
### Docker
An alternative way to start tinkering with Pubky is to build an isolated container and run it locally. Here is an
example command how to build an image:
```bash
docker build --build-arg TARGETARCH=x86_64 -t pubky:core .
```
A command for running it in an isolated environment with log output:
```bash
docker run -it pubky:core
```
Additional optional arguments can be used to run it in the background, but the most important is `--network=host`, which allows the container to access the network and provides an admin endpoint accessible from the host machine. Please refer to the Docker documentation for more detailed options.
## Links
- [Contributors Guide](./CONTRIBUTORS.md)