Starchan is a Tauri frontend for Graphchan, a decentralized encrypted imageboard backend.
Starchan is a fully distributed p2p chat, forum, and fileshare.
This repository bundles a new web/Tauri frontend with the Graphchan backend. The goal is to keep the backend protocol and REST API open enough that multiple frontends can exist: Starchan is this repo's frontend, Graphchan is the backend, and other clients can talk to the same local API.
The native Rust frontend is and original implementation is at MLTQ/OrbWeaver.
Graphchan is a peer-to-peer discussion system where:
- Threads and posts are signed with local cryptographic identity keys.
- Content propagates between peers through gossip and topic discovery.
- Data is local-first: your node stores its own database and files.
- Conversations are DAG-shaped, so replies can branch instead of forcing one linear thread.
- Frontends are replaceable: anything that can call the REST API can become a Graphchan client.
Graphchan/: Starchan frontend source. This is the React/Vite UI packaged by Tauri.graphchan_backend/: Graphchan backend crate. It owns SQLite storage, identity, P2P networking, files, DMs, topics, blocking, and the REST API.src-tauri/: Tauri shell. It launches the embedded Graphchan backend and loads the Starchan frontend.vendor/: vendored crypto prerelease patches inherited from the backend dependency stack..github/workflows/desktop-build.yml: CI build for macOS and Linux on pushes tomaster.
After a release build, run the executable:
./target/release/graphchan_desktopOn macOS you can also open the app bundle:
open target/release/bundle/macos/Graphchan.appThe app starts a local Graphchan backend in the same process, then the Starchan UI connects to that backend automatically.
Install dependencies:
npm installRun the Tauri app in development mode:
npm run tauri:devBuild only the frontend:
npm run build:frontendBuild the desktop app:
npm run tauri:buildCurrent build outputs:
target/release/graphchan_desktop
target/release/bundle/macos/Graphchan.app
The backend can be run as a standalone REST API server:
cargo run -p graphchan_backend -- serveBy default it listens on http://127.0.0.1:8080, with port fallback if that port is already in use.
For frontend development against a separate backend:
npm run dev:frontendStarchan uses localStorage.gc_api_base or the ?api= query parameter when it is not running inside Tauri. Example:
http://127.0.0.1:5173/graphchan.html?api=http://127.0.0.1:8080
Local release build:
npm run tauri:buildGitHub Actions builds macOS and Linux artifacts on pushes to master and on manual dispatch:
- macOS: uploads
target/release/graphchan_desktopandtarget/release/bundle/macos/Graphchan.app - Linux: uploads
target/release/graphchan_desktop
The CI workflow uses the workspace-level vendored crypto patches in this repo.
Friend codes are how nodes discover and trust each other for direct peer connections. A friend code may be short, containing identity information, or long, containing additional relay/address information useful for NAT traversal.
In Starchan:
- Open
friends. - Use
show my friendcodeto copy your code. - Use
add friendto paste another node's code.
Friend codes are one-way. For bidirectional following, both people should add each other.
A thread is a DAG of posts. A post can reply to one or more parents, which lets a conversation branch without treating every side discussion as derailment. Starchan renders this as graph, tree, timeline, and list views.
Topics are public discovery channels. Following a topic announces your interest and lets your node discover other peers posting about the same topic without making those peers permanent friends.
Files are stored locally and announced through the backend. The frontend uses the backend upload and download endpoints; file availability may depend on whether peers are online and whether the content has already been fetched.
DMs are encrypted by the backend. Starchan lists conversations, shows unread counts from the backend, and sends messages through the Graphchan DM API.
Graphchan exposes a local REST API. Main route groups include:
/health: node health, identity, and network status./threads: list/create/fetch threads, create posts, download announced threads./posts: recent posts, reactions, and post files./filesand/blobs: file and blob access./peers: local identity and followed peers./topics: subscribe/unsubscribe topic discovery./dms: conversations, encrypted messages, unread counts./blocking: peer and IP blocking./settings: local settings.
This API is the boundary that allows Starchan and future clients to share the same backend.
The Graphchan backend has MCP-oriented support for external AI tools and agents. MCP clients can use a Graphchan server process to inspect threads, read posts, send DMs, and work with local node data through the backend API.
Example MCP configuration shape:
{
"mcpServers": {
"graphchan": {
"command": "/absolute/path/to/graphchan_mcp",
"args": []
}
}
}Useful environment variables:
GRAPHCHAN_API_PORT: backend server port, default8080outside Tauri.GRAPHCHAN_API_TOKEN: optional bearer token for the REST API.GRAPHCHAN_CORS_ORIGINS: comma-separated allowed CORS origins.GRAPHCHAN_RELAY_URL: optional relay URL override.GRAPHCHAN_PUBLIC_ADDRS: comma-separated public address hints.GRAPHCHAN_DISABLE_DHT: set to1ortrueto disable DHT discovery.GRAPHCHAN_DISABLE_MDNS: set to1ortrueto disable mDNS discovery.GRAPHCHAN_MAX_UPLOAD_BYTES: backend upload body limit.GRAPHCHAN_RATE_LIMIT_RPS: optional per-client-IP REST API rate limit, in sustained requests per second. Off by default — leave unset (or0) to disable. When set to a positive integer, requests over the limit get429 Too Many Requests.GRAPHCHAN_RATE_LIMIT_BURST: optional token-bucket burst capacity for the rate limiter (defaults toGRAPHCHAN_RATE_LIMIT_RPS). Only takes effect when the rate limit is enabled.
Graphchan is portable by design. The backend derives its storage paths from the executable location and creates local directories for:
- SQLite database
- keys
- uploaded/downloaded files
- blob store
- logs
The Tauri app starts the backend in-process, so moving the built app directory moves the node state with it when the data directories live beside the executable.
Starchan is the current frontend revision in this repository. It is wired to live Graphchan backend data and no longer uses the original mock dataset.