Notification service based on Spring boot
- Use dynamic templates to send notifications / SMS
- Dynamic languages ( you can use with any language )
- Send notification / SMS to group of people
- Ready to work with SMS or push notification provider
-
Springboot
-
RabbitMQ as a message broker
-
docker-compose for containerization
-
Tomcat Server
-
Swagger — UI for API documentation
-
Postgres database
-
SpringBoot Unit test
Postman Collection => Download Collection
Swagger => http://localhost:8080/swagger-ui.html
-
first you need to create a customer POST /api/v1/customer/create
{ "email":"[email protected]", "language":"en", "phone_number":"123456789", "username":"Amr Emaish" }
-
second you need to create a device for customer POST /api/v1/device/{customerID}/create
-
deviceType will be iOS or Android
{ "deviceType" : "iOS", "deviceToken" : "472b07b9fcf2c2451e8781e944bf5f77cd8457c8", "appVersion" : "15" }
-
-
third now you can send your message POST /api/v1/notification/send
-
you should remove groud_id in case of you wan to send only for one customer
{ "groud_id": 1, "customer_id": 3, "type":"sms", "templates": { "en": "Hi %username% Your bus is about to reach his destination prepare yourself", "ar": "اهلا %username% الباص الخاص بك سوف يصل الى وجهته جهز نفسك " }, "params": { "username_ar": "عمرو", "username_en": "Amr" } }
-
docker-compose up --build
mvn test