Skip to content

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. This repository contains the API endpoints for the application.

Notifications You must be signed in to change notification settings

calebrotich/store-manager-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

store-manager-api

Continous Integration badges

Build Status Coverage Status Maintainability

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. This repository contains the API endpoints for the application.

Endpoints

Http Method Endpoint Functionality
POST api/v1/auth/signup Creates a new user account
POST api/v1/products Used by the admin to add a new product
POST api/v1/saleorder Used by the sale attendant to add a new sale order
GET api/v1/auth/signin Authenticates and creates a token for the users
GET api/v1/products/<product_id> Enables a user to fetch a specific product
GET api/v1/saleorder/<sale_order_id> Enables a user to fetch a specific sale order
GET api/v1/products Enables a user to fetch all products
GET api/v1/saleorder Enables a user to fetch all sale orders

Installing the application

  1. Open a command terminal in your preferred folder
  2. Run command git clone https://github.com/calebrotich10/store-manager-api.git to have a copy locally
  3. cd store-manager-api
  4. Create a virtual environment for the application virtualenv venv
  5. Install dependencies from the requirements.txt file pip3 install -r requirements.txt
  6. Export environment variables to your environment export JWT_SECRET_KEY=your-secret-key, export FLASK_APP="run.py"
  7. Run the application using flask command flask run or using python3 python3 run.py

Running tests

Inside the virtual environment created above, run command: coverage run --source=app.api.v1 -m pytest app/tests/v1 -v -W error::UserWarning && coverage report

Technologies used

  1. JWT for authentication
  2. pytest for running tests
  3. Python based framework flask
  4. Flask packages

Deployment

Heroku

Documentation

https://documenter.getpostman.com/view/5265531/RWguxwzy

Author

Caleb Rotich

Credits

This application was build as part of the Andela NBO 33 challenge

About

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. This repository contains the API endpoints for the application.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages