Skip to content
bitzorcas
中EN

Concept

Architecture Overview: BitzOrcas.Modern Design Philosophy

Explore the enterprise architecture of BitzOrcas.Modern: modular monolith boundaries, vertical slices, 10-stage execution pipeline, compile-time dual ORM, and Native AOT compilation.

Last updated

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

Compile-Time Infrastructure Core

Roslyn Fluent Mappings (SQL Server Primary + PG Compatible)

CAP Transactional Outbox

Redis 7 Distributed Locks & Multi-Tier Caching

MinIO / S3 Object Storage

Vertical Slice Autonomous Modules

Legal (Matter Intake / Conflict Checks)

Identity (Multi-Tenant Users / 2FA / SSO)

Catalog (Offerings / Tiered Pricing)

Billing (Subscriptions / Quota Guards)

Workflow (Embedded DAG State Machine)

10-Stage Linear Application Pipeline

Logging -> License -> Impersonation -> Auth -> Validation -> Idempotency -> Tx -> Events -> Audit -> ReadModel

Host Composition Layer

BitzOrcas.AppHost (.NET Aspire Orchestration)

BitzOrcas.Gateway (YARP Gateway)

BitzOrcas.Api (Minimal API Core Host)

BitzOrcas.JobHost (Quartz Distributed Jobs)


Five Core Architectural Pillars

1. Deep Module Boundaries

  • High Cohesion & Physical Isolation: Each domain module contains isolated Contracts, Domain, and Application projects;
  • Contract-Only Dependency: Cross-module communication references public *.Contracts packages 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.cs and 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 & LinkCore FocusTarget Audience
1. Modular MonolithPhysical structure, contract isolation, and ArchUnit guardsArchitects & Leads
2. Vertical Slice ArchitectureSingle-file slices, 10-stage pipeline, and domain handlersAll Engineers
3. Dependency InjectionCompile-time injection, service scopes, and middleware flowBackend Engineers
4. Host CompositionApi, Gateway, JobHost composition with .NET AspireDevOps & Backend
5. Multitenancy Deep Dive8-step resolution chain, data isolation, and impersonationSecurity & Architects
6. Source Generation & AOTRoslyn generator internals, zero-reflection persistence, and AOTPerformance Specialists

Chapter Navigation

100%

Scroll or use controls to zoom · drag when enlarged · double-click for 100% / 200%