nest-api features
Generated from templates/nest-api/template.json. With no flags you get every
feature marked On; --all adds the opt-ins.
| Feature | Default | What it adds |
|---|---|---|
prismaPrisma ORM + Postgres | Always | PrismaService, multi-file schema, the .bin/db.ts env-aware wrapper, and the Prisma exception filters. |
configZod-validated config service | Always | CustomConfigService wrapping @nestjs/config; app code never reads process.env directly. |
authbetter-auth (email/password, OAuth, roles) | Always | Global AuthGuard so every route is authenticated by default, @AllowAnonymous to opt out, access-control statements and roles in lib/access.ts. |
cacheRedis cache | On | CacheService on ioredis, plus the key-namespacing helpers. Required by the queue, throttler and realtime layers. Files it owns (3)
|
queueBullMQ background jobs | On | QueueModule.register(), the Bull Board dashboard at /dashboard behind basic auth. Files it owns (1)
|
mailTransactional email | On | MailService enqueuing onto the Files it owns (6)
|
rate-limitTwo-layer rate limiting | On | ThrottlerGuard on a Redis Lua storage for app routes, plus better-auth's own limiter for /auth/* with per-endpoint rules. Files it owns (6)
|
openapiOpenAPI + Scalar reference | Always | Swagger document at /openapi and a Scalar UI at /docs (auth + main API), both behind basic auth. Core rather than optional: @ApiTags/@ApiProperty decorators are pervasive in the controller and entity conventions, so removing @nestjs/swagger would mean annotating hundreds of lines. |
observabilityObservability: OpenTelemetry and health checks | On | OpenTelemetry traces, logs and metrics pushed over OTLP (built for OpenObserve; set OPENOBSERVE_URL/ORG/TOKEN, or any OTEL_* backend), plus Terminus health checks with a Prisma indicator. Off at runtime until connected. Files it owns (6)
|
usersUsers module | On | Admin-style user listing/lookup gated by permissions, plus the authenticated user's own /me resource and avatar upload. Files it owns (3)
|
mediaFile uploads (S3) | On | MediaService and S3Service for public and private uploads, with multipart decorators. Files it owns (2)
|
schedulerCron / interval scheduling | On | @nestjs/schedule wired at the root so modules can declare @Cron and @Interval jobs. |
http-clientOutbound HTTP client | On | @nestjs/axios registered with a default timeout, for calling third-party APIs. |
realtimeSocket.IO realtime layer | Opt-in | An authenticated gateway, Redis-backed presence, a Redis Socket.IO adapter for horizontal scale, and WS auth/permission guards. Opt-in. Files it owns (1)
|
notificationsPersistent user notifications | Opt-in | A Notification model plus dispatch/read endpoints. Pushes each new notification over the realtime layer when that feature is also on, and persists either way. Files it owns (3)
|
feature-flagsGrowthBook feature flags | Opt-in | A session-aware FeatureFlagGuard and FeatureFlagService for gating routes on flags. Files it owns (2)
|
temporalTemporal client | Opt-in | A TemporalService for starting and querying durable workflows (multi-step, long-waiting or crash-resumable work; BullMQ stays for fire-and-forget jobs), plus Temporal's dev server in compose.yml. Pair it with node-worker or py-worker built --with temporal to run the workflows. Connects lazily, so the API runs while Temporal is down. Files it owns (2)
|
graphqlGraphQL endpoint | Opt-in | Code-first GraphQL via Apollo, registered alongside the REST controllers. Resolvers in any feature module are picked up automatically. Files it owns (1)
|
testingVitest unit + e2e suites | On | Two Vitest projects, an AppFactory that boots the real app against real Postgres and Redis, and a test Docker stack. Files it owns (5)
|
dockerDocker Compose + image | On | compose.yml running Postgres and Redis for local dev, a production Dockerfile, and the .bin/dc.ts stack wrapper. Files it owns (4)
|
ciForgejo Actions CI | On | A workflow that spins up the test stack and runs both Vitest projects on pull requests. Files it owns (1)
|
secretsInfisical secret sync | On |
Files it owns (1)
|
openapiis core:@ApiTagsand@ApiPropertyrun through every controller and entity, so removing Swagger would mean rewriting hundreds of lines.mailmakes email verification mandatory: new email and password users can’t sign in until they click the link, so SMTP must work in development too.medianeedsqueue(file deletions are jobs). Uploads to folders not listed as private arepublic-read: the bucket must allow ACLs.notificationsstores notifications either way, and pushes each one to the recipient’s sockets whenrealtimeis also on.realtimeneeds WebSocket upgrades forwarded on/realtimeby your reverse proxy.feature-flagspolls GrowthBook every 60 seconds (hencescheduler).temporaladds a client only; pair it with a worker built--with temporal.testingoff also removes the test Docker stack and.env.test.