Phases 6-7

This commit is contained in:
Aerilyn Weber 2026-05-14 14:47:23 +09:00
parent 76a516a417
commit 029940b079
111 changed files with 17247 additions and 447 deletions

View file

@ -97,6 +97,19 @@ Separate each group with a blank line.
| React hook | camelCase | `useProducts`, `usePantryItems` |
| CSS class (Tailwind) | kebab-case | via Tailwind utilities |
## Implementation Workflow (Vertical Slice)
Every feature or phase implementation must follow this order to ensure consistency and type safety across the monorepo:
1. **Shared Layer (`packages/shared`)**: Define types, enums, and Zod schemas. Add unit tests.
2. **Database Layer (`packages/api`)**: Create Mongoose schema and Repository. Use `.lean().exec()` on all reads. Add integration tests.
3. **Service Layer (`packages/api`)**: Implement business logic using Awilix DI. Add unit tests.
4. **Route Layer (`packages/api`)**: Create Fastify route plugin. Add route tests.
5. **Web API Client (`packages/web`)**: Implement frontend service. Add unit tests.
6. **Web UI (`packages/web`)**: Create Next.js pages/components (Server Components by default). Add component tests.
**Mandatory Verification**: Every task must end with `npm run build`, `npm run test:cov`, and `npm run lint` all passing with the defined coverage thresholds.
## Code Organization Rules
### API (NestJS)