A boilerplate project setup for Django, JWT and React. The project contains backend user authentication with the Django REST Framework and Simple JWT. The frontend has react redux setup for user authentication by storing the token in localstorage.
-
Django-based backend
- Django
- Django REST Framework used for building Web APIs.
- Simple JWT provides a JSON Web Token authentication backend for the Django REST Framework.
- Separate settings for different environments (base/local/production)
- Python 3.6 or later
- [SPA] Accessible from port
3000
for local development
-
Frontend app with JavaScript (ES2015), React and Sass
- React for fast modular user interfaces
- Redux for managing application state.
- Semantic UI React used for CSS stylesheets & React components.
- [SPA] Accessible from port
8000
for local development
Latest Version of any following Browser which supports HTML5 and JavaScript ES6.
Apple Safari
Google Chrome
Mozilla Firefox
Opera
Python version 3.6 or higher.
Node 12
Git
pipenv
To use this template, first ensure that you have
Pipenv 2020.8.13
available.
After that, you should:
- Clone the repo and install the dependencies.
git clone https://github.com/vikramvaibhav/django-jwt-react-boilerplate.git
- Activate the virtualenv created by pipenv:
pipenv shell
- Install the requirements of the project template by running in django directory:
pipenv install
- Apply the migrations:
python manage.py migrate
- Run the Django development server:
python manage.py runserver
First ensure that you have
Node 14.15.0
available.
- In new terminal window go to the frontend directory:
cd react/djrb-gui
- Install the requirements to set up the library by running:
npm install
- Running the project:
npm start
- Building a distribution version:
npm run build
- Vikram Vaibhav - Initial work - vikramvaibhav
This project is licensed under the MIT License.