Technical Project Plan — Mutasi Portal
Companion to roadmap.csv (45 tickets, 332 points, 5 phases) and architecture.md (design) / mutasi/ (working skeleton: SNAP signer + adapters + ledger, 643 lines, 10 assertions passing).
1. Scope & principles
Ship the smallest system that proves three claims: mutation detected in <5 min, webhook delivered, zero duplicate rows — then expand coverage. No Kubernetes, no microservices, no queue zoo until 20k accounts.
Boring stack: Postgres 16 (RLS), Redis, Celery/Temporal, FastAPI, Next.js, Playwright workers, KMS, S3-compatible storage. stdlib where it fits (the SNAP signer is pure stdlib).
2. Workstreams & ownership
| Workstream | Owner | Tickets |
|---|---|---|
| W1 Ingestion & adapters | Backend A | T01–T05, T12, T19, T37 |
| W2 Core ledger & reconciliation | Backend A | T06, T07, T15 |
| W3 API, webhooks, sandbox | Backend B | T10, T11, T18, T24, T34 |
| W4 Dashboard & tenant UI | Frontend | T09, T16, T20, T22, T23, T35 |
| W5 Identity, sessions, RBAC, audit | Backend B | T17, T39, T40, T41, T43, T44, T45 |
| W6 Compliance engineering | Backend A + consultant | T26–T30 |
| W7 Platform (CI/CD, observability, cost) | SRE (0,5) | cross-cutting |
| W8 SEO/landing surface | Frontend + content | plan-marketing.md pages |
Team: 2 backend, 1 frontend, 0,5 designer, 0,5 QA/SRE, plus a compliance consultant (not headcount).
3. Phase plan & gates
| Phase | Weeks | Points | Exit gate (evidence, not opinion) |
|---|---|---|---|
| P0 Prototype | 1–6 | 68 | 3 design-partner accounts live; mutation <5 min; webhook delivered; duplicate replay = 0; demo runs offline |
| P1 MLP | 7–12 | 65 | 15+ bank products; WhatsApp channel; alert rules; RBAC + audit; sandbox env; 20 paying accounts |
| P2 MMP | 13–17 | 97 | billing + points ledger; RLS green; single-session kicks old login <60s; tenant API keys 403 for personal/SB; white-label domain; 50 paying accounts |
| P3 MMR | 18–21 | 42 | pen test no critical/high; PDP pack (consent, DPO, erasure 72h); ISO 27001 Stage 1 booked |
| P4 EVP | 22–30 | 60 | AI anomaly + forecast; MCP server; ERP export; 10k accounts under 5-min SLA; 3 corporate tenants |
Critical path: adapters → ledger → API/webhook → sessions/tenancy → compliance. Anything not on that path is P2+.
4. Sprint plan (2 weeks, 25 pts/sprint)
| Sprint | Focus | Tickets |
|---|---|---|
| S1 | BCA/BRI/BNI/Mandiri adapters + worker | T01–T03 |
| S2 | e-wallet DANA, scheduler, normalise, dedupe | T04–T07 |
| S3 | alerts, dashboard, API v1, webhook → P0 demo | T08–T11 |
| S4 | coverage to 15 products, WhatsApp, rules | T12–T14 |
| S5 | payments verification, exports, RBAC/audit | T15–T17 |
| S6 | sandbox, e-wallet expansion → P1 gate | T18–T19 |
| S7 | billing + points ledger, tenant schema | T20–T21 |
| S8 | white-label, analytics, webhook bus | T22–T24 |
| S9 | single-session + plan middleware + tenant keys | T39–T41 |
| S10 | audit chain, custom roles/SSO, simulator | T25, T43–T45 |
| S11 | PDP controls, ISO gap, pen test | T26–T30 |
| S12 | AI, MCP, mobile, ERP, sharding → P4 | T31–T38 |
Buffer: 15% (≈50 pts) held for adapter breakage — banks change layouts without notice.
5. Ticket conventions
- Every ticket has: ID, epic, phase, points, priority, dependency, acceptance that is executable (a test name or a curl command).
- Definition of Done: code review + unit test + golden fixture + docs line + deployed to staging + acceptance demonstrable.
- Adapter DoD adds: sandbox fixture captured, failure taxonomy handled (401/429/layout), parse-yield metric emitted.
- No ticket closes without evidence in the PR (log line, screenshot, test output).
6. Environments
| Env | Purpose | Data |
|---|---|---|
| local | dev + selftest | mock fixtures (mutasi/mock.py) |
| sandbox | bank sandboxes (BCA/BRI/BJB/BTN) | sandbox credentials only |
| staging | full stack, seeded tenants | anonymised fixtures, never real bank creds |
| production | customer data | Jakarta region, KMS, RLS, audit log immutable |
Secrets: KMS + envelope encryption, per-tenant DEK, no credential in env files or logs, break-glass event on every decrypt, quarterly key rotation drill.
7. CI/CD
pre-commit: ruff + mypy (strict on core), secret scan
CI: unit + golden-fixture tests + tenant-isolation probe (tenant A reads B → must 404) + SNAP signer vectors
CD: staging on merge, production on tag, migrations via expand/contract
Rollback: previous image + forward-only migrations
Tenant-isolation test is a build blocker, not a nice-to-have. So is the "API key rejected for personal/SB plan" test.
8. QA strategy
| Layer | Method |
|---|---|
| SNAP signing | known vectors + roundtrip verify (present: 10 assertions) |
| Adapter parsing | captured sandbox fixtures per bank, replayed nightly |
| Dedupe/idempotency | replay every fixture twice; assert inserted 0 second time |
| Sessions | script: login device A, login device B, assert A revoked <60s |
| Tenancy | probe suite across every read path |
| Webhooks | HMAC verify + replay + DLQ after 5 failures |
| Load | 10k accounts @5 min = 33 fetches/s, 117 concurrent sessions |
| Pen test | external, before P3 gate |
9. Observability & SLOs
| Metric | Target | Alarm |
|---|---|---|
| Detection latency p95 | <5 min | >8 min 15 min |
| Adapter success rate | >99% | <95% for 15 min |
| Parse yield drop | — | >30% drop vs 7-day median |
| Webhook delivery success | >99,5% | DLQ depth >10 |
| Points ledger delta | 0 | any non-zero |
| Credential decrypts | — | any outside scheduled sync |
Dashboards per provider, per tenant. Status page public, 30-day history — the marketing asset.
10. Risk register (technical)
| Risk | Prob | Impact | Mitigation |
|---|---|---|---|
| Bank changes login/layout | high | adapter outage | fixtures + parse-yield alarm + 2-engineer ownership |
| Headless detection / blocking | high | sync failures | residential pools, human pacing, SNAP-first coverage |
| SNAP partner approval delayed | medium | no API mode | route B sponsor; statement upload fallback |
| Cross-tenant leak | low | existential | RLS + CI probe + 4-eyes decrypt |
| Scope creep into payments | medium | licence exposure | keep payment initiation separable, feature-flagged |
| Cost blowup from proxies | medium | margin | per-tenant proxy budget, cache balance calls |
11. Infra cost projection
| Accounts | Workers | DB | Proxy | Cloud/mo |
|---|---|---|---|---|
| 1.000 | 12 | 1 vCPU/2GB | Rp8jt | ~Rp15jt |
| 10.000 | 117 sessions across 3 nodes | 4 vCPU/16GB | Rp45jt | ~Rp70jt |
| 50.000 | sharded by bank | 16 vCPU/64GB + columnar | Rp180jt | ~Rp300jt |
Storage: 10k accounts ≈ 110M rows/yr ≈ 33GB raw (~55GB at 5-yr retention compressed).
12. First 10 working days
- Wire
mutasi/skeleton into the repo as the ingestion package (already runs:selftest,demo). - BCA SNAP sandbox credentials request + BRI partner form (paperwork takes longer than code).
- Capture sandbox fixtures for BCA balance/statement; replace
mock.pyshapes. - Stand up Postgres + RLS + tenant-isolation probe in CI.
- Build the per-account scheduler with failure taxonomy.
- Status page skeleton with synthetic checks (so uptime history starts on day 1, not after launch).