Store Manager is a web application that helps store owners manage sales and product inventory records.
-
The project is managed using PivotalTracker board click here
-
To see documentation click here
-
To see API on heroku click here
-
Sometimes even with a good token you might denied access,just send request again(currently working on it)
-
Clone the repository:
https://github.com/kwanj-k/storemanager-API.git
-
Navigate to the cloned repo.
1. Python3
2. Flask
3. Postman
After navigating to the cloned repo;
Create a virtualenv and activate it ::
create a directory
cd into the directory
virtualenv -p python3 venv
source venv/bin activate
Install the dependencies::
pip install -r requirements.txt
After activativating the virtualenv, run:
```
export FLASK_APP="run.py"
export FLASK_DEBUG=1
export APP_SETTINGS="development"
```
Run:
pytest --cov-report term-missing --cov=app
Fire up postman and start the development server by:
$ flask run
To use the docs click here
On Post man:
Navigate to http://127.0.0.1:5000/api/v1/
Test the following endpoints:
- A super admin can access both admin and attendant routes
- An admin can access his/her routes and attendant routes only
- An attendant can only access her routes
- One who adds a store is by default the only superadmin
EndPoint | Functionality |
---|---|
POST /stores | Create a store |
POST /auth/login | Login a user |
EndPoint | Functionality |
---|---|
GET /products | Get all the products |
GET /products/Id/ | Get a product by id |
POST /products/Id/ | Sell a product |
EndPoint | Functionality |
---|---|
POST /attendant/ | Add a store attendant |
POST /products/ | Add a product |
PUT /products/Id/ | Update the information of a product |
DELETE /products/Id/ | Remove a product |
GET /sales/ | Get all the the sale records |
GET /sales/Id/ | Get a specific sale |
PUT /sales/Id/ | Update a specific sale |
DELETE /sales/id | Delete a specific sale |
EndPoint | Functionality |
---|---|
POST /admin/ | Add an admin |
- Kelvin Mwangi - Initial work - kwanj-k
This project is licensed under the MIT License - see the LICENSE.md file for details
Fork the repo, create a PR to this repository's develop.