DiptoChakrabarty / flask-online-store

An online e commerce stores management and order placing system API built using flask and sqlalchemy . Various functionalities present and further functionalities being added to make it as real life as possible . Contributions welcome .
MIT License
49 stars 23 forks source link
api flask flask-api flask-application flask-mail flask-restful hacktoberfest marshmallow migrations mysql python-api python-flask stripe stripe-payments

Flask Online Store

About the Project :open_book:

How to run the project :horse_racing:

To run locally
* Clone the repository 
 git clone https://github.com/DiptoChakrabarty/flask-online-store.git

* Enter directory 
 cd flask-online-store

* Activate virtual environment
  source venv/bin/activate

* Install packages
  pip3 install -r requirements.txt

* Set environment variables
 cp .env.example .env

* Fill the parameters

  CLIENT_ID= {Github Client Id}
  CILENT_SECRET= {Github Client Secret}
  STRIPE_API= {Stripe token}
  MAIL_USERNAME = {Email Id }
  MAIL_PASSWORD = {Email Password}

* Remove site.db to start from fresh database
  rm site.db

* Start app
  python3 app.py

* Head over to http://localhost:5000
  (it is preferable if you use something as postman as most are post requests)
To run in docker
 * Set environment variables
   cp .env.example .env

* Fill the required parameters

* If you have removed site.db then remove the following line in Dockerfile
  RUN rm site.db

* Run using 
  docker-compose up -d to start as background process

* Head over to http://localhost:5000

Repository Structure :deciduous_tree:

Based on the directories present

DataBase Architecture :desktop_computer:


There are mainly four schemas 

* Users - which contains details about the users
* Store - which contains details about the store
* Items - which contains details about the items
* Order - which is for ordering stuff

### DataBase Architecture

- store and item : one to many 
- item and order: many to many 

Functionalities present

1) flask_jwt_extended

2) flask restful

3) flask marshmallow

4) OAuth2

5) flask migrate

6) flask mail

7) Stripe

Contribution Guidelines 🙂

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

If anyone wants to take up an issuse they are free to do so .

Pull Request Process

Branch Policy

Contribution Practices