Skip to content

MaxasOP/CoreMatrix-Fitness

Repository files navigation

🚀 CoreMatrix Fitness Super App - Project Overview

India's Most Advanced Fitness, Nutrition & Wellness Platform

Version: 0.2.0 | Backend: ✅ Complete | Frontend: 🚀 Starting | Status: Production Ready


image

🎯 What is CoreMatrix?

CoreMatrix is not just another fitness app. It's an integrated health & wellness ecosystem that combines:

  • 🌍 Indian-First - Everything designed keeping Indian user's special needs in mind
  • 💪 Fitness Tracking - Workouts with AI/ML form correction (including Yoga poses and exercises)
  • 🍽️ Nutrition Planning - AI dietician with Indian alternatives (scanning Thalis as whole for cal count)
  • 💊 Supplement Intelligence - Smart recommendations with price comparison (shows lowest among sites)
  • 👥 Social Community - Progress reels, leaderboards, challenges (motivate one-another)
  • 🏋️ Trainer Marketplace - Book certified trainers & specialists (both online/offline bookings)
  • 🏪 Gym Discovery - Find gyms near you (google map integration)
  • 🎮 Gamification - Challenges,streaks,rewards,leaderboards (weekly challenges and real time scoreboards)

Screenshot 2026-06-05 125401

📊 Project Statistics

What We've Built (Phase 1)

Metric Count
Database Models 15
API Endpoints 50+
Lines of Backend Code 15,000+
Features Implemented 25+
Revenue Opportunities 8
Supported Languages 6 (ready)

Technology Stack

Backend:    Node.js, Express, MongoDB, Mongoose
Frontend:   React 18, React Router, Tailwind CSS
AI:         Gemini
Media:      Cloudinary
Email:      SendGrid
Database:   MongoDB Atlas (production ready)
Deploy:     Docker, Render, Vercel
Real-time:  Socket.io (ready)

image

🎁 Key Features

🍽️ AI Dietician

✅ Personalized meal plans based on:

  • Age, weight, height, activity level
  • Fitness goals
  • Budget constraints
  • Dietary preferences (vegetarian, vegan, jain, non-veg)
  • Indian food alternatives
  • Monthly cost estimation

Example:

Input: 25yr, 75kg, muscle gain goal, ₹5000/month, vegetarian
Output: 
  - Breakfast: Paneer Paratha + Curd
  - Lunch: Dal Makhani + Rice
  - Dinner: Grilled Tilapia + Roti
  - Macros: 150g protein, 250g carbs, 70g fat
  - Cost: ₹6200/month
  - Alternatives: Sprouts, Soya, Eggs, Lentils

💊 Smart Supplement Engine

✅ AI-powered supplement recommendations with:

  • Price comparison (Amazon, Flipkart, HealthKart, MuscleBlaze)
  • Authenticity scoring (batch verification, QR codes)
  • Lowest verified price highlights
  • User reviews & ratings
  • Affiliate commission tracking

Example:

Whey Protein Comparison:
  HealthKart:   ₹4,699 ⭐ (Lowest)
  Flipkart:     ₹4,999
  Amazon:       ₹5,200
Authenticity: 95/100 ✅ Verified Sellers

📊 Indian Leaderboards

✅ Compete on multiple levels:

  • National: Top performers across India
  • City-wise: Mumbai, Delhi, Bangalore, etc.
  • College-wise: IIT-B, DU, Anna, etc. (Viral potential!)
  • Company-wise: Employee wellness competitions

Categories:

  • Top Fat Loss (% weight lost)
  • Top Muscle Gain
  • Most Consistent
  • Longest Streak
image

🏆 Fitness Challenges

✅ Engaging community challenges:

  • 10,000 Steps Challenge
  • 30-Day Yoga Challenge
  • 100 Pushups Challenge
  • 30-Day Fat Loss Challenge
  • Sponsored Challenges (revenue!)

Features:

  • Leaderboard tracking
  • Reward points
  • Progress verification
  • Completion badges

📱 Progress Reels

