GenericModularApi is a .NET 10 modular monolith skeleton for building projects from optional, replaceable modules.
The repo is intentionally small and explicit:
- modules are registered by the host, not discovered by assembly scanning;
- cross-module communication goes through contracts and integration events;
- EF Core is the practical unit of work;
- tenant support starts with shared-database isolation through
TenantId; - reliable cross-boundary publishing goes through outbox tables and a NATS JetStream adapter.
- optional cache-aside reads use provider-neutral contracts, HybridCache, and an opt-in Redis adapter.
- optional administration uses a separate CLI host, persisted RBAC/audit, and feature-owned admin front doors.
- optional admin HTTP APIs use a separate
Host.AdminApicomposition root. - optional background processing uses a separate
Host.Workercomposition root when deployments want HTTP hosts to avoid publisher, consumer, and task-worker load.
.\eng\restore.ps1
.\eng\build.ps1 -NoRestore
.\eng\test-fast.ps1 -NoBuildRun the full local development stack with Aspire:
.\eng\run-aspire.ps1Run only the API:
.\eng\run-api.ps1Run the optional admin CLI locally:
.\eng\run-admin.ps1 -- admin roles list --actor ownerRun the optional admin API locally:
.\eng\run-admin-api.ps1Run the optional worker locally:
.\eng\run-worker.ps1Run the optional worker in Aspire by setting:
$env:AppHost__Worker__Enabled = 'true'
.\eng\run-aspire.ps1Docker-backed tests are skippable by default. To require them:
.\eng\test-docker.ps1 -NoBuildStart with docs/README.md.
Useful entry points:
- Setup
- Architecture Overview
- Module System
- Administration
- Messaging and Outbox
- Tasks and Daemons
- Auth Module
- Administration Module
- Tenancy Module
- Naming Conventions
- Development Guidelines
- Documentation Guidelines
HTTP examples live in requests/auth.http and requests/admin-api.http.
This is a work-in-progress skeleton. The current reusable modules are Auth, Tenancy, Administration, Notifications, and TaskRuntime. Catalog, Ordering, and TaskSamples are compiled optional example modules used to prove stored data, admin surfaces, caching, cross-module integration, notifications, and task execution without being registered in default hosts.