BANCs stands for Booking, Availability, and Notification systems. These services are completely independent and communicate to eachother via MQTT.
BANCs controls the backend operations of Toothfix. To communicate to the frontend, BANCs does it via HTTP requests to the API Delegator. The delegator will also decide which service to send the webpage's request to.
-
- This service is responsible for keeping track of the availability of the dentists. Dentists will be able to set their available times and this service will keep track of it and communicate it to the booking service so that users can book available apointments.
-
- This service is one of the most important ones for our system. It is responsible for keeping track of the bookings made by the users.
- The service has the responsibility of sending the available times to the frontend so that the user can choose a time to book.
- It will also communicate with the availability service to make sure that the booking is possible.
- Whenever a booking is made, this service will send a message to the notification service to notify the user of the booking.
- This service will also manage the cancelations of bookings by users or dentists.
- Note: redis needs to be running locally on port 6379 for this service to work.
-
- This service is responsible for sending notifications to the users whenever they make a book.
- The service will also send a notification to the user if the booking is canceled.
- The service will also send a notification to the dentist if a booking is made.
-
- This service is responsible for keeping track of the important actions made in our system.
- The service will log into a database whenever a booking is made or canceled and when new slots become available.
- The service also provides a way of getting the logs to see statistics of the system.
Note: To have our entire system running, you will also need to run the API Delegator and the Frontend.
Now, for running the services:
-
Clone the repository and open the root folder, you will see all the folders for the services.
-
If you are using windows you can run the
servicesrunner.batfile to run all the services at once. If not, you will have to run each service individually. To do so, open a terminal in the root folder of the service you want to run and execute the following commands:npm installnpm start
Repeat this for each service.
- Make sure that you have all the services running including the logging service
- Open a terminal in the root folder of the logging service and execute the following command:
npm install -g- Now you can use
statsto see the full list of commands that you can execute.
booking - 3001availability - 3002notification - 3003logging - 3011