✅ Social fitness sharing:

  • Transformation photos
  • Workout videos
  • Yoga sessions
  • Meal posts
  • Journey updates
  • Smart feed (similar goals, age, city)
  • AI content moderation

❤️ Health Twin Intelligence

✅ 7-factor health assessment:

  1. Fitness Age - Your body's fitness level
  2. Strength Score - Muscular capability
  3. Recovery Score - Recovery quality
  4. Mobility Score - Flexibility
  5. Nutrition Score - Diet quality
  6. Consistency Score - Habit strength
  7. Overall Health Score (0-100)

image

📁 Project Structure

CoreMatrix-Fitness/
├── backend/
│   ├── models/ (15 MongoDB schemas) ✅
│   ├── routes/ (50+ API endpoints) ✅
│   ├── services/ (AI integrations) ✅
│   ├── controllers/ (business logic)
│   ├── middleware/ (auth, validation)
│   ├── scripts/ (database seeding) ✅
│   ├── server.js ✅
│   ├── package.json ✅
│   └── .env.example ✅
├── client/
│   ├── src/
│   ├── public/
│   └── package.json
├── FEATURES.md ✅ (Comprehensive API docs)
├── SETUP_GUIDE.md ✅ (Step-by-step setup)
├── BUILD_SUMMARY.md ✅ (What we built)
├── DEVELOPMENT_CHECKLIST.md ✅ (Roadmap)
├── ENV_CHECKLIST.md ✅ (Environment variables checklist)
├── ENV_VARIABLES_SETUP.md ✅ (Detailed environment setup guide)
└── QUICK_START.md ✅ (Quick start guide)

🚀 Getting Started (3 Steps)

Prerequisites

  • Node.js 16+ installed
  • npm installed
  • MongoDB instance (local or Atlas)
  • Redis instance (local or cloud) - for caching, real-time features
  • Basic API keys from services (OpenAI, Razorpay/Stripe, SendGrid)

1️⃣ Clone & Setup

# Clone the repository
git clone https://github.com/your-repo/CoreMatrix-Fitness.git
cd CoreMatrix-Fitness

# Install backend dependencies
cd backend
npm install

# Install frontend dependencies
cd ../client
npm install

2️⃣ Configure Environment

# Copy backend environment template
cd backend
cp .env.example .env

# Edit .env with your API keys (see ENV_VARIABLES_SETUP.md for details)
# Minimum required for basic setup:
# - MONGO_URI
# - JWT_SECRET
# - NODE_ENV=development
# - PORT=4000
# - OPENAI_API_KEY (for AI features)
# - RAZORPAY_KEY_ID & RAZORPAY_KEY_SECRET (for payments)
# - SENDGRID_API_KEY (for email)

nano .env

# For the frontend, create client/.env.local (if not using Vercel env vars)
# This will be automatically picked up by Create React App
cat > client/.env.local << EOF
REACT_APP_API_URL=http://localhost:4000/api
EOF

3️⃣ Start Services

Terminal 1: Backend

cd backend
npm run dev
# Backend runs on http://localhost:4000

Terminal 2: Frontend

cd client
npm start
# Frontend runs on http://localhost:3000

4️⃣ Verify Setup

  • Open http://localhost:3000 in your browser.
  • Backend health check: http://localhost:4000/api/health
  • Try signup/login.
  • Visit Dashboard.

5️⃣ Populate Sample Data (Optional)

# In backend directory
node scripts/seedDatabase.js

🔑 Environment Variables

For a complete and detailed list of all environment variables, their purpose, and how to obtain them, please refer to:


