A MERN stack fitness coach with a chat assistant (Gemini), workout logging, and progress tracking.
- Landing, authentication, and onboarding flows
- Dashboard with workout logs and progress charts (Recharts)
- Floating chat widget connected to Gemini
- Profile settings and onboarding reset
- MongoDB persistence for users, logs, and chat history
- Frontend: React + Vite + Tailwind CSS
- Backend: Node.js + Express + Mongoose
- Database: MongoDB
- AI: Google Gemini API
client/ # React frontend
server/ # Express backend
cd server
npm install
Create a .env in server/ (see .env.example):
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=models/gemini-2.5-flash
CLIENT_ORIGIN=http://localhost:5173
Run the API:
npm run dev
cd client
npm install
Create client/.env:
VITE_API_URL=http://localhost:5000
Run the UI:
npm run dev
POST /api/auth/register- create accountPOST /api/auth/login- loginGET /api/profile- get user profilePUT /api/profile- update profile/goals/onboardingPOST /api/profile/reset- reset onboardingPOST /api/logs- create workout logGET /api/logs- list workout logsGET /api/progress- progress chart dataPOST /api/gemini/chat- chat with GeminiGET /api/gemini/history- chat history
Backend:
npm run dev- start server with nodemonnpm start- start server
Frontend:
npm run dev- start Vite dev servernpm run build- production build