The Ecommerce Delivery API is a Node.js/Express backend built for clothing e-commerce platforms. It handles everything from user registration and authentication through to product catalog management with variants, end-to-end sales order lifecycle tracking, payment proof uploads, and real-time push notifications — all over a single consistent REST interface where every endpoint usesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/ecommerce-delivery/llms.txt
Use this file to discover all available pages before exploring further.
POST.
Explore the API
Quickstart
Clone the repo, configure your environment, and make your first authenticated API call in minutes.
Authentication
Learn how JWT Bearer tokens are issued, passed, and validated across the three middleware levels.
Sale Lifecycle
Understand how a sales order moves from creation through payment confirmation to fulfilment.
Register a User
Full reference for the
POST /api/user/create endpoint, including request fields and response shapes.Key features
User management
Registration with email verification, role-based access control, avatar uploads, and password recovery flows.
Product catalog
Create and manage clothing products with size and colour variants, stored with images on Google Cloud Storage.
Sales order lifecycle
Full order lifecycle from creation through payment proof upload to admin confirmation and delivery tracking.
JWT authentication
Stateless Bearer-token auth with three middleware tiers — required, admin-only, and optional — all signed with a configurable secret.
Push notifications
Real-time FCM push notifications via Firebase Admin SDK keep users informed at every stage of their order.
Email notifications
Transactional emails for account verification and password recovery are sent using Nodemailer.
Tech stack
| Layer | Technology |
|---|---|
| Runtime | Node.js (ES Modules) |
| Framework | Express 4 |
| Database | MongoDB via Mongoose 8 |
| Authentication | JSON Web Tokens (jsonwebtoken) |
| File storage | Google Cloud Storage + Multer + Sharp |
| Push notifications | Firebase Admin SDK |
| Nodemailer | |
| Dev server | Nodemon |
API conventions
- Base path:
/api - HTTP method: Every endpoint uses
POST - Body format:
application/json(ormultipart/form-datafor file-upload endpoints) - Response envelope: All responses return a JSON object with at minimum
msj(message) andstatus(boolean) fields
The four active route groups are
/api/user, /api/sale, /api/product, and /api/notification. Each group maps to its own Express router and controller layer.