https://github.com/rafaelmoraes003/store-manager
Sales management system in dropshipping format.
https://github.com/rafaelmoraes003/store-manager
chai express http javascript mocha mysql node nodejs sinon
Last synced: about 2 months ago
JSON representation
Sales management system in dropshipping format.
- Host: GitHub
- URL: https://github.com/rafaelmoraes003/store-manager
- Owner: rafaelmoraes003
- Created: 2022-08-16T22:23:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T05:14:11.000Z (over 3 years ago)
- Last Synced: 2025-03-21T10:52:46.738Z (about 1 year ago)
- Topics: chai, express, http, javascript, mocha, mysql, node, nodejs, sinon
- Language: JavaScript
- Homepage:
- Size: 261 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Store Manager
###
This project aimed to develop a fully RESTful API using the MSC (model-service-controller) architecture.
The API built was a sales management system in dropshipping format in which it is possible to create, view, delete and update products and sales.
For the construction of the API, Node.js was used with Express and a MySQL database for data management. In the testing part, 100% code coverage was done using Mocha, Chai and Sinon.
###
Technologies used
###
###
How to use the application
###
Clone the application using the `git clone` command. After that, enter the project folder using the `cd store-manager` command and run the `npm install` command. After installation, use the `npm start` command and enter port `3000` in your browser.
###
About the database
###
- Create the databse
`npm run migration`
- Populate the database
`npm run seed`
###
Endpoints
###
Products
| Method | Functionality | URL |
|---|---|---|
| `GET` | List all products | http://localhost:3001/products |
| `GET` | List a product whose name includes the string | http://localhost:3001/products?q |
| `GET` | List a product based on its id | http://localhost:3001/products/:id |
| `POST` | Create a new product | http://localhost:3001/products |
| `DELETE` | Delete a product based on its id | http://localhost:3001/products/:id |
| `PUT` | Update a product based on its id | http://localhost:3001/products/:id |
###
Sales
| Method | Functionality | URL |
|---|---|---|
| `GET` | List all sales | http://localhost:3001/sales |
| `GET` | List a sale based on its id | http://localhost:3001/sales/:id |
| `POST` | Create a new sale | http://localhost:3001/sales |
| `DELETE` | Delete a sale based on its id | http://localhost:3001/sales/:id |
| `PUT` | Update a sale based on its id | http://localhost:3001/sales/:id |