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.
GIT clone from GitHub
$ 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
e_commerce $ python3 -m venv venv
e_commerce $ source venv/bin/activate
(venv) e_commerce $ pip install -r requirements.txt
(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
(venv) e_commerce $ python manage.py makemigrations
(venv) e_commerce $ python manage.py showmigrations
(venv) e_commerce $ python manage.py migrate
(venv) e_commerce $ python manage.py createsuperuser
Username: admin
Email address: admin@email.com
Password: sudo@123
(venv) e_commerce $ python manage.py runserver
Stripe Webhook Configuration
You need to put your credentials to login
e_commerce $ ./stripe login
e_commerce $ ./stripe listen --forward-to localhost:8000/payment/webhook/
e_commerce $ ./stripe logout
ElasticSearch
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