You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A full-stack online bookstore built with React, Node.js/Express, and MySQL. Supports customer shopping, JWT authentication, an admin dashboard, publisher management, and sales reporting.
Tech Stack
Layer
Technology
Frontend
React 18, Vite, React Router v6
Backend
Node.js, Express.js
Database
MySQL (mysql2/promise)
Auth
JWT (jsonwebtoken), bcrypt
Validation
Zod
Dev Tools
Nodemon, dotenv, Swagger
Features
Customer
Search and browse books with filters (category, price, year, publisher)
View book details, manage a shopping cart, and place orders
JWT tokens are issued on login and stored in localStorage. Protected routes require the token in the Authorization: Bearer <token> header. Admin routes are protected on both the frontend (RequireAdmin component) and backend (auth middleware).
Roles
Role
Permissions
CUSTOMER
Browse, cart, checkout, order history, profile
ADMIN
All customer permissions + sales reports, publishers, books
Known Issues
Duplicate logout method in userController.js — second definition overrides the first.
Duplicate getAllPublishers method in publisherController.js — same issue.
JWT tokens remain valid after logout (no server-side invalidation).
Cart requires login — no guest cart support.
About
Alexandria University – Database Systems (Faculty of Engineering). Order processing system for an online bookstore with customer shopping, admin dashboard, sales reports, and publisher inventory management using React, Node.js, and MySQL.