A budget planning application for analyzing and categorizing spending from CSV files. Built with Python (FastAPI) backend and React frontend, containerized with Docker.
π Technical Comparison: See detailed architecture comparison with budget_claude (Flask implementation) at github.com/bdmckean/code_off
- Upload CSV files for budget analysis
- Map each row to common budget categories
- Save progress automatically - resume mapping from where you left off
- Visual progress tracking
- Simple, intuitive one-page interface
Before you begin, ensure you have the following installed on your local machine:
-
Docker (version 20.10 or later)
- Download from: https://www.docker.com/products/docker-desktop/
- Verify installation:
docker --version
-
Docker Compose (usually included with Docker Desktop)
- Verify installation:
docker-compose --version
- Verify installation:
git clone <repository-url>
cd budget_cursorBuild and start all services (backend and frontend):
docker-compose up --buildThis command will:
- Build the Docker images for both backend and frontend
- Start the backend API server on port 18080
- Start the React frontend on port 13030
- Mount volumes for live code reloading during development
Once the containers are running, you can access:
- Frontend Application: http://localhost:13030
- Backend API: http://localhost:18080
- API Documentation: http://localhost:18080/docs (Swagger UI)
To stop all running containers:
docker-compose downTo stop and remove volumes (clears data):
docker-compose down -vTo run containers in the background:
docker-compose up -dView logs:
docker-compose logs -fView logs for a specific service:
docker-compose logs -f backend
docker-compose logs -f frontendIf you make changes to dependencies (e.g., update pyproject.toml or package.json):
docker-compose up --buildFor code changes, the volumes are mounted so changes should hot-reload automatically.
cd backend
poetry install
poetry run uvicorn app.main:app --reloadThe backend will run on http://localhost:8000
cd frontend
npm install
npm startThe frontend will run on http://localhost:3000
Note: When running locally, make sure to set the REACT_APP_API_URL environment variable or update the API_URL in App.jsx to point to your local backend.
budget_cursor/
βββ backend/
β βββ app/
β β βββ __init__.py
β β βββ main.py # FastAPI application
β β βββ models.py
β β βββ utils.py
β βββ pyproject.toml # Poetry dependencies
β βββ poetry.lock # Locked dependency versions
β βββ Dockerfile
βββ frontend/
β βββ src/
β β βββ App.jsx # Main React component
β β βββ index.jsx
β β βββ index.css
β βββ public/
β β βββ index.html
β βββ package.json # npm dependencies
β βββ package-lock.json # Locked dependency versions
β βββ Dockerfile
β βββ .dockerignore
βββ progress/
β βββ mapping_progress.json # Saved mapping progress (auto-generated)
βββ docker-compose.yml # Docker orchestration
βββ .gitignore
βββ README.md
- Upload CSV File: Click "Upload CSV File" and select your budget/spending CSV file
- Map Rows: For each row, select the appropriate budget category
- Progress Saved: Your progress is automatically saved to
progress/mapping_progress.json - Resume Later: If you close the app, your progress is saved and you can resume from where you left off
The application includes these default categories:
- Restaurants
- Transportation
- Shopping
- Bills & Utilities
- Entertainment
- Travel
- Healthcare
- Education
- Personal Care
- Donations
- Gifts
- Income
- Other
If you get an error that ports 13030 or 18080 are already in use:
- Stop the conflicting service, or
- Update ports in
docker-compose.yml:ports: - "13031:3000" # Change frontend port - "18081:8000" # Change backend port
If the build fails, try:
# Clean up Docker cache
docker system prune -a
# Rebuild without cache
docker-compose build --no-cache
docker-compose upEnsure the backend is running and check logs:
docker-compose logs backendCheck if the frontend container is running:
docker-compose ps
docker-compose logs frontendIf you get errors about poetry.lock, generate it:
cd backend
poetry lockIf frontend dependencies fail to install:
cd frontend
rm -rf node_modules package-lock.json
npm install- Backend: Python 3.11, FastAPI, Poetry
- Frontend: React 18, Create React App
- Containerization: Docker, Docker Compose
See LICENSE file for details.