This project is powered by
A clean, modular Nest.js prototype built to learn & practice real backend concepts the right way.
This project started as a small practice exercise and turned into a full mini-authentication system.
The goal was to understand and implement:
- Nest.js (modules, services, guards, interceptors, DI)
- Prisma ORM
- PostgreSQL
- Session-based authentication
- Redis session storage
- Rate limiting via Nest's ThrottlerModule
- Logging & caching interceptors
- Multi-session support (per-device login/logout)
…and all of that has been successfully implemented.
Note
This is not meant to be a production app. but rather a learning-focused prototype that demonstrates backend architecture and clean NestJS patterns.
- Signup / Signin / Signout endpoints
- Http-only cookie sessions
- Redis-backed session storage
- Multi-session login support (login from multiple devices)
- Session management routes:
- List active sessions
- Logout specific session
- Logout all sessions
/users/meroute with authentication guard- Per-route rate limiting
- Request logging interceptor
- Simple caching interceptor for
/users/me - Proper module separation (Auth, Users, Sessions, Redis, Prisma…)
- Nest.js (framework)
- TypeScript
- Prisma ORM
- PostgreSQL
- Redis
- PNPM
pnpm install# development
pnpm run start
# watch mode
pnpm run start:dev
# production mode
pnpm run start:prod$ pnpm run test
bash: /usr/bin/test-runner: line 1: tests: author has skill issue and does not write tests (yet)This project is MIT licensed.