Files
mercadodevida/work/artifacts/F-001/architect.md
rikrdo 1d4eebca54 feat(F-001): scaffold modular monolith skeleton with boundary checker
- TypeScript + Fastify skeleton under project/ (src/modules, shared, infrastructure, app)
- scripts/check-module-boundaries.mjs enforcing module public-API rules (tested with fixtures)
- GET /health endpoint, error envelope without stack leakage
- specs/F-001-scaffold (SPEC/DESIGN/TASKS/TESTS), spec/tech.md dependency justification
- 30-ticket MercadoDeVida roadmap in backlog/features.json, spec/roadmap.md
- All gates approved: reviewer, security, qa; verify.sh green
2026-08-14 21:46:54 +02:00

32 lines
1.5 KiB
Markdown

# Architect — F-001 Scaffold modular monolith skeleton
done -> work/artifacts/F-001/architect.md
## Decision summary
- Backend skeleton: Node 22 + TypeScript strict + Fastify 5, ESM, tsc build. No framework magic, no aliases (relative imports only) so runtime resolution stays trivial.
- Composition root: `src/app/build-app.ts` is the only place that wires modules onto the HTTP server.
- Boundary enforcement: explicit script `scripts/check-module-boundaries.mjs` wired into `lint:boundaries`, tested with fixtures. ESLint additionally blocks deep `@module` style imports is NOT needed because we use no aliases; the script is the single source of truth.
- Spec-first artifacts at `specs/F-001-scaffold/` (SPEC, DESIGN, TASKS, TESTS).
## Expected blast radius
```text
EXPECTED BLAST RADIUS
Modules modified: none (greenfield; new project/ skeleton only)
Modules indirectly affected: none
Database changes: none
API changes: adds GET /health
Events added/changed: none
Risk level: low
```
## Stack justification (boring choices)
- Fastify: maintained, typed, small, no magic.
- Vitest: TS-native, same mental model as the test pyramid required by design_prompt.
- ESLint flat config + Prettier: standard.
- No ORM, no Redis client, no config framework yet — each arrives with the ticket that needs it.
## Handoff to implementer
Follow `specs/F-001-scaffold/TASKS.md` in order. Definition of done for build stage: all five commands green and evidence written to `work/artifacts/F-001/implementer.md`.