feat(server): add swagger setup for public api documentation

Introduces Swagger and OpenAPI documentation generation for the
backend API. Configures bearer authentication globally while
allowing explicit bypasses for public endpoints. Exports nested
DTO classes across several modules so the NestJS Swagger plugin
can correctly reflect their schema definitions.

Closes #399
This commit is contained in:
neon
2026-06-29 01:52:30 +00:00
parent 246389b050
commit 2065af41f9
31 changed files with 352 additions and 257 deletions
+4
View File
@@ -5,6 +5,10 @@ DATABASE_URL=postgres://bookorbit:bookorbit@localhost:5432/bookorbit
PORT=3000
NODE_ENV=development
# API docs (optional)
# Set to true to serve Swagger UI at /api/docs and OpenAPI JSON at /api/docs-json.
# SWAGGER_ENABLED=false
# Auth
JWT_SECRET=change-me-in-production
JWT_EXPIRES_IN=15m