docs: add client-federation.md and cross-reference with federation.md
The client-side federation model (instanceStore, federated accounts, multi-instance connections, origin-aware routing) was completely undocumented. An agent reading only federation.md would understand S2S relay but have no knowledge of how the client connects to multiple instances, creates federated accounts with real credentials, or routes API/WS calls to the correct instance. New spec covers: instanceStore architecture, federated account creation (username@instance format), Connections UI, auto-connect lifecycle, channelOriginMap routing, WebSocket multiplexing, cross-instance identity resolution, and the relationship between client-side and S2S federation. CLAUDE.md subsystem table updated. Both federation docs cross-reference each other.
This commit is contained in:
@@ -140,7 +140,8 @@ Before modifying any subsystem, read its spec from `docs/systems/`. After making
|
||||
| [database.md](docs/systems/database.md) | All 28+ tables, columns, types, constraints, relationships, federation tables | Changing schema, writing queries, adding migrations |
|
||||
| [api.md](docs/systems/api.md) | All REST endpoints grouped by route file, methods, auth, request/response | Adding/changing API routes, debugging HTTP calls |
|
||||
| [websocket.md](docs/systems/websocket.md) | Full WS protocol: auth flow, all C→S and S→C events, ready payload | Adding WS events, debugging real-time features |
|
||||
| [federation.md](docs/systems/federation.md) | Complete S2S reference: peer handshake, HMAC auth, identity resolution, DM/friend/reaction relay, outbox pipeline, file replication, profile sync, initial sync, background workers, known issues | Any federation work — identity, relay, file replication, peering |
|
||||
| [federation.md](docs/systems/federation.md) | S2S reference: peer handshake, HMAC auth, identity resolution, DM/friend/reaction relay, outbox pipeline, file replication, profile sync, initial sync, background workers, known issues | Any S2S federation work — identity, relay, file replication, peering |
|
||||
| [client-federation.md](docs/systems/client-federation.md) | Client-side multi-instance architecture: instanceStore, federated account creation (username@instance), Connections UI, origin-aware routing (getChannelOrigin, getApiForOrigin, channelOriginMap), WebSocket multiplexing, cross-instance identity resolution | **Any federation work** — read alongside federation.md. Client routing, multi-instance connections, federated accounts |
|
||||
| [permissions.md](docs/systems/permissions.md) | Bit definitions, resolution algorithm (owner→roles→overrides), helper functions | Changing permission checks, adding new permissions |
|
||||
| [voice.md](docs/systems/voice.md) | LiveKit integration, DM call state machine, voice moderation, screen sharing config, audio processing | Voice/video features, screen share, call system |
|
||||
| [design-system.md](docs/systems/design-system.md) | Aether Drift spec: glass materials, surface/input tiers, colors, animations, layout | Any UI/component work, styling changes |
|
||||
|
||||
Reference in New Issue
Block a user