System Online

NestSMETemplateAPI

SMEFoundation Backend API — authentication, users, and health in one deployable service.

NestJS 11 TypeScript 5 Drizzle ORM PostgreSQL Passport-JWT

Get the API running locally in under two minutes.

bash
$git clone <repo-url> && cd nest-sme-api
$cp .env.example .env
#Set JWT_SECRET and DATABASE_URL in .env
$npm install
$npm run db:migrate
$npm run start:dev
#Visit http://localhost:8080/api/docs

Core routes exposed by this service.

POST/api/auth/registerRegister a new user
POST/api/auth/loginLog in, receive HttpOnly cookie
POST/api/auth/refreshRotate refresh token
POST/api/auth/logoutRevoke token, clear cookie
GET/api/auth/meAuthenticated user profile
GET/api/healthService + database health check

Built with modern, production-ready tools.

🟢
Node 20 + TypeScript 5
Strict mode, fully typed
🐦
NestJS 11 on Express
Modular, decorator-driven framework
🗄️
Drizzle ORM + PostgreSQL
Type-safe, lightweight ORM
🔐
Passport-JWT
HttpOnly cookies + rotating refresh
📄
Swagger / OpenAPI 3.0
Committed spec, auto-generated docs
❤️
@nestjs/terminus
Health checks for DB & service