Skip to content

This is a simple E-Commerce Project developed using django framework. This project is integrated with user email authentication and email activation token autentication. Also elasticsearch engine is integrated in this application.

Notifications You must be signed in to change notification settings

Shuvam77/ecommerce_v1

Repository files navigation

E-Commerce Website Version-1

Introduction

This is a simple E-Commerce Project developed using django framework. This project is integrated with user email authentication and email activation token autentication. Different packages is used while developing this application such as coverage, six, isort, black, stripe, and so on, which are all mentioned in requirements.txt file.
Stripe payment gateway mechanism is integrated in this application for online transaction between buyers and seller. Stripe webhook is integrated to get real-time data from stripe.
Testing is done through, unittest and pytest.
Elasticsearch engine is used to query search function.

Tech Stack

  1. Python 3.9
  2. Django 4.0.5
  3. SQLite3
  4. jQuery 3.6.0
  5. Bootstrap5
  6. Stripe
  7. Elasticsearch
  8. Docker

Installation

GIT clone from GitHub

First step is to make a directory.
$ mkdir e_commerce
$ cd e_commerce
Then clone the E-commerce App Repo from the GitHub.
e_commerce $ git clone https://github.com/Shuvam77/ecommerce_v1.git .

Python Enviornment

Install and activate Python virtual environments. And activate it.
e_commerce $ pipenv shell
or
e_commerce $ python3 -m venv venv
e_commerce $ source venv/bin/activate
Once it has been activated, install requirements.txt.
(venv) e_commerce $ pip install -r requirements.txt
.env file
(venv) e_commerce $ touch .env
STRIPE_API_KEY = ENTER_STRIPE_API_KEY
STRIPE_PUBLISHABLE_KEY = ENTER_STRIPE_PUBLISHABLE_KEY
ENDPOINT_SECRET = ENTER_STRIPE_WEBHOOK_ENDPOINT_SECRET
BASKET_SESSION = G6h?r{1b#{ZM6N6_G5)@

Start Migration

Migration Process
(venv) e_commerce $ python manage.py makemigrations
(venv) e_commerce $ python manage.py showmigrations
(venv) e_commerce $ python manage.py migrate
Create SuperUser
(venv) e_commerce $ python manage.py createsuperuser

Username: admin
Email address: admin@email.com
Password: sudo@123
Runserver
(venv) e_commerce $ python manage.py runserver

Stripe Webhook Configuration

Stripe login in new terminal

You need to put your credentials to login

e_commerce $ ./stripe login
Activate listen command for webhook
e_commerce $ ./stripe listen --forward-to localhost:8000/payment/webhook/
Logout of stripe webhook
e_commerce $ ./stripe logout

ElasticSearch

Run elasticsearch container using docker
e_commerce $ docker-compose up -d

######To create and populate the Elasticsearch index and mapping use the search_index command

(venv)e_commerce $ python manage.py search_index --rebuild

About

This is a simple E-Commerce Project developed using django framework. This project is integrated with user email authentication and email activation token autentication. Also elasticsearch engine is integrated in this application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published