Code Monkey home page Code Monkey logo

django-react-ecommerce's Introduction

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.