Domains
This directory implements the dual-indexing pattern described in docs/PRD/17-engineering-standards.md Section 17.2:
Documents are canonical in artifact-type folders (
docs/PRD/,docs/TDD/,docs/ADR/,docs/runbooks/). They are also indexed by domain indocs/domains/<domain>/README.md, which aggregates links per domain so a hire onto a domain team has a single curated entry point.
How to use
- Onboarding to a domain team: read the
README.mdfor your domain. It is the curated tour: PRD chapters that touch the domain, TDDs for its features, ADRs that affected it, runbooks for its alerts, code paths, schemas owned, external integrations, on-call. - Adding a doc that touches a domain: update the relevant domain index as part of the same PR that adds the doc.
- Adding a new domain: copy
../standards/domain-index-template.mdto<domain>/README.md, fill it in, and add an entry below.
Domains for Phase 1
12 domains in total: 10 business bounded contexts from docs/PRD/17-engineering-standards.md Section 17.1, plus 2 cross-functional engineering domains (platform, infra) that are owned across the whole engineering org rather than by any single business team.
The platform ↔ infra split is deliberate:
platformowns the engineer-facing capabilities that every business domain consumes — shared TypeScript packages (@astrix/observability,@astrix/config,@astrix/db,@astrix/clients/*), the on-call agent, alert / SLO / runbook content, dev tooling, CI scripts.infraowns the substrate that platform and the business domains run on — AWS Terraform, the homelab K8s cluster, Kafka / Vault / Aurora / Redis / MinIO server administration (vs. the clients the platform domain ships), GitLab self-hosted server + project administration, DNS, certificates, networking.
Rule of thumb: if it ships as a Helm chart, Terraform module, K8s manifest, or cluster admin task, it's infra. If it ships as a TypeScript package, agent, alert rule, dashboard, or runbook, it's platform.
| Domain | Index | Owns |
|---|---|---|
| identity | identity/ | Auth, sessions, MFA, OAuth, RBAC |
| onboarding | onboarding/ | KYC, account creation, OFAC screening |
| accounts | accounts/ | Account state machine, ledger, EOD balance |
| billing | billing/ | Stripe, subscriptions, charges, refunds, coupons |
| payouts | payouts/ | Plaid, payout requests, 90/10 split, 1099 generation |
| trading | trading/ | Broker integration interface, order routing, broker-stream pipeline |
| risk-engine | risk-engine/ | Rule evaluator, breach detection, EOD snapshot |
| audit | audit/ | Hash-chain audit log, S3 Object Lock archive |
| notifications | notifications/ | Email (Resend), in-app, breach alerts, Centrifugo channel publishing |
| admin | admin/ | Admin / support / finance tooling |
| platform | platform/ | Engineer-facing capabilities: @astrix/observability, @astrix/config, @astrix/db, @astrix/clients/vault, on-call agent, alert/SLO/runbook content, CI scripts, dev tooling |
| infra | infra/ | Substrate: AWS Terraform (EKS, Aurora, S3, KMS, IAM/OIDC), homelab K8s admin, Kafka/Strimzi/Vault/Redis/MinIO cluster admin, GitLab self-hosted server + project administration, DNS, certificates |
Authoritative source
These index pages are not the canonical home for any document. They are aggregations. The canonical home is the artifact-type folder (docs/PRD/, docs/TDD/, etc.). If a domain index disagrees with the canonical doc, the canonical doc wins.