NestJS · PostgreSQL · TypeORM · TypeScript · JWT
E-Commerce Backend
Comprehensive e-commerce backend API with product, order, and customer management, JWT authentication, shopping cart, and role-based access control.
A production-ready e-commerce backend built with NestJS covering the full lifecycle from product catalog to order management, with secure authentication and role-based access control baked in.
Problem
Building an e-commerce backend from scratch involves a lot of boilerplate: auth, cart management, order state machines, admin vs customer roles. This project provides a clean, modular foundation.
Solution
A NestJS application with module-per-domain architecture: Auth, Products, Orders, Cart, Customers, and Categories. JWT authentication with Passport, TypeORM for database access, and class-validator for input validation throughout.
Key Features
- JWT authentication with role-based access (admin / customer)
- Full product CRUD with category management
- Shopping cart with persistence across sessions
- Order lifecycle management (pending → confirmed → shipped → delivered)
- PostgreSQL with TypeORM, database transactions for order processing
- Input validation on all endpoints with class-validator