Django React Boilerplate screenshot

Django React Boilerplate

Author Avatar Theme by Justdjango
Updated: 3 Dec 2020
449 Stars

A Django and React user authentication project boilerplate.

Overview:

The Django React Boilerplate is a project setup that combines the Django and React frameworks. It provides a convenient starting point for developers looking to build web applications that leverage the features of both frameworks. The boilerplate project includes user authentication on the backend using Django Rest Framework and rest-auth. On the frontend, it incorporates the React Redux setup for user authentication, with the token being stored in local storage.

Features:

  • Backend user authentication with Django Rest Framework and rest-auth
  • Frontend authentication setup using React Redux
  • Storage of authentication token in local storage

Installation:

To install and set up the Django React Boilerplate, follow these steps:

  1. Clone the repository:
git clone [repository_url]
  1. Change into the project directory:
cd django-react-boilerplate
  1. Set up a virtual environment and activate it:
python -m venv env
source env/bin/activate (Linux/Mac)
env\Scripts\activate (Windows)
  1. Install the Python dependencies:
pip install -r requirements.txt
  1. Install the Node dependencies:
npm install
  1. Build the frontend assets:
npm run build
  1. Start the Django server:
python manage.py runserver
  1. Open your browser and navigate to http://localhost:8000 to access the application.

Summary:

The Django React Boilerplate is a useful starting point for developers looking to combine the Django and React frameworks in their web application projects. It provides a pre-configured setup with backend user authentication using Django Rest Framework and rest-auth, as well as frontend authentication using React Redux. The boilerplate also includes instructions for installation to help users get started quickly.