Welcome to the Student Fitness AI Chat App — an interactive fitness dashboard built with Vite + React on the frontend and Express.js on the backend. This app allows users to generate personalized 7-day workout plans, track their exercise completion, and level up as they make progress.
- 🔐 User-Friendly Interface: Form-based input to tailor workouts to your goals, weight, and experience.
- 📅 Routine Generation: AI-powered 7-day workout schedule with daily breakdowns.
- 🎮 Gamified Progression: Level up by completing exercises and visualize progress with a level bar.
- 🔁 Exercise Replacement: Replace any exercise with a predefined custom alternative.
- ☁️ Persistent XP: XP and levels are stored server-side for consistent progress.
- Tailwind CSS for sleek styling
- Framer Motion for animations
- React hooks for state and lifecycle management
- Handles XP tracking and AI-generated routines
- Fetches and stores user XP
- Accepts form input from frontend and returns generated workout plans
- Node.js and npm
- OpenAI API key (for AI-generated routines)
git clone https://github.com/AspireVenom/AI_Trainer
cd AI_Trainer# Install server dependencies:
cd server
npm install
cd ..
# Install client dependencies:
cd client
npm installCreate a .env file in server/:
OPENAI_API_KEY=your_openai_key_hereCreate a .env file in client/ (or copy client/.env.example) and set the API base URL if needed:
# URL where the Express server is running
VITE_API_URL=http://localhost:5050Also ensure you have a valid firebase.ts config in client/src/, but do not commit it.
# Terminal 1: Start the server
cd server/
npm start
# Terminal 2: Start the client
cd client
npm run devVisit: http://localhost:5173
Server unit tests use Node's built-in runner:
cd server
npm testGenerates workout plan based on user profile
- Request:
{ message: string } - Response:
{ reply: string }
Returns the current XP stored for the user
- Response:
{ xp: number }
Adds XP (e.g. 1 point per completed exercise)
- Request:
{ amount: number } - Response:
{ xp: number }
server/.envandclient/src/firebase.tsare gitignored- Do not expose secrets in client-facing code
- User login system with Firebase Auth
- Exercise database with images and difficulty levels
- Custom workout plans via drag-and-drop
- Leaderboards for top performers
MIT
- OpenAI for GPT routines
- Tailwind & Framer Motion for UI magic
- Firebase for potential auth/storage
Built with 💪 \ BY DOUGLAS ALVARINO

