{"id":18800023,"url":"https://github.com/davesimoes/api-ecommerce","last_synced_at":"2026-04-08T11:32:11.354Z","repository":{"id":250330414,"uuid":"834145580","full_name":"DaveSimoes/api-ecommerce","owner":"DaveSimoes","description":"Complete API for an e-commerce site, developed with Node.js, Express and MongoDB","archived":false,"fork":false,"pushed_at":"2024-07-26T15:04:27.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T16:19:24.223Z","etag":null,"topics":["api","api-ecommerce","api-economy","e-commerce","error-handling-middleware","express-js","modular-structure","mongodb","mongodb-database","nodejs","nosql","nosql-database","nosql-databases","portfolio-project","productmanagement","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DaveSimoes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-26T14:12:52.000Z","updated_at":"2025-02-22T13:52:14.000Z","dependencies_parsed_at":"2024-07-26T16:27:55.080Z","dependency_job_id":null,"html_url":"https://github.com/DaveSimoes/api-ecommerce","commit_stats":null,"previous_names":["davesimoes/api-ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DaveSimoes/api-ecommerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveSimoes%2Fapi-ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveSimoes%2Fapi-ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveSimoes%2Fapi-ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveSimoes%2Fapi-ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaveSimoes","download_url":"https://codeload.github.com/DaveSimoes/api-ecommerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveSimoes%2Fapi-ecommerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31554090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","api-ecommerce","api-economy","e-commerce","error-handling-middleware","express-js","modular-structure","mongodb","mongodb-database","nodejs","nosql","nosql-database","nosql-databases","portfolio-project","productmanagement","restful-api"],"created_at":"2024-11-07T22:17:26.587Z","updated_at":"2026-04-08T11:32:11.332Z","avatar_url":"https://github.com/DaveSimoes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-commerce API\n## Description:\nThis is a complete API for an e-commerce site, developed with Node.js, Express and MongoDB. The API offers essential functionalities for an e-commerce system, including product management, shopping cart, orders and stock management.\n\n\n## Features:\n- Modern Technologies: Uses Node.js and Express for fast and efficient server deployment.\n- NoSQL Database: Uses MongoDB, providing flexibility and scalability in data storage.\n- Modular Structure: Code organized into controllers, models, routes and middleware, facilitating maintenance and scalability.\n- RESTful API: Follows REST standards, allowing easy integration with front-ends and other APIs.\n- Product Management: Complete CRUD for products, including creation, reading, updating and deletion.\n- Shopping Cart: Adding and removing products from the cart, with automatic calculation of the total.\n- Orders: Creation of orders from the cart, with status control.\n- Error Handling Middleware: Centralized error handling for a consistent and informative response.\n\n## Table of Contents\n- Installation\n- Configuration\n- Usage\n- API routes\n- Products\n- Shopping cart\n- Orders\n- Contribution\n- License\n\nInstalation: \n\nClone the repository:\n```\ngit clone https://github.com/DaveSimoes/ecommerce-api.git\n```\nBrowse to the project directory:\n```\ncd api-ecommerce\n```\n\n\nInstall the dependencies:\n```\nnpm install\n```\nSettings\nCreate an .env file in the root of the project and add the MongoDB database configuration:\n\nenv\nCopiar código\nMONGO_URI=seu_mongo_uri_aqui\nPORT=5000\nUso\nPara iniciar o servidor em modo de desenvolvimento, execute:\n\n```\nnpm run dev\n```\nThe server will be started at http://localhost:5000.\n\n# API routes\n## 🛍️ Products\n- GET /api/products: Returns all products.\n- GET /api/products/:id: Returns a specific product.\n- POST /api/products: Creates a new product.\n- PUT /api/products/:id: Updates an existing product.\n- DELETE /api/products/:id: Deletes a product.\n\n## 🛒 Shopping cart\n- GET /api/cart: Returns the contents of the cart.\n- POST /api/cart/add: Adds a product to the cart.\n- POST /api/cart/remove: Removes a product from the cart.\n\n ## 🎁 Orders\n- POST /api/orders: Creates a new order from the cart.\n- GET /api/orders/:id: Returns a specific order.\n- GET /api/orders: Returns all orders.\n- PUT /api/orders/:id: Updates the status of an order.\n  \n## ☕ Contributions\n- Contributions are welcome! Feel free to open an issue or send a pull request.\n\n## 🎨 Fork the project.\n- Create a new branch (git checkout -b feature/new-feature).\n- Commit your changes (git commit -am 'Add new feature').\n- Push to the branch (git push origin feature/new-feature).\n- Open a Pull Request.\n  \n## 🪪 License\n  Distributed under the MIT license. See LICENSE for more information.\n\nIf you like this project, leave a star in the repository! ⭐\n\n # ✉️ Contact us:\n Created by David De Paiva - feel free to contact me!\n\n🏆 This project was developed with a lot of effort and dedication. \nIf you found it useful, please consider contributing and helping to keep it updated and improved. \nYour contribution is invaluable! 🏆\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavesimoes%2Fapi-ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavesimoes%2Fapi-ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavesimoes%2Fapi-ecommerce/lists"}