🚀 Live Demo: https://gym-ba2oz8etc-rohan-anthonys-projects-a86489a8.vercel.app
A modern fitness Progressive Web App (PWA) for tracking nutrition and training. Features mobile-first design, offline support, and full CRUD operations for daily check-ins, meals, and workouts.
Stack: React + Vite + Tailwind (frontend) | FastAPI + SQLModel (backend) | PostgreSQL on Neon | Deployed on Vercel
Next Phase: Google OAuth 2.0 authentication for multi-user support
- ✅ Mobile-first PWA with offline support
- ✅ Daily check-ins (weight, steps, training status)
- ✅ Food logging with calorie/macro tracking
- ✅ Workout tracking with exercise sets
- ⏳ Google OAuth authentication (Phase 2)
- ⏳ AI meal photo analysis (Phase 3)
- ⏳ Analytics dashboard with trends (Phase 3)
gymbro-api/: FastAPI backend with SQLModel for persistence.gymbro-web/: Frontend PWA (React + Vite + Tailwind).gymbro-analytics/: Data analysis and reporting (to be added after MVP).infra/: Deployment, IaC, and environment configuration (future work).
The API is a FastAPI service using SQLModel/SQLAlchemy for the database layer and Pydantic v2 for settings/models.
- Entry:
gymbro-api/app/main.py - Config:
gymbro-api/app/config.py(defaults to SQLite;.envsupported) - DB:
gymbro-api/app/db.py(creates engine, initializes tables, provides sessions) - Routers:
gymbro-api/app/routers(health, daily check-ins, food logs, weight entries, workouts, exercise sets) - Models:
gymbro-api/app/models.py
Run the API locally with SQLite (default). Postgres can be used later by setting DATABASE_URL in .env.
cd gymbro-api
python -m venv .venv
.\.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
Then visit http://localhost:8000/docs for interactive API docs. The health endpoint will be added soon.
Create a food log (once tables are initialized):
curl -X POST http://127.0.0.1:8000/food-logs/ \
-H "Content-Type: application/json" \
-d "{\"user_id\":1,\"description\":\"Chicken bowl\",\"calories\":650,\"protein_g\":45,\"carbs_g\":60,\"fat_g\":20}"
List food logs:
curl http://127.0.0.1:8000/food-logs/
- Default dev DB:
sqlite:///./gymbro.db - Override via
.envingymbro-api/:
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/gymbro
From repo root:
python -m venv gymbro-api/.venv
./gymbro-api/.venv/Scripts/activate
pip install -r gymbro-api/requirements.txt
# Frontend env
Set-Content -Path gymbro-web/.env.local -Value "VITE_USER_ID=1"
# Start backend + frontend (opens two terminals)
powershell -ExecutionPolicy Bypass -File scripts/start-all.ps1
- Backend only:
powershell -ExecutionPolicy Bypass -File scripts/start-backend.ps1 -ApiHost 127.0.0.1 -Port 8000 - Frontend only:
powershell -ExecutionPolicy Bypass -File scripts/start-frontend.ps1(add-Buildto runnpm run build). - Vite dev server proxies
/api→http://127.0.0.1:8000. - If schema changes cause sqlite errors, stop services, delete
gymbro-api/gymbro.db, and restart to regenerate tables.
- React 18 + Vite 5 + TypeScript + Tailwind.
- Env:
VITE_USER_IDis required to set theX-User-Idheader (defaults to1if not set). - UI flows: daily check-in (weight/steps/trained/protein/notes), meal logging (description + optional calories), workouts (name + optional note). Lists show newest first.
User,DailyCheckIn,FoodLog,WeightEntry,Workout,ExerciseSet,NutrientEntry.
Live: https://gym-ba2oz8etc-rohan-anthonys-projects-a86489a8.vercel.app
Status: ✅ Production (Frontend + Backend + PostgreSQL)
Guide: DEPLOYMENT_GUIDE.md
- MVP_STATUS.md — Current features and completion status
- IMPLEMENTATION_ROADMAP.md — Development roadmap and next phases
- ARCHITECTURE.md — System architecture and technical decisions
- DEPLOYMENT_GUIDE.md — Vercel deployment instructions
- GOOGLE_OAUTH_SETUP.md — OAuth setup guide (Phase 2)
MIT — see LICENSE.