This repository contains the backend API for the hunting incident management system. This is a NestJS POC for the service, used as a learning project for myself (@wolf29f) to discover and learn more about NestJS.
The project may or may not stay in NestJS depending on the POC outcome.
- Create a
docker-compose.ymlto start API + Postgres + Redis (+ Mailpit, Otel-collector, Prometheus as optional) - Add configuration handling (
@nestjs/config) - Enable JSON structured logs (nestjs-pino)
- Add
/healthzendpoint for liveness check
- Connect Postgres with Prisma (migrations, minimal seed)
- Enable global DTO validation (
ValidationPipe) - List incidents as GeoJSON (
GET /incidents.geojson) - List incidents as event list (
GET /incidentswith filters/pagination)
- Fetch single incident by id (
GET /incidents/:id) - Create an incident (
POST /incidents) with validation - Add patch mechanism for partial updates (
PATCH /incidents/:id)
- Implement magic link authentication → issue JWT in HttpOnly cookie (6h)
- Restrict incident creation to authenticated users
- Implement simple RBAC (
user,moderator,admin) - Add minimal User CRUD (protected by
adminrole)
- Expose Prometheus metrics (
/metrics) withprom-client - Add OTEL tracing (HTTP + Prisma/Postgres) via otel-collector
- Correlate logs ↔ traces (inject
traceIdinto pino logs)
- Joi validation of config