- BACKEND - Python Django
- FRONTEND - React with Typescript & Vite for local development
- Docker
- Docker Compose
- Clone the repository:
git clone <repository-url>
cd Lightbulb- Build and run the containers:
# Build the Docker image locally first
docker build -t bank .
# Run it
docker-compose up --build- First-time setup only:
# Run migrations (when models change)
docker-compose exec web python3 manage.py makemigrations
docker-compose exec web python3 manage.py migrate
# Create superuser (only needed once for admin access)
docker-compose exec web python3 manage.py createsuperuser- Now you can access the backend at:
http://127.0.0.1:8001 or localhost:8001
http://127.0.0.1:8001/api
http://127.0.0.1:8001/api/swagger
And frontend at (login with your superuser credentials created previously):
http://127.0.0.1:3000
- Access Django panel:
http://127.0.0.1:8001/admin
- The UI for sql database is available at:
http://127.0.0.1:5050
- Shut all the services down:
docker-compose down
The following environment variables can be adjusted in .env:
DEBUG: Set to 1 for developmentBACKEND_PORT: Port allocated for the Django app
The project uses following Docker configurations:
-
Dockerfile: Builds the Python/Django application image- Uses Python 3.12 slim base image
- Installs system and Python dependencies
- Sets up the application environment
-
frontend/Dockerfile: Builds the React application image- Uses node:18-alpine as a base image
- Serves frontend files
- Vite for seamless local development
-
docker-compose.yml: Orchestrates the application servicesweb: Django application service- Builds from Dockerfile
- Maps container's internal port 8000 to outside 8001
- Mounts code for development
- Connects to PostgreSQL
frontend: React App on Typescriptsqlite-browser: Web-based SQLite database browser- Provides a UI to browse the SQLite database
- Available at port 5050
Check README inside the corresponding folder
[Your chosen license]