MuscleMap AI is a full-stack fitness intelligence platform that combines an interactive anatomical muscle map with an AI-powered personal coach. Users can explore muscle groups, discover targeted exercises, generate custom diet plans, track their BMI, and get real-time coaching from an AI trained to think like an elite gym coach.
An SVG-based interactive anatomical model covering the full body. Click any muscle group to instantly explore curated exercises with GIF demonstrations, step-by-step instructions, difficulty levels, equipment requirements, and YouTube tutorial links.
A real-time AI chatbot powered by Llama 3.1 (via Groq). The coach mirrors the user's language (English or Bulgarian), responds like a real gym coach, and is aware of premium user profiles to give tailored advice based on age, weight, and goals.
- Free Tier: 5 messages per rolling 24-hours.
- MuscleMap Pro: Unlimited messages and deep contextual context injection.
Calculates daily caloric needs using the Harris-Benedict equation adjusted for activity level. Generates four structured diet blueprint plans: Balanced, High Protein, Ketogenic, and Low Fat β each with macro splits and recommended foods.
Calculates and categorises Body Mass Index with personalised advice based on result (Underweight, Normal, Overweight, Obese).
Save and manage favourite exercises to a personal collection. Bookmarks are stored per user account and accessible from any device.
An achievement system that awards badges for platform milestones: first login (Rookie), email verification (Verified), completing a physical profile (Nutrition Analyst), saving 10+ exercises (Librarian), enabling dark mode (Night Owl), and switching to Bulgarian (Bilingual).
Full app-wide localization using i18next. Every UI string β including the AI chatbot interface β switches seamlessly between English and Bulgarian.
- Email/password registration with email verification
- Google OAuth login
- JWT-based session management
- Forgot/reset password via email link
A fully integrated Stripe checkout flow that unlocks MuscleMap Pro. Premium users receive:
- Unlimited AI Coach Messages (with deep physical profile context injected).
- AI Custom Workout Generator (Premium locked).
- Unlimited Bookmarks (Free users restricted to 10).
- Exclusive
Pro Athleteuser badge.
A fully functional contact form connected to a backend API endpoint. Submissions are sent directly to the support email (musclemap@yahoo.com) with styled HTML formatting, and users receive an automatic confirmation email. Rate-limited to 3 submissions per 15 minutes.
Full legal infrastructure for production readiness:
- Terms and Conditions β usage rules and liability
- Privacy Policy β GDPR-compliant data handling disclosure
- Cookie Policy β localStorage and third-party cookie transparency
- Refund Policy β Stripe-compliant digital product refund terms
- FAQ β interactive accordion with common questions
- About β platform mission and feature overview
All accessible via |-separated footer links.
GDPR-compliant cookie consent banner that appears once on first visit. User choice is persisted in localStorage and the banner never reappears.
| Technology | Purpose |
|---|---|
| React 18 + TypeScript | Component framework with type safety |
| Vite | Build tool and dev server |
| Tailwind CSS | Utility-first styling |
| shadcn/ui | Pre-built accessible UI components |
| i18next | EN/BG localization |
| React Router v6 | Client-side routing |
| TanStack Query | Server state management |
| Lucide React | Icon library |
| ReactBits (custom) | Scroll, tilt, aurora, spotlight animations |
| ReactMarkdown | Renders AI markdown responses |
| @vercel/analytics | Page view tracking |
| @vercel/speed-insights | Performance monitoring |
| Technology | Purpose |
|---|---|
| Node.js + Express | RESTful API server |
| MongoDB + Mongoose | User data, exercises, bookmarks |
| Groq SDK | Llama 3.1 inference for the AI coach |
| JWT | Authentication tokens |
| Nodemailer | Email verification & password reset |
| bcrypt | Password hashing |
| Stripe | Subscription & Checkout Sessions |
| express-rate-limit | API rate limiting & anti-spam |
| CORS | Cross-origin resource control |
| Service | Role |
|---|---|
| Vercel | Frontend hosting + analytics |
| Koyeb | Backend hosting |
| MongoDB Atlas | Cloud database |
| Groq | AI inference API |
| Stripe | Payment processing |
- Node.js 18+
- MongoDB (local or Atlas)
- Groq API key (console.groq.com)
- Stripe API key (stripe.com)
git clone https://github.com/itsnotsimple/muscle-map-main.git
cd muscle-map-main# Install frontend dependencies
cd client && npm install
# Install backend dependencies
cd ../server && npm installCreate server/.env:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
GROQ_API_KEY=your_groq_api_key
EMAIL_USER=your_email@gmail.com
EMAIL_PASS=your_gmail_app_password
EMAIL_SERVICE=Gmail
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
FRONTEND_URL=http://localhost:8080
CLIENT_URL=http://localhost:8080# Terminal 1 β Backend
cd server
node server.js
# Terminal 2 β Frontend
cd client
npm run devFrontend: http://localhost:8080
Backend API: http://localhost:5000/api
The client/ directory is deployed to Vercel. The production API URL is set in client/src/services/api.ts:
const API_URL = IS_LOCAL
? 'http://localhost:5000/api'
: 'https://your-koyeb-backend.koyeb.app/api';The server/ directory is deployed to Koyeb. Add all variables from .env as Environment Variables in the Koyeb dashboard β especially GROQ_API_KEY, which is required for the AI coach to function in production.
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/register |
β | Register new user |
| POST | /api/login |
β | Login with email/password |
| POST | /api/google |
β | Google OAuth login |
| GET | /api/verify/:token |
β | Verify email address |
| POST | /api/forgot-password |
β | Send reset password email |
| POST | /api/reset-password/:token |
β | Reset password |
| GET | /api/user/status |
β | Get current user info |
| PUT | /api/user/profile |
β | Update physical profile |
| DELETE | /api/user/profile |
β | Delete account |
| PUT | /api/user/badges |
β | Award a badge |
| GET | /api/user/bookmarks |
β | Get saved exercises |
| POST | /api/user/bookmark |
β | Save an exercise |
| DELETE | /api/user/bookmarks/:id |
β | Remove a bookmark |
| GET | /api/muscles/:key |
β | Get exercises for a muscle |
| GET | /api/diets |
β | Get all diet plans |
| GET | /api/chat/status |
β | Get daily AI message limit status |
| POST | /api/chat |
β | Send message to AI coach |
| POST | /api/workout/generate |
β | Generate AI workout plan |
| GET | /api/workout/plans |
β | Get saved workout plans |
| DELETE | /api/workout/plans/:id |
β | Delete a workout plan |
| POST | /api/contact |
β | Submit contact form (sends email) |
| POST | /api/stripe/create-checkout-session |
β | Create Stripe checkout session |
| POST | /api/stripe/webhook |
β | Stripe payment webhook |
MIT Β© itsnotsimple