This is a RESTful API for an e-commerce platform built with Node.js, Express, MongoDB, and JWT authentication. It allows users to register, log in, view products, manage carts, and make payments via Paystack. Admins can manage products and update order statuses.
🔍 Swagger API Docs:
Visit the link above and append/api-docsto access the full API documentation:
You can test endpoints directly in the browser, including protected routes (with JWT token support).
- Register new users
- Login & receive JWT token
- Protected routes for authenticated users
- View all products
- View a product by ID
- Admin: create, update, delete products
- Add items to cart
- Remove items
- View current cart
- Initialize secure payment
- Verify payment and create order
- Only verified payments create orders
- Users: view their own orders
- Admin: update order status to
processing,shipped,delivered
- Auto-generated API docs via Swagger UI
- Try routes in-browser
- Login via JWT (Authorize button)
- Node.js + Express
- MongoDB + Mongoose
- JWT Authentication
- Paystack API (for payments)
- Swagger (API documentation)