ADR 0002: Stellar escrow as a consumed library, not a network service; org split into 3 repos
Status: Accepted Date: 2026-09-09
Context
DocForum is being split across a 3-repo GitHub organization (docforum-core, docforum-web, docforum-escrow) partly to make docforum-escrow a credible, independently-evaluable Stellar Wave Program applicant (see PRD-adjacent conversation history / org rationale — a healthcare-domain monolith is a weak Stellar Wave fit; a purely Stellar-native escrow repo is a strong one).
This creates tension with ADR-implicit decision in ARCHITECTURE.md §1: "modular monolith first, not microservices."
Decision
docforum-escrow is published as an installable package (@docforum/escrow-sdk) wrapping the Soroban contract's client calls. docforum-core's payments module imports this package as a library dependency — it does not call docforum-escrow as a running network service. This preserves the "modular monolith" principle for the actual running application (one deployable backend, one DB, one process boundary) while still giving Stellar its own independently-evaluable repo.
docforum-core owns all relational metadata about payments (PaymentIntent, WalletLink) — no PHI ever crosses into docforum-escrow, which has no database and no healthcare domain knowledge at all.
Consequences
docforum-escrowmust version its SDK carefully (semver) sincedocforum-corepins a version rather than always calling "live" code.docforum-core's CI needs a step to bump/test against newdocforum-escrowreleases — not yet built, tracked in ROADMAP.md.docforum-webnever talks todocforum-escrowdirectly; it only ever talks todocforum-core's API, which is the only place wallet/payment status is exposed to the frontend.- Resolved 2026-09-14: confirmed against the actual Drips Wave program docs (docs.drips.network/wave/). Wave is currently Stellar-ecosystem-only (launching January 2026), applied per-repo, and approval runs substantially on an "Applicant Metrics" GitHub-activity scorecard (PRs/issues/reviews over a rolling 3-year window) plus organizer discretion on ecosystem relevance — not a code-review gate.
docforum-coreanddocforum-webhave no Stellar code and are not ecosystem-relevant to a Stellar-only Wave: decision is to not apply either of them. Onlydocforum-escrowwill be submitted, once it has enough real activity (commits/PRs/issues) to be a credible applicant under that scorecard — see its ownROADMAP.mdPhase E1–E4 and the issues tracking that work.