Skip to main content

Documentation 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.

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 uses 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

LayerTechnology
RuntimeNode.js (ES Modules)
FrameworkExpress 4
DatabaseMongoDB via Mongoose 8
AuthenticationJSON Web Tokens (jsonwebtoken)
File storageGoogle Cloud Storage + Multer + Sharp
Push notificationsFirebase Admin SDK
EmailNodemailer
Dev serverNodemon

API conventions

  • Base path: /api
  • HTTP method: Every endpoint uses POST
  • Body format: application/json (or multipart/form-data for file-upload endpoints)
  • Response envelope: All responses return a JSON object with at minimum msj (message) and status (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.

Build docs developers (and LLMs) love