Repository navigation
docs: add group_treasury API reference, presence/heartbeat, E2EE key lifecycle, and database schema docs - #615
Merged
Conversation
Document every public function in group_treasury/src/lib.rs with full signatures, auth requirements, and panic conditions, plus a worked propose_withdraw -> approve_withdraw x N multisig example end-to-end. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Document the Redis presence key structure, the 30s/90s heartbeat timing contract, multi-device aggregation, and the debounced offline-broadcast behavior in services/presence.ts and services/heartbeat.ts, including verified caveats around the presence hash's lack of its own TTL. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Document the backend's role in device identity, prekey upload/consumption, key-bundle fetch, and revocation as one coherent lifecycle, including the two distinct device-registration paths (auth/verify vs. devices/link) and the verified gap that deviceKeyHistory is never written despite having a read route. States explicitly what the server can and cannot see. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Document every table, column, index, check constraint, and FK relation in db/schema.ts, with a mermaid ER diagram and a dedicated section on where Drizzle's relations() blocks diverge from actual DB constraints, plus verified schema gaps (unindexed conversation_members, unused content_type enum, non-unique files.sha256, FK-less audit_logs actor/subject columns). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four verified reference documents covering previously undocumented
surfaces of the contracts and backend codebases:
contracts/docs/api-group-treasury.md — full function-by-function API
reference for the
group_treasurySoroban contract (initialize,membership, deposit/withdraw, and the propose/approve/reject multisig
voting flow), including a worked end-to-end multisig example and an
explicit callout of the known off-by-one in
list_proposals/get_pending_proposals.apps/backend/docs/concepts-presence-heartbeat.md — the Redis presence
key structure, the 30s/90s heartbeat timing contract, multi-device
aggregation, and the debounced offline-broadcast behavior in
services/presence.tsandservices/heartbeat.ts, including a verifiedcaveat that the per-user presence hash has no TTL of its own.
apps/backend/docs/concepts-e2ee-key-management.md — the backend's role
in the E2EE key lifecycle end-to-end: the two distinct device-registration
paths (
auth/verifyvs.devices/link), prekey upload/consumption,key-bundle fetch, revocation, and GC, with an explicit "what the server
can and cannot see" statement and a verified finding that
device_key_historyis read but never written anywhere in the codebase.apps/backend/docs/contracts-database-schema.md — every table, column,
index, check constraint, and FK relation in
db/schema.ts, with a mermaidER diagram and a dedicated section distinguishing Drizzle's
relations()query helpers from actual DB constraints, plus several verified schema
gaps (unindexed
conversation_members, unusedcontent_typeenum,non-unique
files.sha256, FK-lessaudit_logsactor/subject columns).All four docs are cross-linked to each other and to the existing docs they
build on, and are indexed in
docs/README.mdper the repo's documentationmaintenance convention.
Closes #441
Closes #445
Closes #447
Closes #465