Skip to content

Component to handle Events and Assignment occurring in MODAPTO system

License

Notifications You must be signed in to change notification settings

Modapto/notification-center

Repository files navigation

modapto-notification-center

Overview

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.

Table of Contents

  1. Installation
  2. Usage
  3. Deployment
  4. License
  5. Contributors

Installation

  1. Clone the repository:

    git clone https://github.com/Modapto/notification-center.git
    cd notification-center
  2. Install the dependencies:

    mvn install
  3. 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=
  4. 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=

Usage

  1. Run the application after Keycloak is deployed:

    mvn spring-boot:run
  2. The application will start on http://localhost:8091.

  3. Access the OpenAPI documentation at http://localhost:8091/api/notification-center/swagger-ui/index.html.

Deployment

For local deployment Docker containers can be utilized to deploy the microservice with the following procedure:

  1. Ensure Docker is installed and running.

  2. Build the maven project:

    mvn package
  3. Build the Docker container:

    docker build -t modapto-notification-center .
  4. Run the Docker container including the environmental variables:

    docker run -d -p 8091:8091 --name modapto-notification-center modapto-notification-center
  5. To stop container run:

    docker stop modapto-notification-center

License

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.

Contributors

About

Component to handle Events and Assignment occurring in MODAPTO system

Resources

License

Stars

Watchers

Forks

Packages

No packages published