Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

43 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


🎯 The Problem We Solved

❌  Before FitTrack Pro          βœ…  With FitTrack Pro
─────────────────────────        ──────────────────────────────
App 1 β†’ Workout tracking         βœ”  Workouts + Exercises + Mood
App 2 β†’ Calorie / Nutrition      βœ”  Meals + Macros + Food Search
App 3 β†’ Water intake             βœ”  Quick-add + Progress Ring
App 4 β†’ Sleep tracker            βœ”  Sleep Quality + REM Tracking
App 5 β†’ Body measurements        βœ”  Progress Photos + Charts
App 6 β†’ Goals                    βœ”  Goals + Milestones + Reminders
─────────────────────────        ──────────────────────────────
6 separate apps                  1 unified platform, 3 panels

πŸ—οΈ Architecture β€” 3 Role-Based Panels

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        πŸ‹οΈ  FitTrack Pro                              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   πŸ‘€  USER PANEL  β”‚  πŸ…  TRAINER PANEL   β”‚    πŸ›‘οΈ  ADMIN PANEL        β”‚
β”‚   ─────────────── β”‚  ──────────────────  β”‚  ─────────────────────    β”‚
β”‚   18 pages        β”‚  5 pages             β”‚  8 pages                  β”‚
β”‚   Own data only   β”‚  Clients + own data  β”‚  Full system access       β”‚
β”‚                   β”‚                      β”‚                           β”‚
β”‚   β€’ Dashboard     β”‚  β€’ Dashboard         β”‚  β€’ Dashboard              β”‚
β”‚   β€’ Workouts      β”‚  β€’ My Clients        β”‚  β€’ User Management        β”‚
β”‚   β€’ Nutrition     β”‚  β€’ Client Details    β”‚  β€’ Trainer Management     β”‚
β”‚   β€’ Water Log     β”‚  β€’ Workout Templates β”‚  β€’ Trainer Requests       β”‚
β”‚   β€’ Sleep Log     β”‚  β€’ Profile/Settings  β”‚  β€’ Assigned Trainers      β”‚
β”‚   β€’ Progress      β”‚                      β”‚  β€’ Feedbacks              β”‚
β”‚   β€’ Goals         β”‚                      β”‚  β€’ Create Trainer         β”‚
β”‚   β€’ Achievements  β”‚                      β”‚  β€’ Profile/Settings       β”‚
β”‚   β€’ Browse Trainersβ”‚                     β”‚                           β”‚
β”‚   β€’ Profile       β”‚                      β”‚                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⚑ Tech Stack

Layer Technology Purpose
🎨 UI Framework React 19 + Vite 6 Component-based frontend
🎭 Styling Tailwind CSS v4 + Inter font Utility-first with custom design tokens
✨ Animations Framer Motion + react-transition-group Page transitions & micro-animations
πŸ“Š Charts Chart.js v4 + react-chartjs-2 Line, Bar, Doughnut, Radar charts
πŸ“ Forms React Hook Form + Yup Validation + form state management
πŸ”— Routing React Router v7 Client-side navigation
πŸ“‘ HTTP Axios + interceptors API requests + token refresh
πŸ–₯️ Backend Node.js + Express.js REST API server
πŸƒ Database MongoDB Atlas + Mongoose Cloud NoSQL database
πŸ” Auth JWT + bcryptjs Tokens in cookies + password hashing
☁️ Images Cloudinary + Multer Cloud image storage
πŸ›‘οΈ Security Helmet + Rate Limit + HPP + Mongo Sanitize API hardening
πŸ“‹ Logging Morgan HTTP request logging

πŸ“ Project Structure

