A fitness coaching mobile app with an AI-powered coach that combines daily check-ins, nutrition tracking, and adaptive coaching based on user progress.
Sleek Coach helps users achieve their fitness goals through:
- Daily Check-ins: Track weight, mood, energy levels, and sleep quality
- Progress Photos: Secure photo storage with side-by-side comparisons
- Nutrition Tracking: Manual logging or MyFitnessPal CSV import
- AI Coach: Personalized guidance using LLM with tool-calling architecture
- Offline Support: Full functionality without network, with automatic sync
flowchart TB
subgraph Mobile["Mobile App (React Native/Expo)"]
UI[UI Components]
TQ[TanStack Query]
ZS[Zustand Stores]
MMKV[(MMKV/SQLite)]
end
subgraph Backend["Backend (FastAPI)"]
API[API Routes]
Auth[Auth Module]
Coach[AI Coach]
Services[Business Logic]
end
subgraph AI["AI Layer"]
Orch[Orchestrator]
Tools[Tool Registry]
Policies[Safety Policies]
LLM[LLM Provider]
end
subgraph Storage["Storage"]
PG[(PostgreSQL)]
Redis[(Redis)]
S3[(S3/MinIO)]
end
subgraph Infra["Infrastructure (AWS)"]
ALB[Application Load Balancer]
ECS[ECS Fargate]
RDS[RDS PostgreSQL]
S3Bucket[S3 Buckets]
end
UI --> TQ
TQ --> ZS
ZS --> MMKV
TQ -->|HTTPS| ALB
ALB --> ECS
ECS --> API
API --> Auth
API --> Coach
API --> Services
Coach --> Orch
Orch --> Tools
Orch --> Policies
Orch --> LLM
Services --> PG
Services --> Redis
Services --> S3
ECS --> RDS
ECS --> S3Bucket
ultracoach/
βββ apps/
β βββ api/ # FastAPI backend
β β βββ app/
β β β βββ api/v1/ # API routes
β β β βββ auth/ # Authentication
β β β βββ users/ # User management
β β β βββ checkins/ # Check-in logging
β β β βββ nutrition/ # Nutrition tracking
β β β βββ photos/ # Photo management
β β β βββ coach_ai/ # AI coaching system
β β β βββ integrations/# External integrations
β β βββ tests/ # pytest tests
β β βββ alembic/ # Database migrations
β βββ mobile/ # React Native (Expo) app
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ screens/ # Screen components
β β βββ navigation/ # React Navigation setup
β β βββ services/ # API clients
β β βββ stores/ # Zustand state
β β βββ hooks/ # Custom hooks
β βββ __tests__/ # Jest tests
βββ infra/ # Terraform infrastructure
β βββ modules/ # Reusable modules
β βββ environments/ # Staging/production configs
βββ docs/ # Documentation
| Layer | Technology |
|---|---|
| Mobile | React Native, Expo, TypeScript, React Navigation |
| State | TanStack Query (server), Zustand (client), MMKV |
| UI | React Native Paper (Material Design 3) |
| Backend | FastAPI, SQLModel, Pydantic, Python 3.12 |
| Database | PostgreSQL 15+, Redis |
| Storage | AWS S3 (MinIO for local dev) |
| AI | OpenAI/Anthropic APIs with tool-calling |
| Infrastructure | AWS ECS Fargate, RDS, ALB, Terraform |
| CI/CD | GitHub Actions |
- Docker & Docker Compose
- Python 3.12+ (for local backend development)
- Node.js 18+ (for mobile development)
- uv (Python package manager)
# Clone the repository
git clone https://github.com/rlefkowitz/sleek-coach.git
cd sleek-coach
# Set up environment variables
cd apps/api
cp .env.example .env
# Edit .env if you need to customize (defaults work out-of-box)
# Start all services with Docker Compose
docker compose up --build
# The API is available at http://localhost:8000
# Swagger docs at http://localhost:8000/docs
# ReDoc at http://localhost:8000/redocLocal Development (without Docker):
cd apps/api
# Install dependencies with uv
uv sync
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Run database migrations
uv run alembic upgrade head
# Start the development server
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000This app uses React Native New Architecture and requires a development build (Expo Go is not supported).
cd apps/mobile
# Set up environment variables
cp .env.example .env
# Edit .env to point to your API server (defaults to localhost:8000)
# Install dependencies
npm install
# Generate native projects (first time only)
npx expo prebuild
# Build and run on iOS simulator (requires Xcode)
npx expo run:ios
# Build and run on Android emulator (requires Android Studio)
npx expo run:android
# After initial build, start the dev server for hot reload
npx expo start --dev-clientBackend:
cd apps/api
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=app --cov-report=html
# Run specific test file
uv run pytest tests/unit/test_auth.py
# Run linting and type checking
uv run ruff check .
uv run mypy .Mobile:
cd apps/mobile
# Run unit tests
npm test
# Run with coverage
npm test -- --coverage
# Run E2E tests (Detox)
npx detox build --configuration ios.sim.debug
npx detox test --configuration ios.sim.debugBoth the backend and mobile apps use .env files for configuration. Template files are provided.
Copy the template and customize as needed:
cd apps/api
cp .env.example .envSee apps/api/.env.example for all available options. Key variables:
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Docker: db:5432, Local: localhost:5432 |
REDIS_URL |
Redis connection string | Docker: redis:6379, Local: localhost:6379 |
OPENAI_API_KEY |
Required for AI coach features | (none) |
S3_ENDPOINT_URL |
MinIO/S3 endpoint | Docker: http://minio:9000 |
Copy the template and customize as needed:
cd apps/mobile
cp .env.example .envSee apps/mobile/.env.example for all available options. Key variable:
| Variable | Description | Default |
|---|---|---|
EXPO_PUBLIC_API_URL |
Backend API URL | http://localhost:8000 |
Note: For physical devices, use your computer's IP address instead of localhost.
- Create a feature branch from
main - Make changes following the code style guidelines
- Run tests and ensure they pass
- Submit a PR for review
- Merge after approval
- Python: Ruff for linting, Black formatting, mypy for types
- TypeScript: ESLint + Prettier, strict mode enabled
- Commits: Conventional commits (
feat:,fix:,docs:, etc.)
Automatic deployment on push to main branch via GitHub Actions.
Manual approval required. See Infrastructure README for details.
# Deploy infrastructure
cd infra
terraform init
terraform plan -var-file=environments/production.tfvars
terraform apply -var-file=environments/production.tfvars| Document | Description |
|---|---|
| Product Requirements (PRD) | Business goals, user personas, feature scope |
| Technical Design (TDD) | Architecture decisions, data flow |
| API Documentation | Complete endpoint reference |
| Database Schema | ERD, models, migrations |
| AI Coach System | Tools, safety policies, prompts |
| Security | Security architecture, OWASP compliance |
| Performance | Optimization strategies |
| Runbook | Operations, incidents, rollbacks |
| Milestones | Implementation progress |
Base URL: /api/v1
| Module | Endpoints | Description |
|---|---|---|
| Auth | /auth/* |
Register, login, token refresh, logout |
| Users | /me/* |
Profile, goals, preferences, export |
| Check-ins | /checkins/* |
Weight logging, trends, sync |
| Nutrition | /nutrition/* |
Daily macros, MFP import |
| Photos | /photos/* |
Presigned uploads, listing |
| Coach | /coach/* |
Chat, plans, insights |
See API Documentation for complete reference.
Private - All rights reserved
This is a private project. Contact the maintainer for contribution guidelines.