Install Docker Desktop
There are 3 .env files provided. Note in particular the .env files in backend/ and postgres/; there, you can adjust the database credentials, debug mode, secret key, allowed hosts, etc. Things should run just fine without any changes, but just know these files are there.
The included sample helloyou django app can be easily removed by removing 'helloyou' from INSTALLED_APPS in django mainapp/settings.py, removing the associated helloyou path in mainapp/urls.py and deleting the entire helloyou folder. On the frontend, delete/replace the contents of Home.tsx.
Change the boilerplate app name (shown in header and footer) by changing the constant APP_NAME in frontend/src/settings.tsx.
The Material UI Theme can be adjusted in frontend\src\Theme.tsx
NOTE: If you change your database name/credentials, but have already run the steps below, you may need to delete the associated postgres docker image in order to get things to work.
For development mode without NGINX server, run the following command:
docker-compose -f "docker-compose.dev.yml" up -d --build
The react frontend should be available at http://localhost:3000/
and django backend at http://localhost:8000/
(django admin at http://localhost:8000/admin/
). This mode supports both react hot reloading and django auto-refresh with changes.
For development with the NGINX server run:
docker-compose -f "docker-compose.yml" up -d --build
The server should be available at http://127.0.0.1/
. This mode will not hot reload since it's running a production build (npm build).
NOTE: This repo is still largely a work in progress, but it should be a good starting point. Suggestions/feedback in discussions tab are greatly appreciated.
TODO:
- Backend Testing
- Frontend Testing (React Testing Library)
- Readme (setup and how to remove remnants of dummy stuff)
- Material UI Theme
- Auto redirect to login with Failed Request
- Auto Generation of Left Nav based on Routes?
- Fix NGINX Docker Compose
- Axios Interfaces
- Update and Pin versions (remove anything unused)
- fix django admin not serving css files on admin page
- error context
- show password errors
- loading icon on login
- forgot password functionality (email)
- add logo holder
- ability to customize background on login