Appearance
API Engineering Rule Catalog
Use this index to load rules by scope. A technology being reusable across languages does not make it a universal API requirement. Statuses and exceptions remain defined by each linked decision.
Generic API Guidance
These rules define API responsibilities and public contracts without requiring a particular language or framework.
Portable Sections in Mixed References
These rules contain contracts or principles that transfer across stacks. Their NestJS examples, libraries, and runtime mechanisms remain implementation- specific; consult each topic index for the boundary.
- REST resource and response views
- OpenAPI contracts
- API-owned aggregation
- Cross-resource access
- Pagination contract
- Testing quality principles
- Scheduling windows and job identity/failure principles
Shared Technology: PostgreSQL
PostgreSQL is the default relational database for NestJS APIs. Another database requires a documented exception. The schema rules are reusable across languages; their Prisma examples illustrate the current TypeScript implementation and do not prescribe the ORM.
NestJS / TypeScript Implementation
Load these references only for projects using the corresponding stack. Prisma is the selected TypeScript ORM here; it is not an API-wide or PostgreSQL-wide requirement.
NestJS
- Application structure
- Runtime and process boundaries
- NestJS API design implementations, except the generic business-oriented rule above
- NestJS-specific error translation and service logging from observability rules
- Pagination
- Scheduled work
- Testing strategy
- Reactive programming with RxJS
TypeScript / Prisma
Platform and Project-Specific Guidance
Apply platform guidance only when the target project runs on the named platform. Project policies are recommended defaults that a project may tune.
- Kubernetes: large-task worker capacity
- Quality policy: 80% statement-coverage gate (recommended default)
Adding Another Implementation
For another language or framework, keep the generic API rules and any selected technology rules, then add a separate implementation profile. For example, a future Python profile may define SQLAlchemy usage without duplicating the business API or PostgreSQL guidance.