The Ecommerce API is a RESTful backend service for managing an online shirt store. Built with Node.js, Express, and MongoDB, it handles everything from user registration and authentication to product catalog management and shopping cart operations — including multi-angle product image processing via Google Cloud Storage.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/Ecommerce/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Get your local server running and make your first API call in minutes.
Configuration
Set up environment variables for MongoDB, JWT, email, and Google Cloud.
Authentication
Learn how JWT tokens and Google OAuth protect API endpoints.
API Reference
Explore every endpoint across Users, Products, and Shopping Cart.
What’s Included
User Management
Registration, email verification, login, password recovery, and role-based access control.
Product Catalog
Full CRUD for shirt products with multi-angle image upload, size variants, discounts, and pagination.
Shopping Cart
Add products, manage quantities, track stock, and view purchase and sales history.
Get Started
Configure environment
Create a
.env file with your MongoDB URI, JWT secret, email credentials, and Google Cloud keys. See Configuration for all required variables.Tech Stack
| Layer | Technology |
|---|---|
| Runtime | Node.js with Babel (ESM) |
| Framework | Express 4 |
| Database | MongoDB via Mongoose 6 |
| Auth | JSON Web Tokens + Passport.js (Google OAuth 2.0) |
| Image Processing | Sharp — resizes to 4 sizes, converts to WebP |
| Image Storage | Google Cloud Storage |
| Nodemailer | |
| API Docs | Swagger UI at /api-docs |
All endpoints use
POST HTTP method. Include Content-Type: application/json in request headers for JSON bodies. For protected routes, also include token-access: <your-jwt-token>.