You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE identities (
did TEXT PRIMARY KEY,
public_key BLOB NOT NULL,
created_at INTEGER NOT NULL
);
CREATE TABLE content (
cid TEXT PRIMARY KEY,
author_did TEXT NOT NULL,
zone_id TEXT,
payload BLOB NOT NULL,
timestamp INTEGER NOT NULL,
signature BLOB NOT NULL
);
CREATE TABLE zones (
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
creator_did TEXT NOT NULL,
config TEXT NOT NULL
);
4. Network Architecture
4.1 Node Types
Type
Role
Resources
Bootstrap
Entry point
High
Full Node
Network backbone
High
Light Node
End user
Low
Relay Node
NAT traversal
Medium
Archive Node
Historical data
Very High
4.2 Peer Discovery
Bootstrap nodes (hardcoded)
mDNS for local network
DHT (Kademlia)
Peer exchange (PEX)
4.3 Transport Protocols
Protocol
Use Case
libp2p
Default P2P
WebSocket
Browser clients
WebRTC
Direct P2P
Tor
Anonymous
5. Sync Protocol
5.1 Sync Strategy
Initial Sync: Download all zone content
Incremental Sync: Exchange heads, fetch missing
Real-time Sync: Push notifications for new content
POST /identity - Create identity
GET /identity/:did - Get identity
POST /content - Create content
GET /content/:cid - Get content
GET /feed - Get feed
POST /zones - Create zone
POST /zones/:id/join - Join zone
POST /messages - Send message
GET /messages - Get messages