Backend Stack
NestJS, Express, and API technologies
Backend Stack
Required Versions
| Technology | Version | Notes |
|---|---|---|
| Node.js | 20.x LTS | Active LTS (20.18.0+) |
| TypeScript | 5.7.x | Current stable |
| NestJS | 10.x | Latest stable |
| Express | 4.x | NOT 5.x (5.x is beta) |
| Prisma | 5.x | NOT 6.x (6.x too new) |
| PostgreSQL | 17.x | Via Google Cloud SQL |
| BullMQ | 5.x | Background jobs |
| Redis | 7.x | NOT 8.x (8.x too new) |
Architecture
- Framework: NestJS with Express adapter (not Fastify)
- Pattern: Controllers → Services → Repositories
- API: REST only (no GraphQL)
- ORM: Prisma with type-safe queries
- Auth: Auth.js (NextAuth) + custom RBAC
When to Use BullMQ
| Use BullMQ | Don't Use BullMQ |
|---|---|
| Async work that can be retried (emails) | Synchronous request-response |
| Long-running operations (> 5 seconds) | Service-to-service calls (use REST) |
| Scheduled/delayed tasks | Quick operations (< 1 second) |
| Work that shouldn't block HTTP | Operations needing immediate results |
Key Rules
- No Fastify - Express is fast enough, better ecosystem
- No Express 5.x - Still beta, not production-ready
- No EventEmitter - Use BullMQ for background work
- No Beta/RC versions - Wait for stable releases
- Exact versions - Don't upgrade major versions without approval
Specifics to be defined during implementation