{"id":18344095,"url":"https://github.com/alin00r/node.js-full-e-commerce-restful-api-with-payment","last_synced_at":"2025-04-09T22:24:07.032Z","repository":{"id":235834283,"uuid":"776296956","full_name":"alin00r/Node.js-Full-E-Commerce-RESTFul-Api-with-Payment","owner":"alin00r","description":"Node.js-Full-E-Commerce-Restful-App-with- Cash and Online Payment","archived":false,"fork":false,"pushed_at":"2024-04-24T14:56:56.000Z","size":2224,"stargazers_count":2,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T14:16:25.951Z","etag":null,"topics":["bcryptjs","crypto","dotenv","express","express-async-handler","express-mongo-sanitize","express-rate-limit","javascript","jsonwebtoken","multer","nodejs","nodemailer","sharp","stripe"],"latest_commit_sha":null,"homepage":"https://e-shtery-app.onrender.com/","language":"JavaScript","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/alin00r.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}},"created_at":"2024-03-23T05:34:02.000Z","updated_at":"2024-12-28T03:53:21.000Z","dependencies_parsed_at":"2024-04-24T18:03:17.197Z","dependency_job_id":"9c641854-c220-4244-9aa8-fad8dae92683","html_url":"https://github.com/alin00r/Node.js-Full-E-Commerce-RESTFul-Api-with-Payment","commit_stats":null,"previous_names":["alin00r/node.js-full-e-commerce-restful-api-with-payment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alin00r%2FNode.js-Full-E-Commerce-RESTFul-Api-with-Payment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alin00r%2FNode.js-Full-E-Commerce-RESTFul-Api-with-Payment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alin00r%2FNode.js-Full-E-Commerce-RESTFul-Api-with-Payment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alin00r%2FNode.js-Full-E-Commerce-RESTFul-Api-with-Payment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alin00r","download_url":"https://codeload.github.com/alin00r/Node.js-Full-E-Commerce-RESTFul-Api-with-Payment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248121055,"owners_count":21051069,"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":["bcryptjs","crypto","dotenv","express","express-async-handler","express-mongo-sanitize","express-rate-limit","javascript","jsonwebtoken","multer","nodejs","nodemailer","sharp","stripe"],"created_at":"2024-11-05T21:04:49.548Z","updated_at":"2025-04-09T22:24:07.008Z","avatar_url":"https://github.com/alin00r.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# E-shtery-app\r\n\r\n###\r\n\r\nNode.js-Full-E-Commerce-RESTFul-API-with- Cash and Online Payment\r\n\r\n## Technologies\r\n\r\n\u003cdiv\u003e\r\n    \r\n  ![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge\u0026logo=javascript\u0026logoColor=%23F7DF1E) ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white) ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge\u0026logo=express\u0026logoColor=%2361DAFB) ![JWT](https://img.shields.io/badge/JWT-black?style=for-the-badge\u0026logo=JSON%20web%20tokens) ![Nodemon](https://img.shields.io/badge/NODEMON-%23323330.svg?style=for-the-badge\u0026logo=nodemon\u0026logoColor=%BBDEAD) ![NPM](https://img.shields.io/badge/NPM-%23CB3837.svg?style=for-the-badge\u0026logo=npm\u0026logoColor=white) ![MONGODB](https://img.shields.io/badge/mongodb-6DA55F?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white) ![MONGOOSE](https://img.shields.io/badge/MONGOOSE-ff0000?style=for-the-badge\u0026logo=MONGOOSE\u0026logoColor=white) \r\n    ![stripe](https://img.shields.io/badge/stripe-635BFF?style=for-the-badge\u0026logo=stripe\u0026logoColor=white)\r\n  ![dotenv](https://img.shields.io/badge/dotenv-3982CE?style=for-the-badge\u0026logo=dotenv\u0026logoColor=white1)\r\n  ![swagger](https://img.shields.io/badge/swagger-00FF00?style=for-the-badge\u0026logo=swagger\u0026logoColor=white)\r\n  ![eslint](https://img.shields.io/badge/eslint-8A118C?style=for-the-badge\u0026logo=eslint\u0026logoColor=white)\r\n  ![prettier](https://img.shields.io/badge/prettier-8A118C?style=for-the-badge\u0026logo=prettier\u0026logoColor=white)\r\n  \r\n  \u003cbr\u003e\r\n  \u003ccenter\u003e\r\n  \r\n  \u003cimg src=\"https://camo.githubusercontent.com/2dbe8dc3b8fa5ac59437c9d8c94323ad3f0052d3ff5ac0e9c258ceb5daba76f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f31362e332e312d646f74656e762d726564\"\u003e\r\n\r\n  \u003cimg src=\"https://camo.githubusercontent.com/a3ff2a5d02a913cdf673537dea66873aecaf58cb8c770f9225e2d2959712ed6b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f312e342e352d2d6c74732e312d6d756c7465722d726564\"\u003e\r\n  \u003cimg src=\"https://camo.githubusercontent.com/e098806c441efac8d7c44cbb0cf5000f113dfc54db28d16bbfcbeddc3ba316ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f312e31302e302d6d6f7267616e2d726564\"\u003e\r\n  \u003cimg src=\"https://camo.githubusercontent.com/b9fe7b2faa1b963c1d1b77ee18a4a7689a0d46d18cf38a48ae464f2a03357eba/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f362e392e342d6e6f64656d61696c65722d726564\"\u003e\r\n  \u003cimg src=\"https://camo.githubusercontent.com/2aa8d320fc8552d10a9f66e1076360d1f0c9ef2ee5adaea034cd13f68ca1efdc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f352e312e302d6263727970742d726564\"\u003e\r\n  \u003cimg src=\"https://camo.githubusercontent.com/f73e41f53709208ed3f07c001ccb103454212e26e6d296fa823e02cde579b205/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f312e322e302d657870726573732d2d6173796e632d2d68616e646c65722d726564\"\u003e\r\n  \u003cimg src=\"https://camo.githubusercontent.com/bdd58addfeff8b18867ab6606b24bd158319885f8c1918ec13c5786259b6c5ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f372e302e312d657870726573732d2d76616c696461746f722d726564\"\u003e\r\n\r\n  \u003c/center\u003e\r\n\u003c/dev\u003e\r\n\r\n## **Key Features:**\r\n\r\n- **User Authentication:** Secure user authentication endpoints using JWT tokens.\r\n- **Category Management:** Create, retrieve, update, and delete categories for organizing products.\r\n- **Subcategory Management:** Manage subcategories to further refine product classifications.\r\n- **Brand Management:** Maintain brands for product attribution and categorization.\r\n- **Product Management:** Comprehensive CRUD operations for products, including creation, retrieval, updating, and deletion.\r\n- **User Management:** Manage user accounts, including registration, authentication, and profile updates.\r\n- **Review System:** Enable users to leave reviews for products, with options for retrieval and moderation.\r\n- **Wishlist Functionality:** Allow users to create and manage wishlists for future purchases.\r\n- **Address Management:** Facilitate the management of user addresses for accurate shipping and billing information.\r\n- **Coupon Management:** Implement coupon functionality for discounts on products or orders.\r\n- **Shopping Cart:** Provide users with a shopping cart feature to collect and manage selected items before checkout.\r\n- **Order Processing:** Enable users to place and track orders, with functionalities for order creation, retrieval, and status updates.\r\n- **Payment Integration:** Support both online payment methods and cash on delivery options for seamless transaction processing.\r\n- **API Documentation:** Integrated Swagger UI for easy access to API documentation, enhancing development and collaboration processes.\r\n- **Middleware Mounting:** Modular function for mounting routes and middleware onto the Express application instance, ensuring proper registration and accessibility.\r\n- **Scalability:** Modular structure and organization of routes facilitate scalability, allowing for the addition of new features or endpoints in a structured and manageable manner.\r\n\r\n## Installation\r\n\r\n1. **Clone the Repository:**\r\n   Use the `git clone` command to clone the GitHub repository to your local machine.\r\n   ```bash\r\n   git clone https://github.com/alin00r/Node.js-Full-E-Commerce-RESTFul-App-with-Payment\r\n   ```\r\n2. **Initialize a Package.json File (if not already done):**\r\n   If your project doesn't already have a `package.json` file, you can create one by running:\r\n   ```bash\r\n   npm init\r\n   # or\r\n   yarn init\r\n   ```\r\n3. **Install depends**\r\n   ```bash\r\n      npm install\r\n   ```\r\n4. **Setting up env variables**\u003cbr\u003e\r\n\r\n   - **Please first specifiy your database engine**\r\n\r\n   ```properties\r\n   ## PORT\r\n   PORT=YOUR PORT HERE\r\n\r\n   ## MongoDB URI\r\n   DB_URI= YOUR DATABASE URI\r\n\r\n   ## JWT access token\r\n   JWT_SECRET_KEY=YOUR JWT ACCESS TOKEN SECRET\r\n   JWT_EXPIRE_TIME=YOUR JWT EXPIRE TIME\r\n\r\n   ## GMAIL\r\n   MAILER_APP_EMAIL=SENDER EMAIL\r\n   MAILER_APP_PASSWORD=SENDER PASSWORD\r\n\r\n   ## STRIPE\r\n   STRIPE_SECRET=Your STRIPE SECRET KEY\r\n   STRIPE_WEBHOOK_SECRET=Your STRIPE WEBHOOK SECRET KEY\r\n\r\n   ```\r\n\r\n## Routes\r\n\r\n### Auth Routes\r\n\r\n`@access Public`\r\n| Route | Path | Description | Body | Params |\r\n| ------| -------------------------- | ------------------------------------- | -----------------------------------------------| ------- |\r\n| POST | `/api/v1/signup` | Create Account | `name`,`email` `password`, `passwordConfirm` | none |\r\n| POST | `/api/v1/login` | Login with exist user | `email`,`password` | none |\r\n| POST | `/api/v1/forgotPassword` | request code to reset your password | `email` | none |\r\n| POST | `/api/v1/verifyResetCode` | verify Reset Code | `resetCode`, | none |\r\n| PUT | `/api/v1/resetPassword` | Reset your new password | `email`, `newPassword` | none |\r\n\r\n### Categories Routes\r\n\r\n`@access Admin`\r\n| Route | Path | Description | Body | Params |\r\n| ------ | -------------------------- | ------------------------------------- | --------------------------| ---------- |\r\n| POST | `/api/v1/categories` | Create Category |`name`,`image` | none |\r\n| GET | `/api/v1/categories` | Get All Categories | none | none |\r\n| GET | `/api/v1/categories/:id` | Get Category with id | none | Category Id |\r\n| PATCH | `/api/v1/categories/:id` | Update Category with id | none | Category Id |\r\n| DELETE | `/api/v1/categories/:id` | Delete Category with id | none | Category Id |\r\n\r\n### SubCategories Routes\r\n\r\n`@access Admin`\r\n| Route | Path | Description | Body | Params |\r\n| ------ | ----------------------------- | ------------------------------------- | --------------------------| ------------- |\r\n| POST | `/api/v1/Subcategories` | Create SubCategory |`name`,`image` | none |\r\n| GET | `/api/v1/Subcategories` | Get All SubCategories | none | none |\r\n| GET | `/api/v1/Subcategories/:id` | Get SubCategory with id | none | SubCategory Id |\r\n| PATCH | `/api/v1/Subcategories/:id` | Update SubCategory with id | none | SubCategory Id |\r\n| DELETE | `/api/v1/Subcategories/:id` | Delete SubCategory with id | none | SubCategory Id |\r\n\r\n### Brands Routes\r\n\r\n`@access Admin`\r\n| Route | Path | Description | Body | Params |\r\n| ------ | ----------------------------- | ------------------------------------- | --------------------------| -------- |\r\n| POST | `/api/v1/brands` | Create brand |`name`,`image` | none |\r\n| GET | `/api/v1/brands` | Get All brands | none | none |\r\n| GET | `/api/v1/brands/:id` | Get brand with id | none | brand Id |\r\n| PATCH | `/api/v1/brands/:id` | Update brand with id | `name`,`image` | brand Id |\r\n| DELETE | `/api/v1/brands/:id` | Delete brand with id | none | brand Id |\r\n\r\n### Categories/Subs\r\n\r\n`@access Admin`\r\n| Route | Path | Description | Body | Params |\r\n| ------ | --------------------------------------------- | ----------------------------------------------- | --------------------------| ------------ |\r\n| GET | `/api/v1/categories/:categoryId/subcategories` | Get list of subcategories for specific category |none | `categoryId` |\r\n| POST | `/api/v1/categories/:categoryId/subcategories` | Create subcategory on category |`name`,`image` | `categoryId` |\r\n\r\n### Products Routes\r\n\r\n`@access Admin`\r\n| Route | Path | Description | Body | Params |\r\n| ------ | ----------------------------- | ------------------------------------- | ---------------------------------------------------| -------- |\r\n| POST | `/api/v1/products`| Create Product |`title`,`slug`,`quantity`, | none |\r\n| | | |`sold`,`price`,`priceAfterDiscount`, | |\r\n| | | |`description`,`category`,`imageCover`, | |\r\n| | | |`ratingsAverage`,`ratingsQuantity`,`subcategories` | | | GET | `/api/v1/products` | Get All Products | none | none |\r\n| GET | `/api/v1/products/:id` | Get Product with id | none | Product Id |\r\n| PATCH | `/api/v1/products/:id` | Update Product with id |`title`,`slug`,`quantity`, | Product Id |\r\n| | | |`sold`,`price`,`priceAfterDiscount`, | none |\r\n| | | |`description`,`category`,`imageCover`, | |\r\n| | | |`ratingsAverage`,`ratingsQuantity`,`subcategories` | |\r\n| DELETE | `/api/v1/products/:id` | Delete Product with id | none | Product Id |\r\n\r\n- **ENUMS** \u003cbr\u003e\r\n  This schema defines two enums:\r\n\r\n1. `Role`: Represents the role of a user with two possible values:\r\n\r\n- `USER`: Indicates a regular user.\r\n- `ADMIN`: Indicates an administrator user.\r\n- `MANAGER`: Indicates an administrator user but he can't delete anything on the server.\r\n\r\n## `to browse all routes see Api Rutes on Swagger`\r\n\r\n## Swagger Docs\r\n\r\n```\r\nhttps://app.swaggerhub.com/apis-docs/ALINOORSPAM/Eshtery/1.0.0\r\n\r\n```\r\n\r\n\u0026copy; Ali Nour \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falin00r%2Fnode.js-full-e-commerce-restful-api-with-payment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falin00r%2Fnode.js-full-e-commerce-restful-api-with-payment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falin00r%2Fnode.js-full-e-commerce-restful-api-with-payment/lists"}