FastAPI backend for Trainiq Fit - AI-powered fitness coach on WhatsApp.
- Click the button above
- Connect GitHub and select this repo
- Add environment variables from
.env.example - Deploy!
# Install dependencies
pip install -r requirements.txt
# Copy environment file
cp .env.example .env
# Edit .env with your credentials
# Run server
uvicorn main:app --reload- Go to developers.facebook.com
- Create WhatsApp Business app
- Get your Phone Number ID and Access Token
- Set webhook URL:
https://your-domain.com/webhook - Set verify token in environment variables
| Variable | Description |
|---|---|
SUPABASE_URL |
Supabase project URL |
SUPABASE_KEY |
Supabase anon key |
OPENAI_API_KEY |
OpenAI API key |
WHATSAPP_VERIFY_TOKEN |
Webhook verification token |
WHATSAPP_ACCESS_TOKEN |
Meta access token |
WHATSAPP_PHONE_NUMBER_ID |
WhatsApp phone ID |
PORT |
Server port (default: 8000) |
GET /- Health checkGET /health- Detailed health statusGET /webhook- WhatsApp webhook verificationPOST /webhook- Receive WhatsApp messages
- AI-powered intent detection
- Personalized workout generation
- Diet plan recommendations
- Daily workout reminders (7 AM)
- Weekly progress reports
- Natural language understanding