Schema-per-Module Isolation
Zero tables in public. Every module owns an exclusive schema (users, catalog, inventory, orders, shipments), EF Core writes with xmin + FOR UPDATE, and schema-scoped Dapper reads.
Orbit is an open-source .NET 11 modular monolith baseline and agentic software factory. Five isolated bounded contexts run inside one deployable host and one PostgreSQL 18 database—enforced by 49 boundary guardrails, a topic-routed Channels service bus, and live OpenTelemetry traces.
PostgreSQL 18 · schema: ordersSnapshots SKU pricing, writes orders.outbox_messages, and compensates StockRejected.
Folder conventions rot under deadline pressure and AI code generation unless module boundaries are enforced in the compiler, the SQL layer, and runtime telemetry.
Zero tables in public. Every module owns an exclusive schema (users, catalog, inventory, orders, shipments), EF Core writes with xmin + FOR UPDATE, and schema-scoped Dapper reads.
Orbit.Common.EventBus routes topics via an immutable FrozenDictionary into per-subscriber bounded queues—eliminating fan-out waste and single-queue head-of-line blocking.
W3C trace_parent travels inside outbox_messages into a local Aspire Dashboard (:18888) so both engineers and coding agents trace async sagas end-to-end.
Task-focused SKILL.md playbooks plus a 5-second, 49-test boundary gate let Claude Code, Codex, and Antigravity scaffold modules and vertical slices without boundary leaks.
Scroll through the live request path—from synchronous SKU snapshotting to atomic Outbox commits, O(1) topic routing, and SELECT ... FOR UPDATE row serialization. Every step links to the exact C# lines and proving test.
Orders never queries catalog.products directly. PlaceOrderCommandHandler calls ICatalogPublicApi in-process to verify active SKUs and snapshot unit prices before opening a database transaction—keeping Catalog free to change prices later without mutating historical orders.
Inside OrdersDbContext, InsertOutboxMessagesInterceptor captures OrderPlacedDomainEvent alongside Activity.Current?.Id (W3C trace_parent) in orders.outbox_messages within the exact same PostgreSQL commit, then pulses OutboxWakeupSignal for sub-10ms dispatch.
ModuleOutboxProcessor publishes OrderPlacedIntegrationEvent to Orbit.Common.EventBus. TopicSubscriptionRegistry looks up orders.order-placed in O(1) via an immutable FrozenDictionary and writes only to subscribed bounded Channel<IntegrationEventEnvelope> queues.
Inventory wraps its handler in IdempotentIntegrationEventHandler and executes SELECT *, xmin FROM inventory.stock_items ... ORDER BY product_id FOR UPDATE. When five buyers race for the last unit, PostgreSQL serializes the lock: one order wins reservation and four receive StockRejected.
| Dimension | Traditional Layered Monolith | Orbit Modular Monolith (.NET 11) | Premature Microservices |
|---|---|---|---|
| Deployable units | 1 host, tangled assemblies | 1 host, 5 strictly isolated bounded contexts | 5+ services, brokers, CI pipelines |
| Database ownership | Shared public schema & ad-hoc joins | 5 exclusive PostgreSQL 18 schemas, 0 cross-joins | 5 separate DB clusters & ops overhead |
| Cross-module messaging | Direct service-to-service method calls | Outbox/Inbox + O(1) Channels topic pub/sub | Network broker + two-stage ack gap |
| AI agent safety | High risk of silent coupling across features | 49 automated compiler + SQL boundary checks | Split across repos; blind across network hops |
| Future extraction path | Multi-quarter rewrite | Swap IEventBus adapter per module seam | Already paying distributed tax on day one |
Split a .NET 11 application into five isolated bounded contexts, each owning an exclusive PostgreSQL 18 schema with zero shared tables.
Race five concurrent buyers for one scarce SKU in PostgreSQL 18 using deterministic FOR UPDATE row locks, xmin tokens, and atomic outbox commits.
Decide when a .NET module needs an immediate in-process PublicApi read versus an asynchronous integration event over the Outbox and EventBus.
Build an in-memory .NET 11 pub/sub bus on System.Threading.Channels with O(1) topic routing, sub-10ms outbox wakeup, and idempotent inbox replay.
Catch illegal cross-module references, public schema leaks, and cross-schema Dapper SQL queries in 5 seconds with 49 .NET architecture tests.
Pair AGENTS.md, 8 composable SKILL.md workflows, 59 verification gates, and local Aspire OpenTelemetry traces so AI coding agents ship safely.
Join thousands of .NET engineers inside Milan Jovanović’s flagship course. Design bounded contexts, CQRS vertical slices, Outbox/Inbox messaging, sagas, and service extraction step by step while building Evently.
Starting a critical .NET product or untangling a monolith? We map your bounded contexts, configure Orbit’s PostgreSQL schemas, OIDC provider, OpenTelemetry, and custom SKILL.md agent workflows for your domain—and hand off 100% of the code.
Orbit combines five isolated bounded contexts, PostgreSQL 18 schema-per-module isolation, a custom System.Threading.Channels topic-routed pub/sub bus, end-to-end OpenTelemetry (Aspire Dashboard), plug-and-play OIDC auth, 49 boundary tests, and 8 SKILL.md workflows for AI coding agents.
Choose a modular monolith when your domain has multiple bounded contexts that evolve rapidly, share transactional velocity, or belong to a single engineering organization that should not pay distributed broker, network, and deployment overhead prematurely.
Yes. Orbit ships with the domain-adaptation and configure-auth-idp skills for self-serve re-targeting, and Milan Jovanović also offers custom domain setup and source-code handoff engagements for teams.
Orbit gives .NET teams a battle-tested modular monolith baseline where every module owns its PostgreSQL 18 schema, asynchronous integration events travel over a topic-routed System.Threading.Channels bus with W3C OpenTelemetry trace continuity, and 8 composable agent skills keep both human developers and AI coding agents aligned.