Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gym Engine Cover
Gym Engine Logo

⚑ GYM ENGINE

A Modern Role-Based Gym Management & Fitness Booking Platform

Next.js TypeScript Express MongoDB

Tailwind NextAuth JWT Node.js

Stars Β  PRs Welcome Β  License


πŸš€ Live Demo Β Β·Β  πŸ“– Docs Β Β·Β  πŸ› Report Bug Β Β·Β  ✨ Request Feature


🌟 What is Gym Engine?

Gym Engine is a full-stack gym management ecosystem that empowers fitness centers to operate smarter. Users can join, train, book fitness classes, and manage programs β€” all through a beautifully designed, role-aware interface.

Whether you're an admin managing the whole gym, a trainer running classes, or a member crushing goals β€” Gym Engine has a tailored experience built just for you.


✨ Core Features

πŸ” Authentication & Security

  • NextAuth + JWT dual-layer auth
  • Role-based route protection
  • Secure password hashing with bcryptjs
  • Session persistence & token refresh

πŸ‘₯ Role Management

  • Admin β€” Full platform control
  • Trainer β€” Class & schedule management
  • Member β€” Booking & progress tracking
  • Non-member β€” Browse & onboard

πŸ“… Class & Booking System

  • Real-time class scheduling
  • Trainer assignment per class
  • Seat availability management
  • Booking confirmation flow

πŸ“Š Dashboard & Analytics

  • Role-specific dashboards
  • Admin analytics & user tracking
  • Dark / Light mode support
  • Mobile-responsive layouts

πŸ§‘β€πŸ’» User Roles at a Glance

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Role     β”‚  Capabilities                                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  πŸ›‘οΈ Admin   β”‚  Full control: users, schedules, analytics, settings  β”‚
β”‚  πŸ‹οΈ Trainer β”‚  Manage own classes, set schedules, view members       β”‚
β”‚  πŸ‘€ Member  β”‚  Book classes, track progress, choose trainers         β”‚
β”‚  πŸ‘₯ Non-mem β”‚  Browse programs, register, upgrade to member          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‹οΈ Fitness Programs

Program Description Level
🟒 Basic Fitness Foundation training for beginners Beginner
🧘 Yoga Flexibility, balance & mindfulness All Levels
πŸ’ͺ Body Building Structured hypertrophy programs Intermediate
πŸ”₯ Muscle Courses Advanced strength & conditioning Advanced

πŸ› οΈ Tech Stack

πŸ–₯️ Frontend βš™οΈ Backend
  • Next.js β€” React framework with SSR/SSG
  • TypeScript β€” Type-safe development
  • Tailwind CSS β€” Utility-first styling
  • NextAuth.js β€” Authentication flows
  • Axios β€” HTTP client
  • Node.js β€” Runtime environment
  • Express.js β€” RESTful API server
  • MongoDB β€” NoSQL database
  • JWT β€” Stateless auth tokens
  • bcryptjs β€” Password encryption

πŸ”„ System Flow

User Login
    β”‚
    β–Ό
Role Detection ──────────────────────────────────┐
    β”‚                                             β”‚
    β–Ό                                             β–Ό
Admin Dashboard              Member / Trainer Dashboard
    β”‚                                   β”‚
    β–Ό                                   β–Ό
Manage Users             Browse & Book Classes
Manage Schedules                 β”‚
View Analytics                   β–Ό
                         Select Trainer
                                 β”‚
                                 β–Ό
                         Confirm Booking βœ…

πŸ”₯ Demo Credentials

⚑ Try the platform instantly β€” no sign-up needed!

Role Email Password
πŸ›‘οΈ Admin admin@gmail.com 123456
πŸ‹οΈ Trainer trainer@gmail.com 123456
πŸ‘€ Member member@gmail.com 123456
πŸ‘₯ Non-member nonmember@gmail.com 123456

🌐 API Base URL

https://gym-engine-server.vercel.app/api/v1

πŸ“ Project Structure

πŸ–₯️ Frontend βš™οΈ Backend (MVC)
src/
β”œβ”€β”€ app/           # Next.js app router
β”œβ”€β”€ components/    # Reusable UI components
β”œβ”€β”€ assets/        # Images & static files
β”œβ”€β”€ lib/           # Helper functions
└── styles/        # Global styles
src/
β”œβ”€β”€ controllers/   # Route handlers
β”œβ”€β”€ models/        # Mongoose schemas
β”œβ”€β”€ routes/        # API route definitions
β”œβ”€β”€ middlewares/   # Auth & validation
β”œβ”€β”€ config/        # DB & env config
└── utils/         # Shared utilities

πŸ“¦ Installation

1. Clone the Repositories

# Frontend
git clone https://github.com/tuhin360/gym-engine-client.git
cd gym-engine-client

# Backend
git clone https://github.com/tuhin360/gym-engine-server.git
cd gym-engine-server

2. Install Dependencies

npm install

3. Configure Environment Variables

Frontend β€” create .env.local:

NEXT_PUBLIC_API_URL=https://gym-engine-server.vercel.app/api/v1
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret

Backend β€” create .env:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
FRONTEND_URL=http://localhost:3000

4. Run Locally

# Frontend
npm run dev   # β†’ http://localhost:3000

# Backend
npm run dev   # β†’ http://localhost:5000

πŸ“Š Key Modules

Module Technology Description
πŸ” Auth Module NextAuth + JWT Secure login, role detection, session handling
πŸ‹οΈ Class Management Express + MongoDB CRUD for fitness classes & schedules
πŸ“… Schedule Manager REST API Create, update & delete time slots
πŸ‘€ RBAC Middleware + JWT Role-based access control across all routes
πŸ“ˆ Analytics Dashboard Next.js + Charts Admin insights, user activity, booking trends

πŸš€ Roadmap

  • Role-based authentication & dashboards
  • Class booking & trainer assignment
  • Admin analytics
  • Dark / Light mode
  • πŸ“± Mobile App (React Native)
  • πŸ”” Real-time push notifications
  • πŸ’¬ In-app chat (Trainer ↔ Member)
  • πŸ“Š Advanced analytics & reporting
  • 🌍 Multi-language / i18n support
  • πŸ’³ Payment integration

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

Jahedi Alam Tuhin

Jahedi Alam Tuhin

GitHub


⭐ Support the Project

If Gym Engine helped you or you find it interesting, please consider giving it a ⭐ star on GitHub β€” it means a lot and helps others discover the project!

    β˜… Star    β†’  github.com/tuhin360

Made with ❀️ and πŸ‹οΈ by Jahedi Alam Tuhin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages