Next.js · NestJS · MongoDB

Customers CRUD — fully typed

Swagger UI ↗

Frontend

Next.js

  • React framework, App Router
  • Static export here — no Node server, nginx serves it
  • TypeScript end to end

Backend

NestJS

  • Node + TypeScript, modules / controllers / DI
  • ValidationPipe + class-validator → 400
  • Mongoose ODM; duplicate key → 409

Database

MongoDB

  • Document store, JSON-like BSON
  • ObjectId _id (24-hex string)
  • Unique index on email

New customer

optional

Customers
0

_idLast nameFirst nameEmailPhone

No customers

Swagger: /api/nestjs/docs