Architecture
This section documents the architectural decisions and design patterns used throughout the Granit framework.
Sections
Section titled “Sections”- Pattern Library — 51 design patterns with their concrete implementation in Granit, organized by category (architecture, cloud/SaaS, GoF, data, concurrency, .NET idioms, security)
- ADRs — 16 Architecture Decision Records documenting key technology choices (Serilog, Redis, Wolverine, Scriban, ClosedXML, etc.)
Design principles
Section titled “Design principles”Granit is built on a set of explicit architectural principles:
- Convention over configuration — sensible defaults, explicit overrides
- Module isolation — each module owns its DbContext, its DI registrations, and its public API surface
- CQRS everywhere —
IReaderandIWriterinterfaces are never merged - Soft dependencies — modules access cross-cutting concerns (tenancy, time,
user context) via
Granit.Coreinterfaces, not direct package references - Compliance by design — GDPR and ISO 27001 constraints are architectural decisions, not afterthoughts