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
+13
View File
@@ -10,6 +10,19 @@ Server only: `pnpm start:dev` (from this directory).
The server loads environment variables from `.env` in this directory. See `.env.example` for all available options.
## API docs
Generated OpenAPI docs are disabled by default. Enable them with `SWAGGER_ENABLED=true`:
```bash
SWAGGER_ENABLED=true pnpm start:dev
```
Then open:
- Swagger UI: http://localhost:3000/api/docs
- OpenAPI JSON: http://localhost:3000/api/docs-json
## Module structure
Each feature is a self-contained NestJS module under `src/modules/`: