{"id":16535073,"url":"https://github.com/irenaeus-xvi/e-commerce","last_synced_at":"2026-04-14T10:31:44.977Z","repository":{"id":208880253,"uuid":"682312722","full_name":"Irenaeus-XVI/E-Commerce","owner":"Irenaeus-XVI","description":" E-Commerce Project is a scalable and customizable platform for online businesses. It's built using Node.js, Express, and MongoDB.","archived":false,"fork":false,"pushed_at":"2023-11-25T11:59:24.000Z","size":281,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T15:21:27.721Z","etag":null,"topics":["authentication","authorization","bycrypt","cloudinary","dotenv","expressjs","global-error-handling","joi-validation","jsonwebtoken","mongodb","mongoose","morgan","multer","nanoid","nodejs","nodemailer","qrcode-generator","slugify","stripe-payments"],"latest_commit_sha":null,"homepage":"https://e-commerce-lezg.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/Irenaeus-XVI.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":"2023-08-23T22:53:14.000Z","updated_at":"2023-11-23T18:40:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"c13753ef-f781-4ff3-a84f-4ab9667fcb12","html_url":"https://github.com/Irenaeus-XVI/E-Commerce","commit_stats":null,"previous_names":["irenaeus-xvi/e-commerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Irenaeus-XVI/E-Commerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FE-Commerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FE-Commerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FE-Commerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FE-Commerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Irenaeus-XVI","download_url":"https://codeload.github.com/Irenaeus-XVI/E-Commerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Irenaeus-XVI%2FE-Commerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["authentication","authorization","bycrypt","cloudinary","dotenv","expressjs","global-error-handling","joi-validation","jsonwebtoken","mongodb","mongoose","morgan","multer","nanoid","nodejs","nodemailer","qrcode-generator","slugify","stripe-payments"],"created_at":"2024-10-11T18:26:20.570Z","updated_at":"2026-04-14T10:31:44.953Z","avatar_url":"https://github.com/Irenaeus-XVI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-Commerce-App\n\nE-Commerce Project is a scalable and customizable platform for online businesses. It's built using Node.js, Express, and MongoDB.\n## Getting Started\n\nTo get started with the E-Commerce backend, follow these steps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/Irenaeus-XVI/E-Commerce.git\n   ```\n2. Install dependencies:\n    ```sh\n   cd E-Commerce\n   npm install\n   ```\n3. Set up environment variables:\n\n   Create a `.env` file in the root directory and add the necessary environment variables. You can use the provided .env.example as a template.   \n\n4. Start the server:\n\n```sh \n    npm start\n```\n\nThe server will start and listen on a specified port (default: 3000). You can access the API using tools like Postman or integrate it with your frontend application.\n\n\n## Configuration\n\n## MongoDB connection URLs\n- `CONNECTIONURL`: MongoDB connection URL for local development.\n- `CONNECTIONURLONLINE`: MongoDB connection URL for online deployment.\n\n## Application Mode\n- `MODE`: Application mode (dev, prod, etc.).\n\n## Security\n- `SALT_ROUNDS`: Number of salt rounds for bcrypt hashing.\n- `SECRET_KEY_TOKEN`: Secret key for generating JWT tokens.\n\n## Server Configuration\n- `PORT`: Port on which the server will run.\n\n## Stripe Integration\n- `STRIPE_SECRET_KEY`: Secret key for Stripe payment integration.\n\n## Web Hook Security\n- `WEB_HOOK_SECRET_KEY`: Secret key for securing web hooks.\n\n## Endpoints\n\n### User Authentication\n\n- **Register a new user:**\n  - `POST /api/v1/user/signup`\n\n- **Log in a user:**\n  - `POST /api/v1/user/signin`\n\n- **Verify user email:**\n  - `GET /api/v1/user/verify/:token`\n\n### Product Management\n\n- **Add a new product:**\n  - `POST /api/v1/products/add`\n\n- **Update a product:**\n  - `PUT /api/v1/products/:productId`\n\n- **Delete a product:**\n  - `DELETE /api/v1/products/:productId`\n\n- **Get all products:**\n  - `GET /api/v1/products`\n\n### Shopping Cart\n\n- **Add an item to the cart:**\n  - `POST /api/v1/cart/add`\n\n- **Remove an item from the cart:**\n  - `DELETE /api/v1/cart/remove/:itemId`\n\n- **Update item quantity in the cart:**\n  - `PUT /api/v1/cart/update/:itemId`\n\n- **View shopping cart:**\n  - `GET /api/v1/cart`\n\n### Order Processing\n\n- **Place an order:**\n  - `POST /api/v1/orders/place`\n\n- **View order history:**\n  - `GET /api/v1/orders/history`\n\n### User Reviews and Ratings\n\n- **Leave a review for a product:**\n  - `POST /api/v1/products/:productId/reviews`\n\n- **View reviews for a product:**\n  - `GET /api/v1/products/:productId/reviews`\n\n### Search Functionality\n\n- **Search for products:**\n  - `GET /api/v1/products/search`\n\n### User Account Dashboard\n\n- **View user account information:**\n  - `GET /api/v1/user/account`\n\n### Admin Dashboard\n\n- **View sales and analytics:**\n  - `GET /api/v1/admin/dashboard`\n\n## Global Error Handling and Status Codes\n\nThe application employs global error handling to ensure consistent error responses. HTTP status codes are utilized to indicate the nature of errors:\n\n- `404`: Resource not found.\n- `400`: Bad request - when the request is malformed or invalid.\n- `409`: Conflict - when there is a conflict with the current state of the server (e.g., attempting to create a resource that already exists).\n- `500`: Server error.\n\nThis approach helps maintain a standardized response format and enhances the user experience by providing meaningful error messages and appropriate HTTP status codes.\n\n\n## Technologies\n\n- **Backend:**\n  - [Node.js](https://nodejs.org/)\n  - [Express.js](https://expressjs.com/)\n  - [MongoDB](https://www.mongodb.com/)\n\n- **Database:**\n  - [Mongoose](https://mongoosejs.com/)\n\n- **Authentication and Authorization:**\n  - [bcrypt](https://www.npmjs.com/package/bcrypt)\n  - [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken)\n\n- **Middleware:**\n  - [cors](https://www.npmjs.com/package/cors)\n  - [dotenv](https://www.npmjs.com/package/dotenv)\n  - [morgan](https://www.npmjs.com/package/morgan)\n\n- **Validation:**\n  - [Joi](https://www.npmjs.com/package/joi)\n\n- **File Upload:**\n  - [Multer](https://www.npmjs.com/package/multer)\n\n- **Utility Libraries:**\n  - [uuid](https://www.npmjs.com/package/uuid)\n  - [slugify](https://www.npmjs.com/package/slugify)\n\n- **Payment Integration:**\n  - [Stripe](https://www.npmjs.com/package/stripe)\n\n- **Other Utilities:**\n  - [qrcode](https://www.npmjs.com/package/qrcode) (used for generating QR codes)\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a suggestion, feel free to open an issue or create a pull request.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fe-commerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firenaeus-xvi%2Fe-commerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firenaeus-xvi%2Fe-commerce/lists"}