Altinn platform microservice for handling notifications (mail, sms, etc) This component handles the functionality related to registering and sending notifications.
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.
The API layer that consumes services provided by Altinn.Notifications.Core
Relevant implementations:
- Controllers
- Program.cs
The domain and application layer that implements the business logic of the system.
Relevant implementations:
- Interfaces for external dependencies implemented by infrastructure and repository layer
- Domain models
- Services
The infrastructure layer that implements the interfaces defined in Altinn.Notifications.Core for integrations towards 3rd-party libraries and systems.
Relevant implementations:
- Kafka producer and consumer implementation
- Clients for communicating with Altinn Platform components
The persistance layer that implements repository logic.
- PostgreSQL v15
- pgAdmin
- Docker
Ensure that both PostgreSQL and pgAdmin have been installed and start pgAdmin.
In pgAdmin
- Create database notificationsdb
- Create the following users with password: Password (see privileges in parentheses)
- platform_notifications_admin (superuser, canlogin)
- platform_notifications (canlogin)
- Create schema notifications in notificationsdb with owner platform_notifications_admin
Ensure that Dokcer has been installed and is running.
In a terminal navigate to the root of this repository
and run command docker compose -f setup-kafka.yml up -d
Kafdrop will be available on localhost:9000
The application runs on port 5090. See full details in Dockerfile.
- In a terminal navigate to /src/Altinn.Notifications
- Run
dotnet run
ordotnet watch
Application is now available on localhost:5090.