Skip to content

Backend ADRs — Architecture Decision Records

Architecture Decision Records (ADRs) document significant technical decisions made during the development of Granit.

Each ADR follows a consistent template: Context, Decision, Evaluated Alternatives, Justification, and Consequences.

#TitleStatusDateScope
001Observability Stack — Serilog + OpenTelemetryAccepted2026-02-21Granit.Observability
002Redis via StackExchange.Redis — Distributed CacheAccepted2026-02-21Granit.Caching
003Testing Stack — xUnit v3, NSubstitute and BogusAccepted2026-02-21granit-dotnet
004Asp.Versioning — REST API VersioningAccepted2026-02-22Granit.Http.ApiVersioning
005Wolverine + Cronos — Messaging, CQRS and SchedulingAccepted2026-02-22Granit.Wolverine
006FluentValidation — Business Validation FrameworkAccepted2026-02-24Granit.Validation
007Testcontainers — Containerized Integration TestsAccepted2026-02-24Integration Tests
008SmartFormat.NET — CLDR PluralizationAccepted2026-02-26Granit.Localization
009Scalar.AspNetCore — Interactive API DocumentationAccepted2026-02-26Granit.Http.ApiDocumentation
010Scriban — Text Template EngineAccepted2026-02-27Granit.Templating.Scriban
011ClosedXML — Excel Spreadsheet GenerationAccepted2026-02-27Granit.DocumentGeneration.Excel
012PuppeteerSharp — HTML to PDF RenderingAccepted2026-02-28Granit.DocumentGeneration.Pdf
013Magick.NET — Image ProcessingAccepted2026-02-28Granit.Imaging.MagickNet
014Migrate FluentAssertions to ShouldlyAccepted2026-02-28granit-dotnet
015Sep — High-Performance CSV ParsingAccepted2026-03-01Granit.DataExchange.Csv
016Sylvan.Data.Excel — Streaming Excel File ReadingAccepted2026-03-01Granit.DataExchange.Excel
017DDD Aggregate Root & Value Object StrategyAccepted2026-03-19granit-dotnet (all modules)
018FusionCache — Caching ProviderAcceptedGranit.Caching
019User Lookup — Dual ModeAcceptedGranit.Identity
020Declarative Definitions Placement (Query & Export)Accepted2026-04-18Granit.QueryEngine, Granit.DataExchange, all modules
021Privacy Data Export — Framework DefaultsAccepted2026-04-19Granit.Privacy, Granit.Privacy.BlobStorage, Granit.Privacy.EntityFrameworkCore
022ICommandSender + Module Naming — No Technology Suffix on Domain ModulesAccepted2026-04-20All business modules, Granit.Commands, Granit.Wolverine
023Tenant-aware role lookupAccepted2026-04-22Granit.Identity.Local, Granit.Identity.Local.AspNetIdentity
024Shared-connection EF Core transaction for role orchestrationAccepted2026-04-22Granit.Identity.Local.AspNetIdentity, Granit.Authorization.EntityFrameworkCore, Granit.OpenIddict.EntityFrameworkCore, Granit.Persistence.EntityFrameworkCore
025Keycloak client-role distinction and boot-time syncAccepted2026-04-22Granit.Identity, Granit.Identity.Federated.Keycloak
026Entra ID App Role distinction and boot-time syncAccepted2026-04-22Granit.Identity.Federated.EntraId
027Cognito app-client group sync via naming-prefix conventionAccepted2026-04-23Granit.Identity.Federated.Cognito
028Unified Data Lookup for QueryEngine Filters and Form DropdownsAccepted2026-04-23Granit.DataLookup.*, Granit.QueryEngine.*, Granit.ReferenceData.*, @granit/data-lookup, @granit/react-data-lookup
029Client-role sync — opt-in orphan cleanup policyAccepted2026-04-23Granit.Authorization.*, Granit.Identity.Federated.*
030Client-role sync — scheduled re-sync via Granit.BackgroundJobsAccepted2026-04-23Granit.Identity.Federated.*.BackgroundJobs
031Client-role write operations on IIdentityClientRoleManagerAccepted2026-04-23Granit.Identity, Granit.Identity.Federated.*
032Granit.Catalog with Product as the shared billing aggregateAccepted2026-04-24Granit.Catalog.*, Granit.Metering, Granit.Subscriptions, Granit.Invoicing
033Metering hybrid — lifecycle, CountDistinct, recompute, backfill, deprecateAccepted2026-04-25Granit.Metering.*
034Subscriptions — pricing tiers, phases, discounts, price overridesAccepted2026-04-25Granit.Subscriptions, Granit.Subscriptions.EntityFrameworkCore, Granit.Subscriptions.Endpoints
035Granit.CustomerBalance ↔ ORB Credits term-by-term mappingAccepted2026-04-25Granit.CustomerBalance.*
036Invoicing line item source + product conventionAccepted2026-04-25Granit.Invoicing.*, Granit.Subscriptions, Granit.Metering
037Party Merge Framework — Mergeable primitive + cross-module rewritersAccepted2026-04-27Granit.Mergeable, Granit.Mergeable.EntityFrameworkCore, Granit.Parties, Granit.Parties.Mergeable, Granit.Parties.Endpoints