Your favorite React-Django boilerplate.
This is a fully-featured Django-React boilerplate built for great development experience and easy deployment.
- Commit lint rules
Other features | Status |
---|---|
SSR ready | In progress |
Service workers | ✔️ |
Gzip static file gen | ✔️ |
Cache control | ✔️ |
Code split and lazy loading | ✔️ |
Google Analytics ready | ✔️ |
- Django
- Django REST Framework
- Django CORS Headers
Other features | Status |
---|---|
Token authentication | ✔️ |
SMTP ready | ✔️ |
- Docker image with
Other features | Status |
---|---|
NGINX config file | ✔️ |
CI/CD to Digital Ocean (the hml and main branches will trigger the deployment actions) |
✔️ |
- Clone this repo:
git clone https://github.com/marcelovicentegc/django-react-typescript.git
- Create a virtual environment:
python -m venv venv
- Activate it ☝️:
source venv/bin/activate
orvenv\Scripts\activate
if you're on a Windows - Install dependencies:
npm i && pip install -r requirements.txt && cd frontend && npm i
- Setup the project
.env
file by taking as example the.env.example
on the root folder (refer to configuration for more details) - Setup the frontend app's
frontend/.env
file by taking as example thefrontend/.env.example
file (refer to configuration for more details) - Start the application:
npm start
You should configure these variables on a .env
file on the root folder for the global configuration and a .env
file for the frontend configuration when developing, but for production, set these variables as secrets.
Environment variable | Default |
---|---|
CDN_NAME | - |
CDN_API_KEY | - |
CDN_API_SECRET | - |
DB_HOST | - |
DB_NAME | - |
DB_USER | - |
DB_PASSWORD | - |
DB_PORT | - |
SMTP_HOST_USER | - |
SMTP_HOST_PASSWORD | - |
TEST | - |
TWILIO_ACCOUNT_SID | - |
TWILIO_AUTH_TOKEN | - |
TWILIO_WPP_NUMBER | - |
Environment variable | Default |
---|---|
NODE_ENV | development |
AUTH_TOKEN | - |
GTAG_ID | - |