Skip to content

sarthak03dot/FITNESS-STUDIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FITNESS STUDIO: Elite Performance & Tracking Platform

A premium, full-stack application for fitness studios to manage classes, bookings, memberships, and track member progress with cinematic aesthetics and deep analytics.

Preview

Image

Features

For Members

  • πŸ“… Smart Booking: Browse and book fitness classes with calendar integration
  • πŸ’ͺ Workout Tracking: Log exercises, sets, reps, and weight with PR tracking
  • πŸ“Š Body Analytics: Track weight, body fat, and measurements with interactive charts
  • 🎯 Gamification: View workout streaks, personal records, and consistency graphs
  • ⭐ Feedback: Rate classes and instructors
  • πŸ“± Quick Access: QR code check-in for classes
  • πŸŒ— Cinematic UI: Stunning dark/light mode with glassmorphism design

For Instructors

  • πŸ“‹ Manage class schedules and capacity
  • πŸ‘₯ Real-time class attendance/check-ins
  • ⭐ Track performance ratings and reviews
  • πŸ“Š View teaching statistics

For Studio Admins

  • πŸ‘€ User management (RBAC)
  • πŸ“… Master class scheduling
  • πŸ’³ Membership plan management
  • πŸ“Š Platform-wide analytics and revenue tracking

Tech Stack

Backend

  • Runtime: Node.js + Express + TypeScript
  • Database: MongoDB + Mongoose
  • Auth: JWT with specialized middlewares
  • Validation: Zod
  • Storage: Cloudinary (Image uploads)
  • Payments: Razorpay Integration
  • Utils: QR Code generation, Winston Logger

Frontend

  • Framework: React 19 + TypeScript + Vite
  • UI System: Material-UI (v7) + Custom Theme Engine
  • Animations: Framer Motion
  • Data Viz: Recharts (Customized)
  • Routing: React Router v7
  • Calendar: FullCalendar
  • HTTP: Axios with Interceptors

Quick Start

Prerequisites

  • Node.js 18+
  • MongoDB (local or Atlas)
  • Cloudinary Account
  • Razorpay Account

Backend Setup

cd server
npm install
# Configure .env file (see below)
npm run dev
# Seed Database (Optional)
npm run db:seed

Server runs on http://localhost:5000

Frontend Setup

cd client
npm install
npm run dev

App runs on http://localhost:5173

Environment Configuration

Server .env

Create server/.env based on .env.example:

PORT=5000
MONGODB_URI=mongodb://localhost:27017/fitness-studio
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRES_IN=7d
CORS_ORIGIN=http://localhost:5173

# Cloudinary (Images)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# Razorpay (Payments)
RAZORPAY_KEY_ID=your_key_id
RAZORPAY_KEY_SECRET=your_key_secret

Client .env

Create client/.env:

VITE_API_URL=http://localhost:5000/api/v1
VITE_RAZORPAY_KEY_ID=your_razorpay_key_id

API Endpoints Overview

Authentication

  • POST /api/v1/auth/register - Register new user
  • POST /api/v1/auth/login - Login

Core Features

  • Classes: CRUD operations for schedules
  • Bookings: Reserve, Cancel, Check-in (QR)
  • Workouts: Log sessions, view history, PRs
  • Memberships: Subscribe to plans
  • Dashboard: Role-specific analytics
  • Uploads: Profile picture management

Testing & Seeding

Seeding Data

Populate the database with demo users, classes, and workouts:

cd server
npm run db:seed

Note: This script uses tsx to run without compilation.

Create Test Users via API

# Register as Member
curl -X POST http://localhost:5000/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"member@test.com","password":"password123","fullName":"Test Member","role":"MEMBER"}'

Project Structure

server/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ config/          # DB, Swagger, Envs
β”‚   β”œβ”€β”€ middlewares/     # Auth, Upload, Validation
β”‚   β”œβ”€β”€ modules/         # Feature-based architecture
β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”œβ”€β”€ users/
β”‚   β”‚   β”œβ”€β”€ classes/
β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ scripts/         # Seeding & Maintenance
β”‚   └── app.ts           # Express setup

client/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/      # Shared UI
β”‚   β”œβ”€β”€ context/         # Auth, Toast, Theme
β”‚   β”œβ”€β”€ features/        # Page-level smart components
β”‚   β”œβ”€β”€ hooks/           # Custom hooks
β”‚   β”œβ”€β”€ theme/           # MUI Theme config
β”‚   └── services/        # API integration

License

MIT

Author

Sarthak Singh

About

FITNESS STUDIO: Elite Performance & Tracking Platform A premium, full-stack application for fitness studios to manage classes, bookings, memberships, and track member progress with cinematic aesthetics and deep analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages