Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/module-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Module layout roadmap

`src/index.ts` currently hosts routing, middleware, stores, and handlers in
one file (issue #13). The intended split:

| Module | Responsibility |
|--------|----------------|
| `src/routers/` | Express route mounts (`pairs`, `webhooks`, `admin`) |
| `src/middleware/` | CORS, rate limit, security headers, pause guard |
| `src/stores.ts` | In-memory registries (already extracted) |
| `src/validation/` | Shared request validators |

New endpoints should prefer small router modules over growing `index.ts`.
See `docs/middleware-order.md` and `docs/architecture.md` for current flow.