A comprehensive fitness application powered by artificial intelligence that provides personalized workout plans, progress tracking, and intelligent coaching recommendations.
- AI-Powered Workout Planning: Generate personalized workout plans based on user profile and goals
- Real-time Progress Tracking: Track workouts, sets, reps, and overall fitness progress
- Smart Calendar: Visual progress calendar with workout completion status
- AI Coach Chat: Interactive AI assistant for fitness guidance and questions
- Premium Analytics: Advanced workout analytics and insights (Premium feature)
- Google OAuth Integration: Seamless authentication with Google accounts
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Subscription Management: Free and Premium tier functionality
This application follows a modern full-stack architecture:
- Frontend: React 18 + TypeScript + Vite
- Backend: Node.js + Express + MongoDB
- Authentication: JWT + Google OAuth
- AI Integration: OpenAI API for workout generation and chat
- Deployment: Netlify (Frontend) + Railway/Render (Backend)
fitnai/
├── frontend/ # React TypeScript application
├── backend/ # Node.js Express API
├── archive/ # Data import utilities
└── docs/ # Documentation
- Node.js 18+ and npm
- MongoDB database
- OpenAI API key
- Google OAuth credentials (optional)
-
Clone the repository
git clone <repository-url> cd fitnai
-
Setup Backend
cd backend npm install cp .env.sample .env # Configure your environment variables npm run dev
-
Setup Frontend
cd frontend npm install cp .env.example .env # Configure your environment variables npm run dev
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
PORT=8000
MONGO_URI=mongodb://localhost:27017
DB_NAME=fitnation
ACCESS_TOKEN_SECRET=your-jwt-secret
REFRESH_TOKEN_SECRET=your-refresh-secret
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_EXPIRY=10d
OPENAI_API_KEY_1=your-openai-api-key
MODEL_NAME=gpt-4
GOOGLE_CLIENT_ID=your-google-client-id
CLOUDINARY_CLOUD_NAME=your-cloudinary-name
CLOUDINARY_API_KEY=your-cloudinary-key
CLOUDINARY_API_SECRET=your-cloudinary-secret
VITE_API_BASE_URL=http://localhost:8000/api/v1
VITE_NODE_ENV=development
VITE_GOOGLE_CLIENT_ID=your-google-client-id
- Frontend Documentation
- Backend Documentation
- API Documentation
- Component Architecture
- Integration Testing
The application supports multiple authentication methods:
- Email/Password: Traditional registration and login
- Google OAuth: One-click authentication with Google accounts
- JWT Tokens: Secure session management with access and refresh tokens
- Basic workout tracking
- Limited AI suggestions (5/month)
- Community access
- Basic progress calendar
- Unlimited AI coaching
- Advanced analytics
- Custom workout creation
- Nutrition planning
- Priority support
- Export capabilities
cd frontend
npm run build
# Deploy dist/ folder to Netlify
cd backend
# Configure environment variables on your platform
# Deploy using platform-specific instructions
cd frontend
npm run test
npm run test:coverage
cd backend
npm run test
npm run test:integration
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Contact: support@fitai.com
- Documentation: docs.fitai.com
- OpenAI for AI capabilities
- MongoDB for database solutions
- Netlify for frontend hosting
- All contributors and testers
Built with ❤️ by the FitAI Team