FitTrackPro/
β”‚
β”œβ”€β”€ πŸ“ client/                        ← React + Vite Frontend
β”‚   └── src/
β”‚       β”œβ”€β”€ πŸ“ components/common/     ← Button, Card, Modal, Input, StatCard, Spinner...
β”‚       β”œβ”€β”€ πŸ“ contexts/              ← AuthContext (global auth state)
β”‚       β”œβ”€β”€ πŸ“ hooks/                 ← useAsync, useDebounce
β”‚       β”œβ”€β”€ πŸ“ layouts/               ← PublicLayout, DashboardLayout, AdminLayout, TrainerLayout
β”‚       β”œβ”€β”€ πŸ“ pages/
β”‚       β”‚   β”œβ”€β”€ πŸ“ public/            ← Home, About, Contact, Login, Register, ForgotPassword
β”‚       β”‚   β”œβ”€β”€ πŸ“ user/              ← Dashboard, Workouts, Nutrition, Water, Sleep, Progress...
β”‚       β”‚   β”œβ”€β”€ πŸ“ trainer/           ← Dashboard, MyClients, ClientDetails, Templates
β”‚       β”‚   └── πŸ“ admin/             ← Dashboard, UserMgmt, TrainerMgmt, Requests, Feedbacks
β”‚       β”œβ”€β”€ πŸ“ partials/              ← Sidebar, AdminSidebar, TrainerSidebar, Header
β”‚       β”œβ”€β”€ πŸ“ services/              ← 13 API service modules
β”‚       └── πŸ“ utils/                 ← ThemeContext, Transition
β”‚
β”œβ”€β”€ πŸ“ server/                        ← Node.js + Express Backend
β”‚   β”œβ”€β”€ πŸ“ Controllers/               ← 13 business logic controllers
β”‚   β”œβ”€β”€ πŸ“ Models/                    ← 11 Mongoose schemas
β”‚   β”œβ”€β”€ πŸ“ Routes/                    ← 13 Express route files
β”‚   β”œβ”€β”€ πŸ“ Middleware/                ← Auth, ErrorHandler, Multer, Validator
β”‚   β”œβ”€β”€ πŸ“ Database/                  ← db.js (Atlas), seedAdmin.js
β”‚   β”œβ”€β”€ πŸ“ Utils/                     ← Cloudinary config, JWT helper
β”‚   └── πŸ“„ server.js                  ← App entry point
β”‚
└── πŸ“ docs/                          ← PRD, SRD, TRD, Design System

πŸ“‹ Features β€” Page by Page

πŸ‘€ User Panel β€” 18 Pages Β 
# Page Key Features API
1 Splash Screen Animated brand intro, auto-redirect β€”
2 Home Hero, features, testimonials, CTA β€”
3 About Mission, team info β€”
4 Contact Feedback form with background video POST /api/feedbacks/submit
5 Register Signup + profile picture β†’ Cloudinary POST /api/auth/register
6 Login JWT auth, token in cookie POST /api/auth/login
7 Forgot Password Email β†’ reset link via notification POST /api/auth/forgot-password
8 Reset Password Token-based password update PUT /api/auth/reset-password/:token
9 Dashboard Stats cards + weekly charts (workouts, calories, streak, water, sleep) Multiple GETs
10 Workout List Filter, paginate, favorite, clone, delete GET /api/workouts
11 Log Workout Create with exercises (sets/reps/weight/duration) POST /api/workouts
12 Workout Details View/edit, mark exercises complete, mood tracking GET PUT /api/workouts/:id
13 Nutrition Log Meals + macro charts + food search + weekly trends Full CRUD
14 Water Log Quick-add (250ml/500ml/1L) + progress ring + streak Full CRUD
15 Progress Tracking Body measurements + photos (Cloudinary) + BMI + radar chart Full CRUD
16 Sleep Log Sleep/wake times, quality, REM, recommendations Full CRUD
17 Browse Trainers View trainers + specializations + send request POST /api/trainer-requests
18 Profile + Settings Edit profile, change password, theme & notification prefs PUT /api/auth/update-profile
πŸ… Trainer Panel β€” 5 Pages Β 
# Page Key Features
1 Dashboard Client activity stats, workout completion rates
2 My Clients List + search + remove assigned clients
3 Client Details Full profile view, assign workouts/goals, add notes, message client
4 Workout Templates Create reusable templates, mark public, assign to clients
5 Profile + Settings Edit profile, update specialization
πŸ›‘οΈ Admin Panel β€” 8 Pages Β 
# Page Key Features
1 Dashboard System-wide stats β€” users, trainers, workouts, growth rate
2 User Management Full CRUD + bulk actions + toggle active/inactive + assign trainer
3 Trainer Management View trainers, client counts, promote/demote roles
4 Create Trainer Register new trainer with specialization fields
5 Trainer Requests Approve / reject user-submitted requests with notes
6 Assigned Trainers View all trainer-client assignments platform-wide
7 Feedbacks View all feedback submissions, mark as read
8 Profile + Settings Edit admin profile and preferences

πŸ”— API Reference

Module Endpoint Methods
πŸ” Auth /api/auth POST, PUT
πŸ‹οΈ Workouts /api/workouts Full CRUD
πŸ₯— Nutrition /api/nutrition Full CRUD
πŸ’§ Water /api/water Full CRUD
😴 Sleep /api/sleep Full CRUD
πŸ“ˆ Progress /api/progress Full CRUD
🎯 Goals /api/goals Full CRUD
πŸ† Achievements /api/achievements GET
πŸ”” Notifications /api/notifications GET, PUT, DELETE
πŸ… Trainers /api/trainers GET, PUT
πŸ“¨ Trainer Requests /api/trainer-requests GET, POST, PUT
πŸ›‘οΈ Admin /api/admin Full CRUD + Bulk
πŸ’¬ Feedback /api/feedback GET, POST, PUT

πŸ—„οΈ Data Models

User ──────────────────────────────────────────────────────────────────
 β”‚
 β”œβ”€β”€ πŸ‹οΈ  Workout β†’ Exercise[] (embedded: sets, reps, weight, duration)
 β”œβ”€β”€ πŸ₯—  Nutrition β†’ FoodItem[] (embedded: macros, calories)
 β”œβ”€β”€ πŸ“ˆ  Progress β†’ BodyMeasurements + PerformanceMetrics + Photos[]
 β”œβ”€β”€ 🎯  Goal β†’ Milestones[] + Reminders[] (embedded)
 β”œβ”€β”€ πŸ’§  Water (daily intake entries)
 β”œβ”€β”€ 😴  Sleep (bedtime, wake, quality, REM/deep/light)
 β”œβ”€β”€ πŸ†  Achievement (points, badges, rank)
 β”œβ”€β”€ πŸ””  Notification (TTL 30 days auto-expire)
 β”œβ”€β”€ πŸ’¬  Feedback
 └── πŸ“¨  TrainerRequest ←──→ Trainer (User self-ref)

🍎  Food β†’ standalone searchable food database

πŸš€ Getting Started

Prerequisites

  • Node.js v18+
  • MongoDB Atlas account
  • Cloudinary account

Installation

# Clone the repo
git clone https://github.com/Konete326/FitTrackPro.git
cd FitTrackPro
# ── Backend ──────────────────────────────────
cd server
npm install
npm run dev
# β†’ Running on http://localhost:5000
# ── Frontend (new terminal) ──────────────────
cd client
npm install
npm run dev
# β†’ Running on http://localhost:5173

Environment Variables

server/.env

PORT              = 5000
MONGO_URI         = mongodb+srv://<user>:<pass>@cluster.mongodb.net/fittrackpro
JWT_SECRET        = your_super_secret_key
JWT_EXPIRES_IN    = 7d
CLOUDINARY_CLOUD_NAME = your_cloud_name
CLOUDINARY_API_KEY    = your_api_key
CLOUDINARY_API_SECRET = your_api_secret
NODE_ENV          = development

client/.env

VITE_API_URL = http://localhost:5000/api

🌐 Shared Systems

System Description
πŸ”” Notifications Badge counter Β· Read/Unread toggle Β· 30-day TTL auto-expiry Β· 8 types (workout reminders, streak, trainer messages, password reset...)
πŸ† Achievements Points-based gamification Β· 7 categories Β· Auto-triggered by milestones Β· Rank calculation
πŸŒ™ Dark / Light Mode Persisted in localStorage Β· Smooth toggle Β· Frosted glass header Β· All components responsive
πŸ’¬ Feedback Loop User submits β†’ Admin reviews β†’ Marks read β†’ User notified

πŸ‘¨β€πŸ’» Team


Student ID Name Contact
πŸ§‘β€πŸ’» Student1550980 Muhammad Sameer sameerdevexpert@gmail.com Β· 0321-3265524
πŸ§‘β€πŸ’» Student1552027 Muhammad Sheryar β€”
πŸ§‘β€πŸ’» Student1436664 Maaz Bin Asad β€”
πŸ§‘β€πŸ’» Student1566221 Muhammad Basiq β€”
πŸ§‘β€πŸ’» Student1501325 Abdul Hadi β€”

Footer Typing



About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages