FitSync is a full-featured Gym Class Scheduling and Membership Management System designed to streamline gym operations by organizing classes, trainers, and trainees with clear role-based access and robust business logic. The platform supports three user roles: Admin, Trainer, and Trainee, each with distinct responsibilities and permissions. FitSync ensures smooth scheduling, efficient class capacity management, and secure authentication for all users.
- Frontend: Next.js (React), TypeScript, Tailwind CSS
- Backend: Express.js, TypeScript
- Database: MongoDB (Mongoose ODM)
- Authentication: JWT (JSON Web Token)
- Deployment: Vercel / Heroku
- State Management: Redux Toolkit
- Other: Framer Motion, React Three Fiber, Lucide Icons
-
POST /api/v1/auth/login- Body:
{ email, password } - Response:
{ token, user }
- Body:
-
POST /api/v1/auth/register- Body:
{ name, email, password, role } - Response:
{ user }
- Body:
-
GET /api/v1/users/role/:role- Headers:
Authorization: Bearer <token> - Response:
{ data: [users] }
- Headers:
-
POST /api/v1/scheduling/create- Headers:
Authorization: Bearer <token> - Body:
{ title, description, trainer, classDate, startTime, endTime, createdBy } - Response:
{ schedule } - Limits: Max 5 schedules/day; class duration 2 hrs.
- Headers:
-
GET /api/v1/scheduling/all- Headers:
Authorization: Bearer <token> - Response:
{ data: [schedules] }
- Headers:
-
POST /api/v1/booking/create- Headers:
Authorization: Bearer <token> - Body:
{ schedule, trainee, bookingDate } - Response:
{ booking } - Limits: Max 10 trainees/schedule.
- Headers:
-
PATCH /api/v1/booking/:id- Headers:
Authorization: Bearer <token> - Response:
{ success }
- Headers:
{
_id: ObjectId,
name: string,
email: string,
password: string,
role: 'ADMIN' | 'TRAINER' | 'TRAINEE',
picture?: string,
isActive: boolean,
isDeleted: boolean,
createdAt: Date,
}{
_id: ObjectId,
title: string,
description?: string,
trainer: ObjectId, // ref: User
classDate: Date,
startTime: string,
endTime: string,
createdBy: ObjectId, // ref: User (Admin)
trainees: ObjectId[], // ref: User
maxTrainees: number, // default: 10
isFull: boolean,
status: 'scheduled' | 'completed' | 'cancelled'
}{
_id: ObjectId,
schedule: ObjectId, // ref: Schedule
trainee: ObjectId, // ref: User
bookingDate: Date,
status: 'active' | 'cancelled'
}Admin Email:
sakib@gamil.com
Admin Password:1445uIoG@
git clone https://github.com/engrsakib/FitSync-Health-and-Performance.git
cd FitSync-Health-and-Performancecd server
npm installcd client
npm installCreate
.envfiles for bothserverandclientas per.env.example.
-
Backend .env
MONGO_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret -
Frontend .env.local
NEXT_PUBLIC_API_URL=https://your-live-server-url/api
cd server
npm run dev
# or
npm startcd client
npm run dev- Open http://localhost:3000 in your browser.
- Use the admin credentials above to log in as admin.
- Live Server: https://fitsyncserver.vercel.app
- Live Client: https://fitsyncclient.vercel.app/
- Admins: Max 5 classes per day, assign trainers, manage users.
- Trainers: Conduct assigned classes only, view schedules.
- Trainees: Book schedules (max 10 per class), manage own profile.
- Schedule: Each class lasts 2 hours.
- Authentication: JWT-based, role-based access.
- Error Handling: Unauthorized access, validation errors, booking/scheduling limit errors.
This project is open-source and available under the MIT License.
For any queries, contact sakib@gamil.com
