Workwise is a simple full-stack starter that pairs a Django backend with a React frontend. It demonstrates containerized development with Docker and Docker Compose while providing a minimal landing endpoint and a ready-to-run React scaffold.
- Django 5 backend with a basic homepage view wired through project URLs.
- React 19 frontend scaffold generated by Create React App.
- Dockerfiles for backend and frontend plus development and production Docker Compose stacks.
- PostgreSQL service wired into the Compose configurations for database-backed deployments.
The project is split into backend and frontend services that can run locally or via Docker Compose:
- Backend (
backend/django_app): Standard Django project (core) with ahomepageapp that renders a welcome message. Uses SQLite by default but Docker Compose provisions PostgreSQL. - Frontend (
frontend/react_app): Create React App scaffold with default assets and tests. Runs on Node 20. - Containerization: Each service has its own Dockerfile. Docker Compose files orchestrate backend, frontend, and PostgreSQL for development (
docker-compose.dev.yml) and production (docker-compose.prod.yml).
- Backend: Python 3.12, Django 5.2, Django REST Framework (installed), Gunicorn.
- Frontend: React 19, React Scripts 5, Jest/React Testing Library.
- Database: PostgreSQL 16 via Docker Compose (SQLite used by default in settings).
- Tooling: Docker, Docker Compose.
workwise/
├── backend/
│ ├── Dockerfile
│ └── django_app/
│ ├── core/
│ │ ├── settings.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── homepage/
│ │ ├── urls.py
│ │ └── views.py
│ ├── manage.py
│ └── requirements.txt
├── docker-compose.dev.yml
├── docker-compose.prod.yml
├── frontend/
│ ├── Dockerfile
│ └── react_app/
│ ├── package.json
│ ├── public/
│ └── src/
└── README.md
- Navigate to the backend directory and create a virtual environment:
cd backend/django_app python -m venv .venv source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Apply migrations and start the server:
python manage.py migrate python manage.py runserver
- Install Node.js 20+.
- Navigate to the React app and install dependencies:
cd frontend/react_app npm install - Start the development server:
npm start
The Compose files expect environment files (.env.dev, .env.prod) at the project root. Common variables you may need:
POSTGRES_DB=workwise
POSTGRES_USER=workwise
POSTGRES_PASSWORD=workwise
POSTGRES_HOST=db
POSTGRES_PORT=5432
DJANGO_DEBUG=True
DJANGO_SECRET_KEY=replace-me
When running locally without Docker, the Django settings default to SQLite and do not require database environment variables.
- Local (without Docker):
- Backend: activate the virtual environment and run
python manage.py runserverfrombackend/django_app. - Frontend: run
npm startfromfrontend/react_appand openhttp://localhost:3000.
- Backend: activate the virtual environment and run
- Docker Compose (development):
docker-compose -f docker-compose.dev.yml up --build
- Docker Compose (production-style):
docker-compose -f docker-compose.prod.yml up --build
- Backend:
cd backend/django_app python manage.py test
- Frontend:
cd frontend/react_app npm test
- Backend Dockerfile builds a multi-stage image with dependencies baked in and runs Gunicorn (adjust WSGI module if your project module changes).
- Frontend Dockerfile installs dependencies and runs the React development server (or
npm run buildin production Compose). - Development and production Compose files wire backend, frontend, and PostgreSQL containers.
- Kubernetes manifests are not provided.
| Method | Path | Description |
|---|---|---|
| GET | / |
Returns a simple "Welcome to WorkWise!" HTML response from the homepage view. |
| GET | /admin/ |
Django admin interface (requires superuser). |
- Build and run the production stack with Docker Compose:
docker-compose -f docker-compose.prod.yml up --build
- The backend Docker image starts Gunicorn bound to
0.0.0.0:8000; ensure the WSGI module path matches the Django project (updateCMDif needed).
- Configure Django settings to read database credentials from environment variables and enable PostgreSQL in non-Docker runs.
- Replace the placeholder React UI with application-specific pages and integrate it with backend APIs.
- Add REST endpoints using Django REST Framework and document them with an OpenAPI/Swagger spec.
- Add CI workflows for linting, testing, and image builds.
No explicit license provided in the repository.