BitzOrcas.Modern is a next-generation multi-tenant modular monolith architecture for .NET 10. Combining Vertical Slice Architecture, Roslyn compile-time source generation, and dual-ORM infrastructure, it offers the fast feedback loops of monolithic local debugging alongside microservice-grade boundaries and Native AOT performance.
Architecture Topology Overview
Five Core Architectural Pillars
1. Deep Module Boundaries
- High Cohesion & Physical Isolation: Each domain module contains isolated
Contracts,Domain, andApplicationprojects; - Contract-Only Dependency: Cross-module communication references public
*.Contractspackages exclusively; - ArchUnit Guards: Automated architecture rules in CI prevent boundary violations.
2. Vertical Slice Architecture
- One Use Case, One File: Eliminates shallow Controller → Service → DAO layers;
- Full Autonomy: Each slice co-locates route contracts, RBAC permissions, pure validation rules, and the domain handler.
3. 10-Stage Standardized Execution Pipeline
- Automated Cross-Cutting Governance: Inbound requests pass through logging, license checks, impersonation sandboxes, auth, 3-tier validation, idempotency, transactions, events, and audit diffs;
- Clean Handlers: Handlers contain zero transaction or audit boilerplate.
4. Source Generator First & Native AOT
- Zero Runtime Reflection: Roslyn generators produce Minimal API endpoints, dual-ORM fluent configurations, and JSON serializers at compile-time;
- Sub-50ms Cold Starts: Fully optimized for .NET 10 Native AOT deployment.
5. Unified Aggregates & Compile-Time Dual ORM
- Aggregates as Persistence Models: Eliminates manual
*Entity.csand mapper files for over 90% of business models; - Dual ORM Port: SQL Server 2022 is the primary store with complete PostgreSQL runtime compatibility.
Architectural Deep-Dive Roadmap
| Topic & Link | Core Focus | Target Audience |
|---|---|---|
| 1. Modular Monolith | Physical structure, contract isolation, and ArchUnit guards | Architects & Leads |
| 2. Vertical Slice Architecture | Single-file slices, 10-stage pipeline, and domain handlers | All Engineers |
| 3. Dependency Injection | Compile-time injection, service scopes, and middleware flow | Backend Engineers |
| 4. Host Composition | Api, Gateway, JobHost composition with .NET Aspire | DevOps & Backend |
| 5. Multitenancy Deep Dive | 8-step resolution chain, data isolation, and impersonation | Security & Architects |
| 6. Source Generation & AOT | Roslyn generator internals, zero-reflection persistence, and AOT | Performance Specialists |
Chapter Navigation
- 01/07
Modular Monolith: Physical Isolation, Contract Boundaries & ArchUnit
Explore the BitzOrcas.Modern modular monolith architecture: Contracts/Domain/Application project segregation, 5 inter-module collaboration rules, and ArchUnit architecture tests.
- 02/07
Vertical Slice Architecture: High Cohesion Use-Case Centricity
Master Vertical Slice Architecture in BitzOrcas.Modern: One Use Case One File, 10-stage pipeline governance, unified aggregate persistence, and retiring layered models.
- 03/07
Dependency Injection & Lifecycles: Compile-Time Composition
Master Dependency Injection in BitzOrcas.Modern: phased composition order, service lifecycle rules (Scoped / Singleton / Transient), and Native AOT static registration.
- 04/07
Multi-ORM Dual-Engine Architecture & Selection Matrix
In-depth architecture of BitzOrcas.Modern persistence adapters: division of responsibilities, selection matrix, and dual-engine coexistence for SqlSugar, EF Core, Dapper, and MongoDB.
- 05/07
Host Composition & Topology: API, Gateway, JobHost & Aspire
Architectural breakdown of BitzOrcas.Modern host composition: API Host, YARP Gateway, JobHost, ServiceDefaults, and .NET Aspire orchestration.
- 06/07
Multitenancy Deep Dive: 8-Step Resolution Chain & Data Isolation
Deep dive into BitzOrcas.Modern multitenancy: 8-step tenant resolution hierarchy, automated dual ORM global query filters, and operator impersonation sandboxes.
- 07/07
Source Generator & Native AOT: Zero-Reflection Compilation
Explore compile-time code generation in BitzOrcas.Modern: Minimal API EndpointGenerator, dual-ORM FluentMappingGenerator, and Native AOT sub-50ms cold starts.