Open Source · MIT License

Build modular .NET apps with compile-time discovery

A modular monolith framework for .NET 10. Roslyn source generators discover your modules at build time. React 19 + Inertia.js frontend. Full-stack type safety.

Everything you need for modular .NET apps

A complete framework with compile-time safety, full-stack type generation, and batteries-included modules.

Compile-time Discovery

Roslyn source generators scan your modules at build time. Endpoints, DTOs, and menus are auto-registered with generated code you can inspect.

React 19 + Inertia.js

Build modern React frontends with server-driven navigation. Each module ships its own pages bundle, dynamically loaded by the host app via Blazor SSR.

Module Isolation

Each module gets its own database schema, permissions, settings, and menu entries. Cross-module communication happens through contracts and events.

Full-stack Type Safety

C# DTOs marked with [Dto] automatically generate TypeScript interfaces. Full IDE autocomplete across the stack.

CLI Tooling

Scaffold projects, modules, and features with the sm CLI. Built-in doctor command validates your project structure and auto-fixes issues.

Multi-Provider Database

SQLite for development, PostgreSQL or SQL Server for production. Schema isolation per module with automatic table prefix management.

Clean, convention-based code

Define modules and endpoints with minimal boilerplate. The source generator handles the wiring.

Define a Module
// BlogModule.cs
[Module("Blog", RoutePrefix = "blog")]
public class BlogModule : IModule
{
    public void ConfigureServices(
        IServiceCollection services,
        IConfiguration config)
    {
        services.AddDbContext<BlogDbContext>();
        services.AddScoped<IBlogContracts,
                            BlogContracts>();
    }
}
Create an Endpoint
// Endpoints/Blog/Browse.cs
public class Browse : IViewEndpoint
{
    public static void Map(IEndpointRouteBuilder app)
    {
        app.MapGet("/", async (
            BlogDbContext db,
            HttpContext http) =>
        {
            var posts = await db.Posts
                .OrderByDescending(p => p.CreatedAt)
                .ToListAsync();

            return Inertia.Render(
                "Blog/Browse",
                new { Posts = posts });
        });
    }
}
Full-stack Type Safety: C# DTO → TypeScript (auto-generated)
// C# — BlogPost.cs
[Dto]
public class BlogPostDto
{
    public Guid Id { get; set; }
    public string Title { get; set; }
    public string Content { get; set; }
    public DateTime CreatedAt { get; set; }
}
// TypeScript — auto-generated
export interface BlogPostDto {
  id: string;
  title: string;
  content: string;
  createdAt: string;
}

Batteries included

Ship faster with 9 built-in modules covering authentication, administration, and common application concerns.

Admin

System administration and management panel

Users

User management and profile handling

Permissions

Role-based access control (RBAC)

Dashboard

Analytics and overview widgets

Audit Logs

Activity tracking and audit trail

Settings

Runtime-configurable app settings

File Storage

Local, Azure Blob, and S3 providers

OpenIddict

OpenID Connect & OAuth 2.0

Page Builder

Dynamic page composition

How it works

A single deployable host discovers and wires modules at compile time.

SimpleModule.Host
Roslyn Source Generator Discovers modules, endpoints, DTOs at build time
Admin DbContext Endpoints React Pages
Users DbContext Endpoints React Pages
Your Module DbContext Endpoints React Pages
Contracts Cross-module APIs
Event Bus Decoupled messaging

Up and running in minutes

Four commands to go from zero to a running modular monolith.

1

Install the CLI

dotnet tool install -g SimpleModule.Cli
2

Create a new project

sm new project MyApp
3

Add a module

cd MyApp && sm new module Blog
4

Run your app

npm run dev

Ready to build?

Start building your modular .NET application today. Open source, MIT licensed.