Decentralization Model#
PufferBlow is intentionally built as an instance-first platform:
each instance is its own community server
channels/voice channels remain local to that instance
cross-instance communication is federated through ActivityPub for direct messaging
Instance Boundaries#
Local instance ownership is explicit in the user model:
users are created with an
origin_servervaluesignin checks that
origin_servermatches the running instanceJWT access tokens also embed
origin_serverand are validated against current instance identity
This prevents credential reuse across unrelated instances.
Decentralized Node Sessions#
For node-level delegated auth (separate from user JWT sessions), the server exposes:
POST /api/v1/auth/decentralized/challengePOST /api/v1/auth/decentralized/verifyPOST /api/v1/auth/decentralized/introspectPOST /api/v1/auth/decentralized/revoke
These map to decentralized_auth_challenges and
decentralized_node_sessions tables.
ActivityPub Federation#
Current ActivityPub capabilities target identity and DMs:
WebFinger:
/.well-known/webfingeractor document:
/ap/users/{user_id}outbox:
/ap/users/{user_id}/outboxinboxes:
/ap/users/{user_id}/inboxand/ap/inboxfollow flow:
POST /api/v1/federation/followdirect messaging bridge: -
POST /api/v1/dms/send-GET /api/v1/dms/messages
Local users are represented as ActivityPub actors. Remote actors are cached in the database and can be mapped to local shadow users for consistent DM history.
Cross-Instance DM Behavior#
When sending a DM:
Message is persisted locally.
If peer is local, delivery happens through internal websocket fanout.
If peer is remote, the server emits ActivityPub
Createactivity with aNoteobject and delivers it to remote inbox/shared inbox.Incoming remote
Create(Note)activities are persisted and pushed to local recipients in real time.
Current Scope and Direction#
Implemented federation scope:
remote identity resolution
follows
cross-instance direct messages
Channels, voice state, and server administration are still local-instance responsibilities by design.