A web application to manage and schedule appointments between gym trainers and members. It offers live monitoring of gym capacity, email notifications, appointment cancellation, trainer working plans and more.
What sets this project apart from existing scheduling systems is its ability to:
-Provide a live metric of the gym capacity
-Support multiple franchise locations
-Allow trainers to adjust their time availabilty
-A refined U.I.
-Captcha verification login
The app is deployed and can be found here
You can use the following credentials with the demo:
Location A (Default):
Account type | Username | Password |
---|---|---|
admin |
admin | qwerty123 |
trainer |
provider | qwerty123 |
trainer |
trainerB | qwerty123 |
trainer |
trainerC | qwerty123 |
premium member |
customer_c | qwerty123 |
regular member |
customer_r | qwerty123 |
Location B:
Account type | Username | Password |
---|---|---|
admin |
admin | qwerty123 |
trainer |
jdoe | qwerty123 |
trainer |
yogamaster | qwerty123 |
premium member |
member1 | qwerty123 |
regular member |
mem2 | qwerty123 |
Location C:
Account type | Username | Password |
---|---|---|
admin |
admin | qwerty123 |
trainer |
CardioMaster | qwerty123 |
trainer |
SwimInstructor | qwerty123 |
premium member |
mem2 | qwerty123 |
regular member |
mem1 | qwerty123 |
admin
- Adds new trainers and classes. Assigns classes to trainers. Sees list of all: appointments, trainers, members, invoices.
trainer
- Creates a working plan, add breaks to that working plan and change the classes they teach.
member regular
- Books new appointments and manages them. Sees only classes which target regular members.
member premium
- Same as regular member except can only see classes which target premium members.
To book a new appointment, members start by clicking the New Appointment
button on the all appointments page. They must then:
- Choose a desired class from the list of available classes
- Choose a trainer for the selected class
- Choose one of the available dates and times
- Click book button on the confirmation page
Live Gym Capacity is refreshed each time home page is loaded:
This is done by retrieving the start and end time for every scheduled class and checking to see if this interval contains the current time in EST. If it does, then the initial max capacity is decremented by 1. The initial max capacity can be specified by the gym owner. In the demo, it is set to 30.
Available hours are calculated with getAvailableHours function from AppointmentService:
List<TimePeroid> getAvailableHours(int providerId,int customerId, int workId, LocalDate date)
This function works as follow:
- Retrieves selected trainer working plan
- Retrieves working hours from working plan for selected day
- Excludes all breaks from working hours
- Excludes all trainer-booked appointments for that day
- Excludes all member-booked appointments for that day
- Retrieves selected work duration and calculates available time periods
- Returns available hours
1. Every appointment has it's own status. Below you can find description for every possible status:
Status | Set by | When | Condition |
---|---|---|---|
scheduled |
system | New appointment is created | - |
finished |
system | Current date is after appointment end time | Current appointment status is scheduled and current date is after appointment end time |
confirmed |
system | Current date is 24h after appointment end time | Current appointment status is finished and current date is more than 24h after appointment end time |
invoiced |
system | Invoice for appointment is created | - |
canceled |
member | Member clicks cancel button | current appointment status is scheduled and current date is not less than 24h before appointment start time and user total canceled appointments number for current month is not greater than 1 |
rejection requested |
member | Member clicks reject button | current appointment status is finished and current date is not more than 24h after appointment end time |
rejection accepted |
provider | Trainer clicks accept rejection button | current appointment status is rejection requested |
2. Normal appointment lifecycle is:
- scheduled - right after the user creates a new appointment
- finished - once the system time is later than the appointment end time
- confirmed - once the system time is more than 24h after appointment end time and the user didn't request rejection
- invoiced - after invoiced is issued automatically on the 1st day of the next month
3. Appointment cancellation
Appointments can be canceled by a member or trainer (if cancellable option specified by admin). Members are only allowed to cancel one appointment each month, no less than 24h before appointment start date. Trainers are allowed to cancel their appointments without any limit as long as the appointment status is scheduled
.
1. An email notification is sent when:
- appointment is finished
- appointment rejection is requested
- appointment rejection is accepted
- new appointment is created
- appointment is canceled
- invoice is issued
Email templates can be found here: src\main\resources\templates\email
- Fullcalendar - A JavaScript event calendar
- FlyingSaucer - Used to generate invoice PDF
- jjwt - Used to generate/validate JWT tokens
This project is based on the work of Slabiak under the MIT open source license: https://github.com/slabiak/AppointmentScheduler.git