![Build and Test app](https://github.com/marcelovicentegc/django-react-typescript/workflows/Build%20and%20Test%20app/badge.svg)
Your favorite React-Django boilerplate.
This is a fully-featured Django-React boilerplate built for great development experience and easy deployment.
Other features |
Status |
SSR ready |
In progress |
Service workers |
✔️ |
Gzip static file gen |
✔️ |
Cache control |
✔️ |
Code split and lazy loading |
✔️ |
Google Analytics ready |
✔️ |
Other features |
Status |
Token authentication |
✔️ |
SMTP ready |
✔️ |
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
or venv\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 the frontend/.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 |
- |
![Architecture](./assets/Architecture.png)