title: API & MM-Cron designs: index owner: MMDEP Design (Claude project), DESIGN-1 / TD-044 status: all nine designs drafted (27 Oct): overall draft 2, phase-1 draft 1, sprint-2 draft 1 with six LLDs; GitLab snapshot (#185) still not in the repository (#191)
API & MM-Cron designs¶
Three components, three levels each. The overall design says what the component is and must stay true; the phase design says what changes in phase 1 (Oct–Dec 2026); the sprint design holds the LLDs behind the agents' queue steps.
| MM-Cron | API (production) | stgapi (staging) | |
|---|---|---|---|
| Overall | mm-cron/overall.md (draft 2) | api/overall.md (draft 2) | stgapi/overall.md (draft 2) |
| Phase 1 (Oct–Dec) | mm-cron/phase-1.md | api/phase-1.md | stgapi/phase-1.md |
| Sprint 2 (1–14 Nov) | mm-cron/sprint-2.md: adapter framework, AMFI jobs | api/sprint-2.md: write security, NAV integrity, ingest routes | stgapi/sprint-2.md: isolation and load |
How to read the drafts¶
- Labels on facts. Each design cites where a fact comes from: owner record (
OR §n, docs/handovers/2026-10-13-api-data-architecture-owner-record.md), previous agent's handover (HO-18 #n, docs/handovers/2026-10-18-previous-api-agent-answers.md), stgapi runbook (RB), relay (relay <date>), data-source register (S1–S12), the original agent's chats (KN, docs/knowledge/api-mmcron-original/ in knowledge PR #150, extracted by MMDEP). UNVERIFIED means MMDEP has no evidence from the code yet; the GitLab snapshot (MMDEP issues #173, #185) and the API agent's preflight confirm or correct these. - Decisions. Technical choices made here are rows TD-046 to TD-067 in docs/registers/technical-decisions.md (V/S/C/D/L). Business questions and approvals are in for-atul/design/.
- C4. The model in architecture/workspace.dsl now has component views for API and MM-Cron (
api-components,mmcron-components). A design change to boundaries, data flows or contracts updates the model in the same PR (ADR-0016).
One picture¶
AMFI / 51 AMCs / NSE / AdvisorKhoj (public)
│ fetch, fingerprint, parse, validate
▼
MM-Cron ──── writes only through write routes (target) ────┐
│ (today: direct SQL to mm_data and moneymarche_www) │
▼ ▼
stgapi :5001 (staging DBs only) ◄─ RC promotion ─ API :5000 (production)
mm_api_staging, mm_nav_staging moneymarche_www, mm_data
▲ ▲
PE, WPDev integration, contract tests websites, webapp, PE, MCRM, collector
Who changes what¶
| Document | Writes | Reviews |
|---|---|---|
| Overall and phase designs | MMDEP Design | Atul reads; the API/MM-Cron agent flags conflicts with the code through an agent:claude issue |
| Sprint LLDs | API/MM-Cron agent for low and medium risk; MMDEP Design for high risk (security, NAV integrity, adapter schema) | MMDEP Design |