Skip to main content

Notification Service

The notification service provides the bounded context Notification. It is responsible for managing notifications.

Domain Model

info

Imported entities from other bounded contexts are marked with a dashed border.

API

The service provides a GraphQL API, which is documented in the GraphQL API documentation.

Technology Stack

  • Language: Kotlin
  • Framework: Spring Boot
  • GraphQL Library: GraphQL Kotlin
  • Database: PostgreSQL
  • Schema Management: Flyway

Repository Structure

The repository is structured as follows:

  • /src/main/: Source code of the service
    • kotlin/org/misarch/notification/: Kotlin source code
      • event/: Dapr event handling
        • model/: Event DTOs
      • graphql/: GraphQL API
        • dataloader/: Data loaders for efficient data fetching
        • federation/: Apollo Federation entity resolvers
        • input/: Input types for mutations
        • model/: GraphQL types
          • connection/: Connection types and logic for paginated queries
      • persistance/: Database entities and repositories
        • model/: R2DBC entities
        • repository/: Spring Data R2DBC repositories
      • service/: Service logic
    • resources/: Spring Boot application configuration and SQL schema migration files
      • db/migration/: Flyway SQL schema migration files

Defined Events

This section lists events that are defined by the notification service and can be used by other services.

Published Defined Events

n/a

Subscribed Defined Events

notification/notification/create

Other services can publish this event to create new notifications.

{
title: string,
body: string,
userId: boolean
}

Imported Events

This section lists events defined by other services that are used by the notification service.

Published Imported Events

n/a

Subscribed Imported Events

  • user/user/created: Used to validate that only existing users can receive notifications

Important ADRs

n/a