An intelligent full-stack application that generates personalized workout plans using Google's Gemini AI, based on user details like age, gender, weight, height, fitness level, and goal.
- ✅ Generate customized workout plans using AI
- ⚛️ React-based frontend with clean form inputs
- 🌐 Express.js backend with Gemini API integration
- 🔐 Secure API key management using environment variables
- 🔁 Handles loading states and error messages gracefully
ai-workout-generator/
│
├── backend/
│ ├── routes/
│ │ └── chatbot.js # API call to Google Generative AI
│ ├── app.js # Express server setup
│ └── .env # Environment variables (API Key)
│
├── frontend/
│ ├── src/
│ │ ├── App.js
│ │ ├── Form.jsx
│ │ └── WorkoutPlan.jsx
│ └── index.html
│
└── README.md
| Layer | Technology |
|---|---|
| Frontend | React.js |
| Backend | Node.js, Express.js |
| AI Model | Google Gemini API |
| Styling | Plain CSS / Tailwind |
| Hosting | Local / Vercel / Render |
- Node.js & npm installed
- A Google Generative AI API key
- Git (for version control)
- Navigate to the
backend/directory:
cd backend
- Install dependencies:
npm install
- Create a
.envfile in thebackendfolder with your Gemini API key:
GOOGLE\_API\_KEY=your\_google\_api\_key\_here
- Run the server:
node app.js
The backend will run on:
📡 http://localhost:3000/api/chatbot
- Navigate to the
frontend/directory:
cd frontend
- Install dependencies:
npm install
- Start the frontend (Vite or CRA):
npm run dev
The frontend will run on:
🎨 http://localhost:5173
Fill out the form with details like:
- Name:
Sameer Senapati - Age:
25 - Gender:
Male - Fitness Level:
Beginner - Goal:
Weight Loss
Click "Get Workout Plan" and wait for the AI to generate a complete plan tailored to your input.
| Variable Name | Description |
|---|---|
GOOGLE_API_KEY |
Your Google Gemini (Generative AI) key |
You can deploy the project using:
Ensure to add your environment variables (API key) securely in deployment settings.
Pull requests and forks are welcome!
git clone [https://github.com/yourusername/ai-workout-generator.git](https://github.com/yourusername/ai-workout-generator.git)
Make your changes, then submit a PR. 🙌
MIT License
- Google Generative AI
- React.js
- Express.js
- All fitness enthusiasts and open-source contributors!
Created with ❤️ by Sameer Senapati

