Recently, working out has been gaining traction which resulted in long queues forming outside gyms, especially during peak hours. Many gym-goers have expressed their dissatisfaction and frustration with long waiting times due to manual check-in processes and insufficient gym equipment.
To streamline the process, GYM DADDY offers a virtual queuing system to tackle the long queue and the class booking system to digitalise the manual procedures.
# to run docker compose
./build_compose.sh
# enter frontend repo
cd gd-frontend
# install node dependencies
npm install
# start vue frontend server
npm run serve
# to close microservices
docker compose down
# for updating of proto submodules for all microservices
git submodule update --remote- Use
swagger-api-doc.ymland copy paste the whole thing inside the Swagger UI Editorhttps://editor.swagger.io/
To receive notification on Telegram, user must be subscribed to the telegram bot with the same telegram handle used during registration.
- The user will send a POST request to book the class of their preference.
- Before allowing the booking to take place, the user validates their Auth Token with the User Microservice before making any requests, this is to check if the user is authorised.
- Once validated, the Create Booking Complex Microservice updates capacity levels to Class Microservice via HTTP PATCH
- Class Microservice returns 201 if success and error_code if failure to Class Booking Complex Microservice
- Class Booking Complex Microservice books a specific class via HTTP POST to Booking Microservice
- Booking Microservice initiates an asynchronous RPC dial to Notification Microservice for booking confirmation message
- Notification Microservice publishes message to Kafka
- The TelegramBot Microservice, subscribed to Kafka, receives the message, ensuring that users are informed about the confirmation of their booking
- The user interacts with the Gym User Interface which submits a POST request with their user_id to the Join Queue Complex Microservice
- Before allowing the user to join the queue, the user validates their Auth Token with the User Microservice before making any requests, this is to check if the user is authorised.
- Once validated, that the user is added to the queue, the Join Queue Complex Microservice sends the user_id to the Queue Microservice via RPC dial
- The Queue Microservice assigns the user a queue_number after processing the user_id, and returns a ticket to the Join Queue Complex Microservice
- The Join Queue Complex Microservice then returns the ticket with the queue_number back to the user
- The Join Queue Complex Microservice initiates an asynchronous RPC dial to send notification to the Notification Microservice, to inform the upcoming 2 users of their turn.
- The Notification Microservice, upon receiving the notification details, publishes a message to Kafka
- The TelegramBot Microservice, subscribed to Kafka, receives the message and notifies the user through Telegram about their queue_number, keeping them informed about their position in the virtual queue.
- A PATCH request is initiated by the admin through manual updates, when the user enters the gym.
- Before letting the admin update the gym availability, the admin validates their Auth Token with the User Microservice before making any requests, this is to check if the admin is authorised.
- Once validated, the Gym Availability Complex Microservice updates its own availability count to reduce by 1.
- The Update Gym Availability Complex Microservice then initiates an RPC dial to the Queue Microservice to get the upcoming tickets.
- The Manage Gym Availability Complex Microservice sends notifications to the next few tickets in the queue asnchronously via RPC dial
- The Notification Microservice publishes a message to Kafka
- The TelegramBot Microservice, subscribed to Kafka, receives the message and notifies users about the updated gym availabilities and their ticket status




