Starter Kit is a developer-friendly framework for building decentralized, persistent, and cryptographically secure key-value document stores. Powered by Iroh, it provides robust primitives for blobs (raw data), docs (replicated key-value stores), and authors (identity and permissions), all with a simple API and persistent storage.
- Decentralized Storage: Peer-to-peer, content-addressed storage for documents and blobs.
- Persistent Data: All data is stored on disk; restart your node anytime with your secret key and data path.
- Cryptographic Security: Access and authorship are managed by keypairs; only you can start your node with your secret key.
- Flexible Data Model: Store any data as blobs, organize it in documents, and manage permissions with authors.
- Extensible API: JSON-over-HTTP API for easy integration with your apps.
- Frontend Ready: Comes with a React frontend for quick experimentation.
- Rust (1.70+ recommended)
- Node.js & npm (for the frontend)
git clone https://github.com/dhiway/starter-kit
cd starter-kit
cargo build --release
Run:
cargo run
You’ll see output like:
🔑 Generated new secret key: 9478a79a60ade2312eb50b0cc6f54444e8b81e9f06fa5df0b8d0b8ff5b1f60ab
👉 Please run again with:
cargo run -- --path your-path-of-choice --secret-key 9478a79a60ade2312eb50b0cc6f54444e8b81e9f06fa5df0b8d0b8ff5b1f60ab
Error: "Rerun with --path and --secret-key"
Important:
- Never use a secret key from an example or from someone else.
- Keep your secret key private and secure.
- Anyone with your secret key can control your node and access your data.
You can repeat this step until you get a secret key you like (not usually necessary).
Pick a directory for your data (e.g., iroh-data
) and run:
cargo run -- --path iroh-data --secret-key <your-secret-key>
- The BLAKE3 hash of your secret key is stored in a
secret-key
file inside your data directory. - Security Note: Only someone with your secret key can start your node and access your data.
- Backend API: Runs on http://localhost:4000
- Frontend: The React app auto-starts on http://localhost:3000
- Persistent: All blobs and documents are stored on disk. Restart your node with the same
--path
and--secret-key
to resume where you left off. - Blobs: Store raw bytes, files, or any binary data.
- Docs: Key-value stores (replicas) with optional JSON schema enforcement.
- Authors: Manage multiple identities and permissions for document entries.
The API exposes endpoints for:
- Blobs: Add, get, list, download, export, tag, and delete blobs.
- Docs: Create, list, share, join, drop, and manage documents.
- Entries: Add, get, query, and delete key-value entries (with or without schema).
- Authors: Create, list, set default, and verify authors.
- Policies: Set and get download policies for documents.
See the API Documentation for full details and examples.
- Run backend only:
cargo run -- --path iroh-data --secret-key <your-secret-key>
- Run frontend only:
cd frontend npm install npm start
You can run the test suite using the following commands:
- Run all tests sequentially with logs (recommended for debugging):
cargo test -- --test-threads=1 --nocapture
- Run all tests sequentially (recommended for CI and most use cases):
cargo test -- --test-threads=1
- Run tests from a specific file/module with logs:
Replace
cargo test <docs|blobs|authors> -- --test-threads=1 --nocapture
<docs|blobs|authors>
with the name of the module or test function you want to run. Remove--nocapture
to run without logs.
Contributions are welcome! Fork the repo, create a branch, and submit a pull request.
- Your node is protected by your secret key. The hash of this key is stored in your data directory; without the key, the node cannot be started.
- Each document and entry is cryptographically signed and content-addressed.
- Authors and namespaces are managed by keypairs for fine-grained access control.
TBD
Starter Kit — Build decentralized, persistent, and secure document stores with ease.