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.
To setup,
-
You can clone the repository using the link here
$ git clone https://github.com/myrdstom/Store-Manager -
Download and install python 3.6 or higher
-
Install pip here
-
Switch to the directory that you have just cloned and set up a virtual-environment
$ cd store manager $ pip install virtualenv $ Linux and MacOS users : virtualenv --python=python3 venv $ Windows users: virtualenv venv $ Linux and MacOS users: source venv/bin/activate $ Windows users: cd venv/bin/activateNote if you are using windows activate the environment with
venv/scripts/activate -
Move to the root directory of the project
-
Install all dependencies in the
requirements.txtto finalise setting up the environment.pip install -r requirements.txt -
Download and install the postgreSQL database here
-
Create two databases
store_manager_pkfor the production environment andtest_store_managerfor the test environment
-
Run the file run.py
python run.pyin the root directory and follow the prompts -
Test all endpoints with POSTMAN
| End Point | Description |
|---|---|
| GET /api/v1/signup | Register a new user |
| POST /api/v1/login | Login a new user |
| GET /api/v1/products | Get all products |
| POST /api/v1/products | Post a new product |
| PUT /api/v1/products/int:product_id | Edit a product |
| DELETE /api/v1/products/int:product_id | Delete a product |
| GET /api/v1/products/int:product_id | Return a single product |
| GET /api/v1/sales | Get all sales |
| POST /api/v1/sales | Post a new sale |
| GET /api/v1/products/int:sale_id | Return a single sale |
-
pip install nose
-
Run
nosetests --with-coverage --cover-package=appto run all tests with coverage
The Python application is hosted on Heroku
The application is documented on Swagger
##Built with The project has been built with the following technologies so far:
- HTML
- CSS
- Javascript
- Python/Flask
- postgreSQL
- Swagger
Paul Kayongo