Store Manager is a web application that helps store owners manage sales and product inventory records. This application is meant for use in a single store.
- Admin can add a product.
- Admin/store attendant can get all products
- Admin/store attendant can get a specific product
- Store attendant can add a sale order
- Admin can get all sale records
- Admin can manage addition, editing and deletion of categories
Step 1
Create directory
$ mkdir store_manager_api
$ cd store_manager_api
create a .env file
touch .env
using the .env_example as an example, add details to the .env file
Create and activate virtual environment
$ virtualenv env -p python3
$ source env/bin/activate
Clone the repository here or
git clone https://github.com/waracci/store-manager-v2
Install project dependencies
$ pip install -r requirements.txt
Step 2
Using the command on the terminal
Create two databases: store and test_store
Step 3
environment variables are stored in .env file
Step 4
$ flask run
Step 5
$ python manage.py run_tests
| Method | Endpoint | Functionality |
|---|---|---|
| POST | /api/v2/product | Create a product |
| GET | /api/v2/product | Get all products |
| GET | /api/v2/product/productId | Get a single product |
| PUT | /api/v2/product/productId | Edit a single product |
| Delete | /api/v2/product/productId | Delete a product |
| Method | Endpoint | Functionality |
|---|---|---|
| POST | /api/v2/sales | Create a sales order |
| GET | /api/v2/sales | Get all sales orders |
| GET | /api/v2/sales/salesId | Get a single sales order |
| Delete | /api/v2/sales/saleId | Delete a sales record |
| Method | Endpoint | Functionality |
|---|---|---|
| POST | /api/v2/auth/register | Register a User |
| POST | /api/v2/auth/login | Login a user |
| POST | /api/v2/auth/logout | Logout a user |
| Method | Endpoint | Functionality |
|---|---|---|
| POST | /api/v2/category | Create a category |
| GET | /api/v2/category | Get all categories |
| GET | /api/v2/category/categoryId | Get a single category |
| PUT | /api/v2/category/categoryId | Edit a single category |
| Delete | /api/v2/category/categoryId | Delete a category |