Django-React starter with Docker support for fast and easy web development.
Simply follow these steps to get started:
- Fork this repository
- Clone your fork
- Update documentation:
- Use the
README.example.md
file as a template for your ownREADME.md
file - Use the
CHANGELOG.example.md
file as a template for your ownCHANGELOG.md
file - Update the
LICENSE
file - Remove
yarn.lock
file
- Use the
- Update the code:
- Replace all occurrences of
django_react_starter
withyour_project_name
- Replace all occurrences of
django-react-starter
withyour-project-name
- Replace all occurrences of
Django React Starter
withYour Project Name
- Update whatever you see fit
- Use
docker-compose up
to run the application locally
- Replace all occurrences of
- Deployment:
- Create your own fly.toml file using
fly launch
(see Fly.io for more information)
- Create your own fly.toml file using
- Start coding!
This starter delivers a fully-working and deployment-ready application with Django+DRF and React, and comes with many features included.
A fully working a customizable Django/DRF:
- Views:
- Basic Django views for good measures:
robots.txt
- A default/catch-all route that serves the React frontend (
index
view) - Authentication API (
login
,logout
,check
) - Current user API (
get
,update
,update_password
) - Health check API (
api
,db
,scheduler
) - Others (
config
) - A swagger API documentation
- Basic Django views for good measures:
- Database:
- Flexible database management (SQLite or PostgreSQL with postgis)
- A custom user model following best practices
- QA:
- Configuration files for
isort
,flake8
,black
, andmypy
- Fully-tested models and APIs
- Many utilities through the
jklib
package
- Configuration files for
- Production:
- Pre-configured file and stream logging
- Sentry integration
- Email integration with a pre-configured template and the Sendinblue API
- Includes the
APS (Advanced Python Scheduler)
to schedule tasks within the application - Run the application in production using supervisor
A Vite-powered React frontend with Ant Design UI:
- UI:
- Fully working auth and user management
- Uses the Ant Design component library with a custom theme
- Pre-configured layout (header, footer, sidebar, content)
- Comes with 3 pages: Login, Profile, and Homepage
- UI notifications and feedbacks on actions
- Modular CSS with
.less
modules
- Utils:
- Custom hooks
- Provide stores with
zustand
- Uses the
jkscript
library for various utilities - All theme variables are accessible in both
.js
and.less
files
- QA:
- Simple and effective
vite
config to work locally with the Django API - Configuration files for
eslint
,prettier
, andstylelint
- Unittest with
jest
- Simple and effective
- Production:
- Served by the Django app (and correctly setup during the docker build)
Tools for local development:
Dockerfile
to build the final Django image that includes the React frontenddocker-compose
to run the application locally (frontend + backend + database)pre-commit
hooks for both backend and frontend
CI/CD ready to go:
Provides 5 different jobs:
- pre-commits: runs the pre-commit hooks for both backend and frontend
- test-backend: runs the backend tests
- test-frontend: runs the frontend tests
- rebase-check: checks if the current branch can be rebased on
main
- deploy: deploys the application on fly.io