Skip to content

prathaaaaaaam/FitConnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’ͺ FitConnect β€” Fitness Social Media Platform

A full-stack MERN application that unifies workout tracking, progress visualization, and social fitness networking in one powerful platform.


✨ Features (Iteration 1)

πŸ” Authentication

  • JWT-based registration & login
  • Secure password hashing with bcrypt
  • Protected routes, auto token refresh

πŸ‹οΈ Workout Logging

  • Full exercise library (50+ exercises seeded)
  • Set/rep/weight tracking per exercise
  • Auto-calculate total volume (kg)
  • Personal Record (PR) detection with celebration modal πŸŽ‰
  • Live workout timer
  • Public/private workout toggle

πŸ“Š Dashboard & Analytics

  • Volume progression chart (8-week area chart)
  • Weekly workout frequency bar chart
  • Stats: total workouts, volume, streak, PRs
  • Recent workout history

πŸ“± Social Feed

  • Following feed + Discover tab
  • Like & comment on workouts
  • Real-time exercise previews with weight data

πŸ” Exercise Library

  • 50+ exercises with muscle group filters
  • Search by name or muscle
  • Filter by category / difficulty / equipment
  • Expandable cards with instructions

πŸ‘€ Profiles

  • Public profile pages (/profile/:username)
  • Follow / unfollow users
  • PR showcase section
  • Edit profile (name, bio, goal)

πŸ”Ž Discover

  • Search athletes by name or username
  • Quick follow from search results

πŸ›  Tech Stack (Pure MERN)

Layer Technology
Frontend React 18, React Router v6, Recharts
Backend Node.js, Express.js
Database MongoDB + Mongoose
Auth JWT + bcryptjs
Styling Pure CSS (custom design system)
Build Tool Vite

πŸš€ Quick Start

Prerequisites

  • Node.js v18+
  • MongoDB running locally (or MongoDB Atlas URI)

1. Clone & Install

# Install all dependencies
npm run install:all

2. Environment Setup

The .env files are pre-configured for local development:

  • Server: server/.env β†’ MongoDB URI, JWT secret, port
  • Client: client/.env β†’ API URL

For MongoDB Atlas, update server/.env:

MONGO_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/fitconnect

3. Seed the Exercise Library

npm run seed

This populates MongoDB with 50+ exercises across all muscle groups.

4. Run Development Servers

npm run dev

This starts:

  • Backend β†’ http://localhost:5000
  • Frontend β†’ http://localhost:5173

πŸ“ Project Structure

fitconnect/
β”œβ”€β”€ package.json              ← Root scripts
β”‚
β”œβ”€β”€ server/                   ← Express + Mongoose API
β”‚   β”œβ”€β”€ server.js             ← Entry point
β”‚   β”œβ”€β”€ .env                  ← Environment variables
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ User.js           ← User schema (auth, stats, PRs, social)
β”‚   β”‚   β”œβ”€β”€ Workout.js        ← Workout + sets schema
β”‚   β”‚   └── Exercise.js       ← Exercise library schema
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.js           ← /api/auth (register, login, me)
β”‚   β”‚   β”œβ”€β”€ workouts.js       ← /api/workouts (CRUD, likes, comments)
β”‚   β”‚   β”œβ”€β”€ exercises.js      ← /api/exercises (library + search)
β”‚   β”‚   β”œβ”€β”€ feed.js           ← /api/feed (following + discover)
β”‚   β”‚   └── users.js          ← /api/users (profile, follow, search)
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── auth.js           ← JWT protect middleware
β”‚   └── scripts/
β”‚       └── seedExercises.js  ← 50+ exercise seed data
β”‚
└── client/                   ← React + Vite frontend
    β”œβ”€β”€ index.html
    β”œβ”€β”€ vite.config.js        ← Proxy to backend
    └── src/
        β”œβ”€β”€ main.jsx
        β”œβ”€β”€ App.jsx           ← Router + auth guards
        β”œβ”€β”€ index.css         ← Global design system
        β”œβ”€β”€ api/
        β”‚   └── axios.js      ← Axios instance + interceptors
        β”œβ”€β”€ context/
        β”‚   β”œβ”€β”€ AuthContext.jsx   ← Global auth state
        β”‚   └── ToastContext.jsx  ← Notification system
        β”œβ”€β”€ components/
        β”‚   β”œβ”€β”€ Layout.jsx    ← Sidebar navigation
        β”‚   └── Layout.css
        └── pages/
            β”œβ”€β”€ AuthPage.jsx  ← Login + Register
            β”œβ”€β”€ Dashboard.jsx ← Stats, charts, recent workouts
            β”œβ”€β”€ LogWorkout.jsx ← Full workout builder
            β”œβ”€β”€ Feed.jsx      ← Social activity feed
            β”œβ”€β”€ Exercises.jsx ← Exercise library browser
            β”œβ”€β”€ Profile.jsx   ← User profile + PR showcase
            └── Discover.jsx  ← User search & follow

πŸ”Œ API Endpoints

Auth

Method Route Description
POST /api/auth/register Register new user
POST /api/auth/login Login, get JWT
GET /api/auth/me Get current user

Workouts

Method Route Description
POST /api/workouts Log new workout
GET /api/workouts/my Get own workouts
GET /api/workouts/stats Get stats + charts data
GET /api/workouts/:id Get single workout
POST /api/workouts/:id/like Like / unlike
POST /api/workouts/:id/comment Add comment
DELETE /api/workouts/:id Delete workout

Exercises

Method Route Description
GET /api/exercises List (with filters)
GET /api/exercises/:id Single exercise
POST /api/exercises Create custom exercise

Feed

Method Route Description
GET /api/feed Following feed
GET /api/feed/discover Discover all public

Users

Method Route Description
GET /api/users/search?q= Search users
GET /api/users/:username Public profile
POST /api/users/:id/follow Follow / unfollow
PATCH /api/users/me Update own profile

πŸ—“ Roadmap (Future Iterations)

  • Real-time notifications (Socket.io)
  • Progress photo uploads (Cloudinary)
  • Challenge creation with leaderboards
  • Workout program templates & sharing
  • Gym check-in with location services
  • Form check video upload + community feedback
  • Advanced analytics (muscle balance, PR history charts)
  • Native mobile app (React Native)

πŸ‘₯ Team

Name ID
Pratham Sorte 1032240024
Sarthak Parashetti 1032240067
Tushar Gitte 1032240020
Abhineet Chowdhury 1032240036

Course: Full Stack Web Development Lab β€” MIT World Peace University
Faculty: Dr. Sanket Salvi
Academic Year: 2025-26, Semester 6


πŸ“„ License

MIT License β€” Built for educational purposes.

About

MERN fitness social app with workout logging, set/rep/weight tracking, PR detection, analytics dashboards, social feed, and 50+ exercise library. React 18, Express, MongoDB, JWT, Vite.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors