Altinn / altinn-notifications

Altinn platform microservice for handling notifications (mail, sms, etc)
MIT License
2 stars 3 forks source link

Altinn Notifications

Altinn platform microservice for handling notifications (mail, sms, etc) This component handles the functionality related to registering and sending notifications.

Project organization

This is a backend WebAPI solution written in .NET / C# following the clean architecture principles. The solution is into four projects, each with their associated test project.

Altinn.Notifications

The API layer that consumes services provided by Altinn.Notifications.Core

Relevant implementations:

Altinn.Notifications.Core

The domain and application layer that implements the business logic of the system.

Relevant implementations:

Altinn.Notifications.Integrations

The infrastructure layer that implements the interfaces defined in Altinn.Notifications.Core for integrations towards 3rd-party libraries and systems.

Relevant implementations:

Altinn.Notifications.Persistance

The persistance layer that implements repository logic.

Getting started

  1. .NET 8.0 SDK
  2. Newest Git
  3. A code editor - we like Visual Studio Code
  4. Podman or another container tool such as Docker Desktop
  5. PostgreSQL
  6. pgAdmin

Setting up PostgreSQL

Ensure that both PostgreSQL and pgAdmin have been installed and start pgAdmin.

In pgAdmin

A more detailed description of the database setup is available in our developer handbook

Cloning the application

Clone Altinn Notifications repo and navigate to the folder.

git clone https://github.com/Altinn/altinn-notifications
cd altinn-notifications

Setting up Kafka broker and visualization

Ensure that Docker has been installed and is running.

In a terminal navigate to the root of this repository and run command podman compose -f setup-kafka.yml up -d

Kafdrop is now available at http://localhost:9000.

Running the application with .NET

The Notifications components can be run locally when developing/debugging. Follow the install steps above if this has not already been done.

The notifications solution is now available locally at http://localhost:5090/. To access swagger use http://localhost:5090/swagger.