AutoMate Technisch Help

Platform Architectuur

AutoMate is een multi-tenant Microsoft 365 automatiseringsplatform gebouwd op Azure. Het platform bestaat uit een centrale API, portals voor beheer en eindgebruikers, en een plugin-architectuur voor loosely coupled uitbreidingen.

High-level overzicht

Management Portal
Blazor Server

AutoMate.API
FastEndpoints

Hangfire
Background Jobs

API Plugins

MsGraph Plugin

AuditLog Plugin

Email Plugin

Azure SQL
4 databases

Azure Key Vault

Managed Redis

AuditLogs Storage

Microsoft Graph API

SendGrid

Seq @ TransIP

Application Insights

Kerncomponenten

Component

Technologie

Framework

AutoMate.API

Centrale API

FastEndpoints, .NET 10

Management Portal

Beheersinterface

Blazor Server, .NET 10

Service Portal

Eindgebruiker self-service

Blazor Server, .NET 10

Hangfire

Achtergrondverwerking

Hangfire, gehost in API

API Plugins

Loosely coupled uitbreidingen

.NET 10, via plugin-architectuur

AutoMate.API

De API is het hart van het platform. Alle portals, externe systemen en achtergrondprocessen communiceren via deze API. De API gebruikt FastEndpoints in plaats van ASP.NET Core MVC of Minimal APIs.

Multi-tenancy wordt afgedwongen via de X-Tenant-Id HTTP header. Alle AutoMate.API endpoints ontvangen automatisch de tenant context via IMultiTenantService.GetTenantId(). De tenant ID wordt nooit als request body parameter meegegeven — dit wordt altijd uit de header opgehaald door de multi-tenant middleware.

Feature-based organisatie

De API is georganiseerd in features onder /Features/. Elke feature bevat zijn eigen endpoints, services, repositories en domeinmodellen.

Feature

Beschrijving

IAM

Identity & access management, employee sync met HR-bronnen (AFAS, SAP SuccessFactors)

Workflows

Workflow definities en executie (v2, Hangfire-based)

UserTypes

User type templates, organisatieattributen, OrgModel

Branding

Email signatures, Teams branding, CDN assets, Office templates

Provisions

Device provisioning (AutoPilot), licenties

Main

Tenants, users, locks (SignalR)

Audits

Audit trail endpoints

Email

Email verzending

Common

Health checks, Hangfire utilities, KeyVault

FastEndpoints patroon

Endpoints erven van Endpoint<TRequest, TResponse> en implementeren Configure() en HandleAsync():

public class GetEmployeeEndpoint : Endpoint<GetEmployeeCommand, GetEmployeeResponse> { private readonly IMultiTenantService _tenantService; public GetEmployeeEndpoint(IMultiTenantService tenantService) { _tenantService = tenantService; } public override void Configure() { Get("/api/iam/employees/{id}"); // Tenant ID komt uit X-Tenant-Id header, niet uit de request body } public override async Task HandleAsync(GetEmployeeCommand req, CancellationToken ct) { var tenantId = _tenantService.GetTenantId(); // handler logica } }

Plugin architectuur

AutoMate.API gebruikt een plugin-architectuur voor loosely coupled uitbreidingen. Plugins bevinden zich onder /API/AutoMate.API.Plugins.* en worden als projectreferentie door de hoofdAPI opgenomen.

Plugin

Beschrijving

AutoMate.API.Plugins.AuditLog

Audit logging met Seq en Azure Table Storage backends, inclusief background workers

AutoMate.API.Plugins.Email

Email verzending via SendGrid

AutoMate.API.Plugins.MsGraph

Microsoft Graph API integratie met multi-tenant certificaat authenticatie

Plugins leveren hun eigen endpoints, services en modellen via de FastEndpoints conventie. Ze blijven onafhankelijk deploybaar en kunnen worden toegevoegd of verwijderd zonder de kern-API te wijzigen.

Feeds (legacy — dead code)

De Feeds projecten (/Feeds) zijn volledig legacy. Geen enkel project onder /API of /Portals verwijst nog naar deze packages. De map staat uitsluitend om historische redenen nog in de repo. Breid Feeds niet uit en gebruik de packages niet als dependency in nieuwe code.

Voormalig package

Actueel equivalent

Feeds.MultiTenantService

Interface: API/AutoMate.API.Shared/IMultiTenantService.cs; implementatie: API/Src/AutoMate.API/Services/MultiTenantService.cs

Feeds.MsGraphService

AutoMate.API.Plugins.MsGraph (API plugin)

Feeds.KeyVault

Direct geladen in Program.cs via ConfigureAzureKeyVault()

Feeds.TenantConfigurationStore

Tenant config via Azure Table Storage; afgehandeld in de API

Feeds.WeFactClient

Niet actief in gebruik

Feeds.AzureEmailService

AutoMate.API.Plugins.Email (Twilio SendGrid)

Feeds.ApimService

Niet actief — APIM maakt geen deel uit van de actuele deployment (zie Hosting — SaaS Applicatie)

Clean Architecture

Alle actieve modules (API features, portals) volgen Clean Architecture met vier lagen:

Presentation → Application → Domain ↓ Infrastructure

Laag

Verantwoordelijkheid

Presentation

API endpoints, Blazor pages (entry points)

Application

Business logica, use cases, command handlers

Domain

Kern entiteiten en domeinlogica

Infrastructure

Externe afhankelijkheden (databases, Azure services, Graph API)

Dependencies lopen altijd naar binnen: Infrastructure en Presentation zijn afhankelijk van Application en Domain, maar nooit andersom.

Last modified: 10 June 2026