{"id":26664418,"url":"https://github.com/kei-k23/nodejs-monolithic-e-commerce-system","last_synced_at":"2026-04-02T02:52:04.366Z","repository":{"id":284300329,"uuid":"953395393","full_name":"Kei-K23/nodejs-monolithic-e-commerce-system","owner":"Kei-K23","description":"A monolithic, self-hosted e-commerce backend service built with Node.js, Express, MongoDB, and Redis. This service provides APIs for user authentication, user management, product management, inventory management, order handling, coupon and discount, order analytics reports and much more.","archived":false,"fork":false,"pushed_at":"2025-03-25T06:52:45.000Z","size":568,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T07:34:13.051Z","etag":null,"topics":["docker","e-commerce","express","mongdb","mongoose","nodejs","self-hosted","stripe","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kei-K23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T09:07:37.000Z","updated_at":"2025-03-25T06:52:48.000Z","dependencies_parsed_at":"2025-03-25T07:34:26.268Z","dependency_job_id":"f33167c0-0fe7-4789-bbec-2c231216cede","html_url":"https://github.com/Kei-K23/nodejs-monolithic-e-commerce-system","commit_stats":null,"previous_names":["kei-k23/nodejs-monolithic-e-commerce-system"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fnodejs-monolithic-e-commerce-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fnodejs-monolithic-e-commerce-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fnodejs-monolithic-e-commerce-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kei-K23%2Fnodejs-monolithic-e-commerce-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kei-K23","download_url":"https://codeload.github.com/Kei-K23/nodejs-monolithic-e-commerce-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245499445,"owners_count":20625369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","e-commerce","express","mongdb","mongoose","nodejs","self-hosted","stripe","typescript"],"created_at":"2025-03-25T16:28:14.195Z","updated_at":"2025-12-30T20:12:34.933Z","avatar_url":"https://github.com/Kei-K23.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node.js Monolithic E-Commerce System\n\nA monolithic e-commerce backend service built with **Node.js**, **Express**, **MongoDB**, and **Redis**. This service provides APIs for user authentication, user management, product management, inventory management, order handling, coupon and discount, order analytics reports and much more.\n\n## 🚀 Features\n\n- **Authentication \u0026 Authorization** (JWT-based)\n- **RBAC** (role-based authentication and authorization)\n- **Product Management** (CRUD operations)\n- **User Management** (CRUD operations)\n- **Inventory Management** (CRUD operations)\n- **Order Processing**\n- **Stripe integration** for order payment checkout\n- **Coupon code and discount** (Product discount with coupon code)\n- **Email message sending** (Order create, Payment success and Shipping payment)\n- **Redis Caching** for improved performance\n- **MongoDB Database** for persistent storage\n- **API ratelimiting** to improve security and performance\n- **Global Error handling middleware** to catch all error\n- **Logging and storing log** for better issues tracing\n- **Mongodb Aggregation pipeline** for analytics reportings\n- **Dockerized** for easy deployment and self-hosting\n\n---\n\n## 🛠️ Tech Stack\n\n- **TypeScript** - Language\n- **Node.js** – Backend runtime\n- **Express.js** – Web framework for APIs\n- **MongoDB** – NoSQL database\n- **Redis** – Caching layer\n- **Docker \u0026 Docker Compose** – Containerization\n- **pnpm** – Fast package manager\n- **Mongoose** – ODM for MongoDB\n- **Nodemailer** – Email transport client\n- **Winston \u0026 Morgan** – Logging\n- **imagekit** – Product image upload\n- **fast-csv** – Download analytics report with .csv format\n\n---\n\n## 📦 Installation\n\n### 1️⃣ Clone the Repository\n\n```sh\ngit clone https://github.com/Kei-K23/nodejs-monolithic-e-commerce-system.git\ncd nodejs-monolithic-e-commerce-system\n```\n\n### 2️⃣ Setup Environment Variables\n\nCreate a `.env` file and configure it:\n\n```bash\nNODE_ENV=development\nPORT=3000\nAPP_URL=http://localhost:3000\nMONGODB_URI=\u003cYOUR_MONGODB_URI\u003e\nJWT_SECRET=\u003cYOUR_JWT_SECRET\u003e\nJWT_EXPIRES_IN=\u003cYOUR_JWT_EXPIRES_IN\u003e\nIMAGE_UPLOAD_URL_ENDPOINT=\u003cYOUR_IMAGEKIT_IMAGE_UPLOAD_URL_ENDPOINT\u003e\nIMAGE_UPLOAD_PRIVATE_KEY=\u003cYOUR_IMAGEKIT_IMAGE_UPLOAD_PRIVATE_KEY\u003e\nIMAGE_UPLOAD_PUBLIC_KEY=\u003cYOUR_IMAGEKIT_IMAGE_UPLOAD_PUBLIC_KEY\u003e\nSTRIPE_SECRET_KEY=\u003cYOUR_STRIPE_SECRET_KEY\u003e\nSTRIPE_WEBHOOK_SECRET=\u003cYOUR_STRIPE_WEBHOOK_SECRET\u003e\nNODEMAILER_EMAIL_USER=\u003cYOUR_NODEMAILER_EMAIL_USER\u003e\nNODEMAILER_EMAIL_PASS=\u003cYOUR_NODEMAILER_EMAIL_PASS\u003e\n```\n\n---\n\n## 🐳 Running with Docker\n\n### **Start the Services**\n\n```sh\ndocker-compose up -d --build\n```\n\n### **Stop the Services**\n\n```sh\ndocker-compose down\n```\n\n---\n\n## 🏗️ Running Locally (Without Docker)\n\n1. Install dependencies\n\n   ```sh\n   pnpm install\n   ```\n\n2. Start MongoDB \u0026 Redis (If not using Docker)\n\n   ```sh\n   mongod --port 27017\n   redis-server\n   ```\n\n3. Start the application\n   ```sh\n   pnpm start\n   ```\n\n---\n\n## 🔥 API Endpoints\n\n| Method | Endpoint                | Description       |\n| ------ | ----------------------- | ----------------- |\n| `POST` | `/api/v1/auth/login`    | User login        |\n| `POST` | `/api/v1/auth/register` | User registration |\n| `GET`  | `/api/v1/products`      | Get all products  |\n| `POST` | `/api/v1/products`      | Add a new product |\n\n_For more details, refer to the Postman API documentation._\n[Nodejs Monolithic E-commerce System.postman_collection.json](/Nodejs%20Monolithic%20E-commerce%20System.postman_collection.json)\n\n---\n\n## 📝 License\n\nThis project is **[MIT Licensed](/LICENSE)**.\n\n---\n\n## 🤝 Contributing\n\n1. **Fork** the repository\n2. **Create** a new branch (`feature/new-feature`)\n3. **Commit** your changes\n4. **Push** to your branch\n5. **Open** a Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-k23%2Fnodejs-monolithic-e-commerce-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkei-k23%2Fnodejs-monolithic-e-commerce-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkei-k23%2Fnodejs-monolithic-e-commerce-system/lists"}