Build backend APIs, services, and infrastructure. Use for REST/GraphQL APIs, database models, authentication, middleware, background jobs, caching.
/users/:id, not /getUser){ error, message, code }src/
├── routes/ # Route definitions and HTTP layer
├── controllers/ # Request handling, response formatting
├── services/ # Business logic
├── repositories/ # Database access layer
├── models/ # Data models and types
├── middleware/ # Auth, logging, validation
├── jobs/ # Background jobs
└── utils/ # Shared utilities
npm audit)Keep files under 200 lines. Extract:
references/api-design.md — REST/GraphQL patternsreferences/database.md — ORM usage, migrations, queriesreferences/auth.md — Authentication patternsreferences/error-handling.md — Error boundaries and typed errorsreferences/security.md — Security hardening checklist