TheGameNotification uses a number of projects to work properly:
- Spring Boot - Open source Java-based framework
- Maven Maven is a powerful project management tool that is based on POM (project object model)
- Postgresql - The World's Most Advanced Open Source Relational Database.
- Hibernate - More than an ORM
- HikariCP - HikariCP is a "zero-overhead" production ready JDBC connection pool
- Apache Kafka - Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.
The following items should be installed in your system:
- Java 18 or newer.
- git command line tool (https://help.github.com/articles/set-up-git)
- Your preferred IDE
- SMS
Using AWS Pinpoint api, to add any other vendor api just create a service and autowire in SmsNotificationService.class
Using Facebook whatsapp api, to add any other vendor api just create a service and autowire in WhatsappNotificationService.class
Using AWS Pinpoint api, to add any other vendor api just create a service and autowire in EmailNotificationService.class
Add dependency in pom.xml
<dependency>
<groupId>tech.thegamedefault</groupId>
<artifactId>the-game-notification</artifactId>
<version>1.0.0</version>
</dependency>
Required configurations
- POSTGRESQL_URL
- POSTGRESQL_USERNAME
- POSTGRESQL_PASSWORD
- KAFKA_BOOTSTRAP_SERVERS
- PINPOINT_ACCESS_KEY
- PINPOINT_ACCESS_SECRET
- PINPOINT_REGION
- PINPOINT_PROJECT_ID
- WHATSAPP_URL
- WHATSAPP_PHONE_NUMBER_ID
- WHATSAPP_ACCOUNT_ID
- WHATSAPP_ACCESS_TOKEN
Feature | Route |
---|---|
Send any type of notification | [ /notification/send ] |
{
"sms": {
"appId": "TheGameDefault.TECH",
"notificationType": "SMS",
"message": "This is a test message from TheGameNotification service.",
"destinations": [
"+919XXXXXXXXX"
]
},
"whatsapp": {
"appId": "TheGameDefault.TECH",
"notificationType": "WHATSAPP",
"message": "This is a test message from TheGameNotification service.",
"destinations": [],
"destination": "919XXXXXXXXX"
},
"email": {
"appId": "TheGameDefault.TECH",
"notificationType": "EMAIL",
"subject": "Test email from notification service",
"message": "This is a test message from TheGameNotification service.",
"htmlBody": null,
"destinations": [
"+919XXXXXXXXX"
]
}
}
./mvnw spring-boot:run
./mvnw clean install
docker compose up --build