π Description
The codebase follows a clear layering (src/routes -> src/services -> src/repositories -> src/models) with all state currently in-memory, but there's no document explaining this for new contributors β they have to infer it from file structure and the README's endpoint list alone.
π§© Requirements and context
- Document the layering with one example flow end-to-end (e.g.
POST /api/v1/settlements through settlementRouter -> SettlementService -> SettlementRepository).
- Call out that state is in-memory and per-process today (per the README's idempotency/rate-limit notes), and what that implies for horizontal scaling/restarts.
- Note where cross-cutting middleware (
auditLog, idempotency, rateLimiter) sits in the request pipeline.
π οΈ Suggested execution
- Add
docs/ARCHITECTURE.md at the repo root.
- Link it from the README.
- No code changes required; keep diagrams as simple ASCII/mermaid if used.
β
Acceptance criteria
π Security notes
Documentation-only; no runtime impact.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
The codebase follows a clear layering (
src/routes->src/services->src/repositories->src/models) with all state currently in-memory, but there's no document explaining this for new contributors β they have to infer it from file structure and the README's endpoint list alone.π§© Requirements and context
POST /api/v1/settlementsthroughsettlementRouter->SettlementService->SettlementRepository).auditLog,idempotency,rateLimiter) sits in the request pipeline.π οΈ Suggested execution
docs/ARCHITECTURE.mdat the repo root.β Acceptance criteria
docs/ARCHITECTURE.mdexists and covers the layering with a concrete example flow.π Security notes
Documentation-only; no runtime impact.
π Guidelines