OTS React.JS – DJango Web Application (UNTESTED)

This repository servers as a template for creating React.JS – Django Web Applications. Note that the Django SECRET_KEY is being exposed here. Please create an entirely new project when starting your actual project.

Sample Solution Architecture

File system

Tree below shows the file system for the more important files for this application.



  1. Set Up
  2. Running the Application

Set Up

Clone this repository to your local computer

git clone https://github.com/peanutsee/reactjs-django-boilerplate.git

Start Python virtual environment in the directory you cloned the repository to

virtualenv pyenv

Start virtual environment

cd pyenv/Scripts

Download dependencies in requirements.txt

cd backend
pip install -r requirements.txt

Download dependencies in package.json

cd frontend
npm install

Running the Application

Start Python virtual environment

cd pyenv/Scripts

Start backend server

cd backend
python manage.py runserver

Start frontend server (separate terminal/command promopt)

npm run start

Good Practices

Save backend dependencies in requirements.txt

> requirements.txt”>

pip freeze >> requirements.txt

Save frontend dependencies in package.json (installation)

<div class="highlight highlight-source-shell position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install –save “>

npm install --save <PACKAGE_NAME>