☁️ Deployment Notes

  • Backend: Deployed on Render as a container. Ensure MONGO_URI, JWT_SECRET, and other necessary API keys are set in Render's environment variables for the service.
  • Frontend: Deployed on Vercel (root set to client/). Configure REACT_APP_API_URL to point to your deployed backend URL (e.g., https://your-render-backend.onrender.com/api) in Vercel's Environment Variables.
  • Docker: Dockerfile is included for local development and potential containerized deployments. docker-publish.yml GitHub Actions workflow can build and push images to GitHub Container Registry (GHCR).

📋 API Reference (High-Level)

  • GET /api/health — returns { status: 'ok' } for health checks.
  • POST /api/auth/register — create an account; response includes token.
  • POST /api/auth/login — login; response includes token.
  • PUT /api/auth/profile — update user profile (authenticated).
  • GET /api/workouts — returns workouts for the authenticated user.
  • POST /api/workouts — create a workout (authenticated, with validation).
  • PUT /api/workouts/:id — update a workout (authenticated, with validation).
  • DELETE /api/workouts/:id — delete a workout (authenticated).
  • GET /api/meals — returns meals for the authenticated user.
  • POST /api/meals — create a meal (authenticated, with validation).
  • PUT /api/meals/:id — update a meal (authenticated, with validation).
  • DELETE /api/meals/:id — delete a meal (authenticated).
  • GET /api/tip — get a daily nutrition tip (authenticated).
  • POST /api/supplements/recommend — get AI-powered supplement recommendations (authenticated).
  • GET /api/supplements/search — search supplements.
  • GET /api/supplements/:supplementId/prices — get price comparison for a supplement.
  • GET /api/challenges — list active challenges.
  • POST /api/challenges/:challengeId/join — join a challenge (authenticated).
  • POST /api/challenges/:challengeId/update-progress — update progress in a challenge (authenticated).
  • GET /api/challenges/user-challenges — get authenticated user's challenges.
  • POST /api/video/analyze — upload and analyze workout video (authenticated).
  • GET /api/analytics/user-analytics — get user analytics (authenticated).

🐛 Troubleshooting

  • Blank frontend or dashboard not loading:

    • Ensure REACT_APP_API_URL on Vercel points to your deployed backend API (e.g. https://your-render-backend.onrender.com/api).
    • Check browser console for CORS or 405/500 errors.
    • Verify your backend service is running and accessible from the frontend.
  • Registration / login failing (401 Unauthorized):

    • Confirm the backend URL is correctly set in client/.env.local (for local development) or Vercel environment variables (for deployment).
    • Inspect backend logs (local console or Render logs) for stack traces.
    • Ensure JWT_SECRET is correctly configured and matches the secret used to sign tokens.
  • 500 errors from backend:

    • Check backend logs for exact error messages. The centralized error handler should provide more informative output.
    • Common causes include database connection issues (MONGO_URI), invalid data leading to Mongoose errors (now partially mitigated by express-validator), or unhandled exceptions.
  • Docker build errors on Render:

    • Ensure your Dockerfile creates and uses a non-root user properly. If chown or file permissions are issues, review the Dockerfile.

🛠️ Where to look in the code (Quick Links)


🎯 Next Steps and Recommendations

  1. Frontend Development: Continue building out the remaining frontend components for dashboard, meal planning, supplement marketplace UI, etc., as outlined in DEVELOPMENT_CHECKLIST.md.
  2. Responsiveness and UI/UX Enhancements: Address specific responsiveness issues and integrate more engaging UI elements (animations, SVGs, icons) to enhance user experience, ensuring no app bloat.
  3. Refine Authentication and Authorization: Implement robust authorization (e.g., admin roles) as noted in backend/routes/challenges.js for POST endpoints.
  4. Testing: Implement comprehensive unit, integration, and end-to-end tests for both frontend and backend.
  5. Performance Optimization: Review and implement caching strategies (Redis), image optimization, and API response pagination as suggested in BUILD_SUMMARY.md.

📜 License

MIT License - See LICENSE file for details


🚀 Let's Build!

CoreMatrix has the potential to become India's #1 Fitness & Wellness Platform.Completely open to suggestions and your valuable input.

We're just getting started! 💪

Current Status: Backend MVP Complete ✅ | Frontend Development 🚀 | Let's Go! 🔥 Integration of some features is pending!! Kindly provide your love and support if possible <3

About

India's all-in-one AI-powered fitness platform featuring workout tracking, AI form correction, nutrition planning, supplement price comparison, trainer booking, gym discovery, and a social fitness community.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors