β 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
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ποΈ 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 β β β
βββββββββββββββββββββ΄βββββββββββββββββββββββ΄ββββββββββββββββββββββββββββ
| 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 |
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
π€ 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 |
| 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 |
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
- Node.js
v18+ - MongoDB Atlas account
- Cloudinary account
# 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:5173server/.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 = developmentclient/.env
VITE_API_URL = http://localhost:5000/api| 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 |
| 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 | β |