Exam project — Full-stack e-commerce
A REST API and admin dashboard for an online store. Built with Node, Express, Sequelize and MySQL — with JWT authentication, raw SQL search, automatic membership discounts, and full Swagger documentation.
Two apps, one store
The backend serves JSON to anyone — a customer app, Postman, or Swagger. The admin dashboard is a separate Express + EJS app that talks to the backend over HTTP, the same way any other client would.
localhost:3000
Express, Sequelize and MySQL. Handles auth, products, carts, orders and membership logic.
/doclocalhost:3001
Express + EJS + Bootstrap. Admin-only login, talks to the API via axios.
Business logic
Every checkout adds to a customer's lifetime item count. Once they cross a threshold, their membership upgrades and the new discount applies from their next order.
The membership and discount used at checkout are stored on the order
itself — discount and MembershipId — so each
order keeps an accurate record even after the customer's tier changes later.
API at a glance
Every endpoint returns { status, statuscode, data }
— success and error responses follow the same structure throughout.
Architecture
Admin dashboard
Express + EJSREST API
Express + JWTSwagger / Postman
API clientsREST API
Express + JWTDatabase
MySQL + SequelizeTech stack
Runtime
Node.js
Framework
Express
Database
MySQL
ORM
Sequelize
Auth
JWT + bcrypt
Views
EJS
Styling
Bootstrap
Docs
Swagger
Testing
Jest + Supertest
HTTP client
Axios