Skip to content

An e-commerce web application built in with Django, React and Redux

Notifications You must be signed in to change notification settings

Meltem-Karaagac/django-react-ecommerce

 
 

Repository files navigation

Django React eCommerce

Advanced eCommerce example web application with Django and React

Development
Deployment

Development

Setup environment for development

Install dependencies

Clone the project then install python and react dependencies

git clone https://github.com/amirahrari/django-react-ecommerce.git
cd django-react-ecommerce
pip install -r requirements.txt
yarn # or npm install

Add built in dummy data

Create database, apply migrations and add some dummy data

python add_dummy_data.py

Run the server

yarn run dev
python manage.py runserver
python manage.py livereload # hot reload

Open http://localhost:8000/

Admin pannel

Admin user has been created in users.json
You can access the admin pannel from http://localhost:8000/admin/
phone number: 09171234567
password: password

Deployment

Deploy with docker using postgresql, gunicorn and nginx.

Setup envrionment variables

cp .env.sample .env
cp .env.db.sample .env.db

Build and up image using docker compose

docker-compose build
docker-compose up -d

Collect static files and add dummy data

docker-compose exec web python manage.py collectstatic --no-input
docker-compose exec web python add_dummy_data.py

You are good to go. Open your server ip address on port 80 (Ex on localhost: http://127.0.0.1).

About

An e-commerce web application built in with Django, React and Redux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.6%
  • Python 28.6%
  • Other 0.8%