# NestJS Conventions

- Canonical framework structure standard: `ai/standards/nest.md`.
- Canonical framework references: `ai/references/backend-frameworks/` and `ai/references/framework-reference-policy.md`.
- Keep backend behavior organized around injectable services and GraphQL resolvers.
- Keep feature logic in focused modules, services, resolvers, types, and inputs; do not create giant root/app files or shared dumping grounds.
- Use NestJS GraphQL code-first decorators for types, inputs, queries, and mutations.
- Keep `AppModule` wiring explicit and minimal.
- Do not bypass Nest dependency injection.
- Use `PrismaService` for database access rather than constructing Prisma clients in feature services.
- Prefer focused resolver/service tests for backend behavior.
- Keep REST smoke endpoints simple unless a chunk explicitly expands them.
- Do not add auth, sockets, background jobs, or infrastructure unless explicitly requested.
- Do not modify Prisma models unless the chunk explicitly asks for schema work.
