We communicate with our customers via different types of notifications (e.g we send promo codes to customers via SMS, send in-ride push notifications like “Your drop-off station is coming”). And each customer receives a notification in their preferred language.
The project is split into three services:
-
RESTful API Server, a Node.js/Express.js server which handles the users and notifications basic CRUD operations.
-
Notifications Forwarder, a Node.js rate-limited server which handles the personalized SMS and Push notifications types by integrating with other providers.
-
Notifications Processor, a Node.js server which handles the grouped SMS and Push notifications types by disaggregating/converting them into personalized notifications to the Notifications Forwarder server to handle.
- Notifications Types are as follows:
- Group notifications which are sent as a text notification to a group of users.
- Personalized notifications which are sent as a specific text notification to a specific user.
- Notification can be delivered by two types of providers:
- SMS
- Push notifications
- The number of requests that providers (SMS, Push notifications) can handle per minute are limited.
- Navigate to the repository root directory and run a container for each service, using the command:
docker-compose up-
To see the list of running containers, run the command -
docker-compose ps. You will see a list of container names, states, and ports listed. -
Go to the browser and run http://localhost:3000/docs to view the Swagger APIs documentation of the users and notifications modules.
-
If you wish to stop the containers gracefully, use the below command:
docker-compose stop
# To remove (and stop) the container
docker-compose down