- Introduced backend patterns skill with guidelines on API design, database optimization, and server-side best practices. - Added coding standards skill outlining universal coding principles for TypeScript, NestJS, and Node.js development. - Implemented continuous learning skill to automatically extract reusable patterns from Cursor sessions. - Created NestJS best practices skill detailing architecture patterns, dependency injection, error handling, and security measures. - Included various rules and templates for NestJS best practices to ensure production-ready applications.
29 lines
849 B
Plaintext
29 lines
849 B
Plaintext
---
|
|
description: NestJS modular TDD structure with Drizzle and PostgreSQL
|
|
globs: "**/*.{ts,js}"
|
|
alwaysApply: false
|
|
---
|
|
|
|
# NestJS Project Conventions
|
|
|
|
Stack: NestJS + PostgreSQL + Drizzle ORM. Follow `.agents/skills/nestjs-best-practices` and `.agents/skills/project-guidelines-example`.
|
|
|
|
## Modules
|
|
|
|
- One feature folder under `src/modules/`
|
|
- Each feature has `*.module.ts`, `*.controller.ts`, `*.service.ts`, `dto/`
|
|
- Share cross-cutting code via `src/common/` (filters, guards, pipes, interceptors)
|
|
|
|
## Tests
|
|
|
|
- Unit tests colocated as `*.spec.ts`
|
|
- E2E tests in `test/*.e2e-spec.ts` with Supertest
|
|
- Write tests first (RED → GREEN → REFACTOR)
|
|
- Mock Drizzle and external services, not Nest internals
|
|
|
|
## Database
|
|
|
|
- Schema and SQL migrations in `drizzle/`
|
|
- Config in `drizzle.config.ts`
|
|
- Never mutate production schema without a migration
|