READMEmaster
We couldn't render this README. Read it on GitHub
Bodybuilding AI Coach API
A serverless API for an AI-powered bodybuilding coach that provides personalized workout plans, progress tracking, and real-time feedback.
Features
- Personalized workout plan generation
- Progress tracking and metrics
- AI coach chat interface
- User profile management
- Plan versioning and history
- Real-time workout feedback
Project Structure
bodybuilding_serverless_api/
├── src/
│ ├── models/ # Data models
│ ├── services/ # Business logic
│ │ ├── chat/ # AI chat functionality
│ │ └── core/ # Core services
│ └── aws/ # AWS service wrappers
├── schema/ # JSON schemas
├── tests/ # Test suite
└── config files # Configuration files
Documentation
Detailed documentation is available in the docs directory:
- Bodybuilding API Documentation - Complete API structure and components
- Implementation Plan - Project implementation phases
- DynamoDB Tables Comparison - Database schema changes
- Handler Comparison - API handler transformations
Setup
- Install dependencies:
npm install -g serverless
pip install -r requirements.txt
- Configure AWS credentials:
serverless config credentials --provider aws --key YOUR_KEY --secret YOUR_SECRET
- Deploy:
serverless deploy --stage dev
Development
- Use
serverless offlinefor local development - Run tests with
pytest - Format code with
black
API Endpoints
Plans
- POST /plans/create - Create new workout plan
- POST /plans/save - Save plan changes
- GET /plans/list - List user's plans
- GET /plans/versions/{planId} - Get plan versions
Users
- POST /users/create - Create user profile
- PUT /users/{userId} - Update user profile
Progress
- POST /progress/{userId} - Update progress
- GET /progress/{userId} - Get progress history
Chat
- POST /plans/chat - Chat with AI coach
- GET /plans/{planId}/chat-history - Get chat history
Environment Variables
Required environment variables:
STAGE- Deployment stage (dev/prod)COGNITO- Cognito secret name- Various table names (see serverless.yml)
Contributing
- Fork the repository
- Create a feature branch
- Submit a pull request
License
MIT License