Skip to content

Write docs/ARCHITECTURE.md describing the routes -> services -> repositories layeringΒ #88

Description

@Jagadeeshftw

πŸ“Œ 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

  • docs/ARCHITECTURE.md exists and covers the layering with a concrete example flow.
  • In-memory-state caveat is explicit.
  • Linked from the README.

πŸ”’ Security notes

Documentation-only; no runtime impact.

πŸ“‹ Guidelines

  • Minimum 95% test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox open-source programMaybe RewardedGrantFox: potentially rewarded contributionOfficial Campaign | FWC26GrantFox official campaign issuebackendBackend service workenhancementNew feature or improvement

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions