Skip to content

It is a web based projects backend which provides service for sign-up, sign-in and admin panel. It supports carting, ordering and making invoice of orders. It performs with python-django, REST-Api and Postgresql.

Notifications You must be signed in to change notification settings

Sajaldeb25/Online-shop-backend-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 

Repository files navigation

Online-shop-backend

πŸ“–

It is a web based projects backend which provides service for sign-up, sign-in and admin panel. It supports carting, ordering and making invoice of orders. It performs with python-django, REST-Api and Postgresql.

πŸ“‹ Setup

It is best to use the python virtualenv tool to build locally:

  • Clone the repository
$ git clone https://github.com/Sajaldeb25/Online-shop-backend-.git
$ cd Online-shop-backend-
  • Create Virtual environment and Install dependencies
$ virtualenv env
$ source ./env/bin/activate
$ pip install -r requirements.txt
  • Make .env file to the root directory of the project. .env file should contains following variables.
SECRET_KEY=
ALLOWED_HOSTS=
DEBUG=
SQLITE_URL=
CORS_ALLOWED_ORIGINS=

πŸ“‹ Database connection

'ENGINE': 'django.db.backends.postgresql',
'NAME': 'shop',
'USER': 'postgres',
'PASSWORD': '12345',
'HOST': 'localhost',
'PORT': '5432'

πŸ“‹ Run

$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver

Then visit http://localhost:8000/product/ to view backend of the app.

πŸ“‹ Features of the Project

  • Two types of user - admin, user
  • Product Management
  • Monitor Categories of products
  • sign in and sign up
  • cart items
  • order items
  • pagination of products

πŸ“‹ Folder Structure

Online-shop-backend-
β”œβ”€β”€ shop
β”‚    β”œβ”€β”€ migrations                                                     - contains all migration history. 
β”‚                  β”œβ”€β”€ __init__.py                                      - Initial migration
β”‚                  β”œβ”€β”€ 0001_initial.py                                  - First migration 
β”‚                  β”œβ”€β”€ 0002_rename_categories_category_rename_products_product.py        
β”‚                  β”œβ”€β”€ 0003_cartitem.py        
β”‚                  β”œβ”€β”€ 0004_remove_cartitem_total_cost.py        
β”‚                  β”œβ”€β”€ 0005_rename_order_by_customer_cartitem_carted_by_customer_and_more.py       
β”‚                  β”œβ”€β”€ 0006_delete_order.py        
β”‚                  β”œβ”€β”€ 0007_order.py       
β”‚                  β”œβ”€β”€ 0008_cartitem_order_flag.py        
β”‚                  β”œβ”€β”€ 0009_alter_cartitem_order_flag.py        
β”‚                  β”œβ”€β”€ 0010_product_product_picture.py    
β”‚                  β”œβ”€β”€ 0011_alter_product_product_picture.py    
β”‚    
β”‚    β”œβ”€β”€ admin.py     
β”‚    β”œβ”€β”€ __init__.py  
β”‚    β”œβ”€β”€ admin.py
β”‚    β”œβ”€β”€ apps.py
β”‚    β”œβ”€β”€ models.py              - It contains Task model 
β”‚    β”œβ”€β”€ serializer.py          - Serialize model data 
β”‚    β”œβ”€β”€ tests.py
β”‚    β”œβ”€β”€ urls.py                - Defines path for urls
β”‚    β”œβ”€β”€ views.py               - All logics 
β”œβ”€β”€ ecommerce
β”‚    β”œβ”€β”€ __init__.py
β”‚    β”œβ”€β”€ settings.py            - Contains setting of the project, including REST-Api, Database connection, and app name. 
β”‚    β”œβ”€β”€ urls.py
β”‚    β”œβ”€β”€ wsgi.py
β”‚    β”œβ”€β”€ asgi.py
β”œβ”€β”€ media
β”‚    β”œβ”€β”€ product_images         - Contains Product images 
│── manage.py                    
│── requirements.txt             - requirements file for install configuration  
|── README.md

About

It is a web based projects backend which provides service for sign-up, sign-in and admin panel. It supports carting, ordering and making invoice of orders. It performs with python-django, REST-Api and Postgresql.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published