A delivery management platform for Food4Kids, supporting admin and driver workflows.
| Layer | Technology |
|---|---|
| Frontend | React 19, TypeScript, Vite, Tailwind CSS v4, React Router v7 |
| Backend | Python, FastAPI, SQLModel |
| Database | PostgreSQL + Alembic migrations |
| Auth | Firebase Auth |
| Infrastructure | Docker & Docker Compose |
| Package manager | pnpm |
food4kids/
├── backend/python/
│ ├── app/
│ │ ├── dependencies/ # Dependency injection (auth, etc.)
│ │ ├── migrations/ # Alembic database migrations
│ │ ├── models/ # SQLModel database models
│ │ ├── routers/ # FastAPI route handlers
│ │ ├── schemas/ # Pydantic schemas for API
│ │ ├── services/ # Business logic layer
│ │ ├── templates/ # Email/HTML templates
│ │ └── utilities/ # Shared utility functions
│ ├── scripts/ # Developer scripts (run manually, not by CI)
│ ├── tests/ # Unit and functional tests
│ └── server.py # Application entry point
├── frontend/ # React + TypeScript frontend (see frontend/README.md)
├── db-init/ # Database initialization scripts
├── docker-compose.yml
└── README.md
- Docker Desktop installed and running
git clone git@github.com:uwblueprint/food4kids.git
cd food4kidsYou need two env files: .env (backend) and frontend/.env (frontend). Never commit these files.
The backend .env is stored in Google Secret Manager and pulled via a script. The frontend .env must be obtained from the PL (a frontend/.env.example template is provided). Currently there are no env variables for the frontend, but may be subject to change.
Prerequisites: Google Cloud CLI installed.
1. Get the service account credentials
Download the food4kids-env-service-account.json file from the Food4Kids Developers shared Google Drive in UW Blueprint. Save it to the repo root (it is gitignored automatically).
2. Authenticate with the service account
gcloud auth activate-service-account --key-file=food4kids-env-service-account.json3. Run the pull script
Mac/Linux:
chmod +x pull-env.sh # only needed once
./pull-env.shWindows (Git Bash or WSL):
bash pull-env.shWindows (PowerShell, if you don't have Git Bash/WSL):
$env:GOOGLE_APPLICATION_CREDENTIALS = "food4kids-env-service-account.json"
gcloud secrets versions access latest --secret="f4k-backend-env" --project="food4kids-473501" | Out-File -Encoding utf8 .envThis writes .env to the repo root. You still need frontend/.env from the PL.
docker-compose up --build| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Backend | http://localhost:8080 |
| API docs | http://localhost:8080/docs (dev only) |
# Check migration status
docker-compose exec backend alembic current
# Generate migration after model changes
docker-compose exec backend alembic revision --autogenerate -m "description"
# Apply migrations
docker-compose exec backend alembic upgrade head
# Connect to DB
docker-compose exec db psql -U postgres -d f4k
# Seed with test data
docker-compose exec backend python -m app.seed_databaseUse the interactive Swagger UI at http://localhost:8080/docs, or see the Postman Setup Guide.
docker-compose up --build # Start with fresh build
docker-compose up -d --build # Start in background
docker-compose down # Stop
docker-compose down --volumes # Stop and remove volumes
docker system prune -a --volumes # Clean up unused resources- Frontend README — project structure, design system, TypeScript conventions
- Backend README — architecture, adding features, scheduled jobs, developer scripts
- CONTRIBUTING.md — version control, linting, testing, CI/CD, VSCode setup
Database connection errors
- Ensure Docker Desktop is running
- Check container health:
docker-compose ps - Verify
.envvalues - Try:
docker-compose down --volumes && docker-compose up --build
"ENOSPC: no space left on device" when building containers
docker system prune -a --volumes
docker-compose up --buildMigration errors
- Check status:
docker-compose exec backend alembic current - Ensure the database is running
- Verify model changes in
app/models/
Firebase authentication issues
- Verify Firebase config in your env files
- Ensure Firebase Admin SDK credentials are properly formatted