Boilerplate for a Django + React project
The django-react-boilerplate is a boilerplate for Django applications with frontend SPAs. It is built by Labcodes and currently uses React and Vite to manage the frontend. The boilerplate is equipped with features such as PWA (Progressive Web Apps) support, HMR (Hot Module Replacement), and code splitting. Although it is still in beta, any bugs that arise can be reported through the issue tracking system.
wgetmakepython>=3.6poetrynodejs>=8.10libpq-dev (required for Ubuntu>=18.04)python3-dev (required for Ubuntu>=18.04)wget <boilerplate_url>
make setup
localhost:8000 in a browser.Alternatively, if the setup script doesn’t work or you want to install everything manually:
poetry shell.make install_dependencies.env.example file to .env to provide environment variables to the Django app using python-decouple.python manage.py migrate to create a dev database.make run to start both the Vite development server and Django in parallel.The django-react-boilerplate is a powerful tool for quickly setting up Django applications with frontend SPAs using React and Vite. It provides features like PWA support, HMR, and code splitting. The installation process is straightforward, and there is also the option to install dependencies manually if needed. The boilerplate offers extensive development and testing support, making it a robust choice for building Django applications with modern frontend technologies.