Notification center is responsible for notifying users in MODAPTO regarding events from MODAPTO modules or Smart Services and assignments that can be created between two users.
Notification Center is connected with User Inteface, Production Knowledge Base and Message Bus to facilitate such operations.
It is based on Java Spring Boot framework utilizing Java 21. At the moment all endpoints require no authentication - JWT tokens / CSRF token.
-
Clone the repository:
git clone https://github.com/Modapto/notification-center.git cd notification-center
-
Install the dependencies:
mvn install
-
Add an application-local.properties file with the following variables:
environment.name=local spring.elasticsearch.uris= spring.elasticsearch.username= spring.elasticsearch.password= spring.kafka.bootstrap-servers= spring.security.oauth2.resourceserver.jwt.issuer-uri= keycloak.client= keycloak.client.secret= keycloak.token-uri= user.manager.component.url=
-
If deployed through Docker Compose file the following Environmental Variables must be defined:
SERVER_PORT=${APP_PORT} ELASTICSEARCH_URL=${ELASTICSEARCH_URL} ELASTIC_USERNAME=${ELASTIC_USERNAME} ELASTIC_PASSWORD=${ELASTIC_PASSWORD} KEYCLOAK_REALM_URL=${KEYCLOAK_REALM_URL} KEYCLOAK_CLIENT=modapto KEYCLOAK_CLIENT_SECRET=${KEYCLOAK_CLIENT_SECRET} USER_MANAGER_URL= KAFKA_BROKERS_URL=
-
Run the application after Keycloak is deployed:
mvn spring-boot:run
-
The application will start on
http://localhost:8091
. -
Access the OpenAPI documentation at
http://localhost:8091/api/notification-center/swagger-ui/index.html
.
For local deployment Docker containers can be utilized to deploy the microservice with the following procedure:
-
Ensure Docker is installed and running.
-
Build the maven project:
mvn package
-
Build the Docker container:
docker build -t modapto-notification-center .
-
Run the Docker container including the environmental variables:
docker run -d -p 8091:8091 --name modapto-notification-center modapto-notification-center
-
To stop container run:
docker stop modapto-notification-center
TThis project has received funding from the European Union's Horizon 2022 research and innovation programm, under Grant Agreement 101091996.
For more details about the licence, see the LICENSE file.
- Alkis Aznavouridis ([email protected])