Compile-time-first application framework and workspace standard for building clean architecture services.
NFramework removes the runtime bloat, reflection-heavy startup, vendor lock-in, and inconsistent structure of traditional enterprise frameworks. It gives teams a fast, opinionated way to scaffold services, enforce architecture boundaries, generate boilerplate safely at compile time, and operate services in modern cloud environments from day one.
The first delivery focus is a .NET 11 reference implementation that proves the core architecture, developer experience, and Native AOT readiness. The long-term vision is a polyglot ecosystem across .NET, Go, and Rust with MCP-compatible tool and agent integrations.
Teams building modern microservices keep hitting the same walls:
- Frameworks lean on runtime reflection, slowing startup and breaking Native AOT.
- Clean Architecture rules are documented but not enforced, so boundaries decay.
- New services need large amounts of manual scaffolding and duplicate boilerplate.
- Infrastructure leaks into application and domain layers, hurting testability.
- Polyglot teams struggle to keep one architecture, naming, and contract model across languages.
- Cloud-native building blocks (telemetry, messaging, state, orchestration) get bolted on late.
NFramework answers these with a unified CLI, compile-time code generation, strict layer rules, and a clear path from local development to distributed deployment.
- Clean Architecture & Clean Code by Default — Layer boundaries, dependency direction, explicit result types, and generated structure reinforce separation of concerns without manual discipline.
- Pure Core — Domain and application layers never depend on persistence, messaging, or HTTP libraries directly.
- Zero-Dependency Layers with Replaceable Adapters — Framework packages carry no external dependencies; integrations live in separate adapters that depend on abstractions, never the reverse.
- Exception-Free Business Flow — Workflows prefer
Result<T>over exceptions for expected outcomes. - Compile-Time Magic Over Runtime Magic — DI registration, route discovery, and boilerplate are generated at build time.
- Ready for Microservices — Telemetry, logging, metrics, health checks, and observability are part of the generated baseline.
- One Standard, Many Languages — The workspace model, folder structure, and contracts stay stable across languages.
A single CLI-driven workflow for creating and evolving NFramework workspaces and services, with both interactive and non-interactive modes.
nfw templates # List available starter templates
nfw new my-workspace --template <id> --no-input # Create a workspace
nfw add service Orders --lang dotnet # Scaffold Domain/Application/Infrastructure/Api
nfw add entity Product # Create the entity class
nfw add crud Product --props Name:string,Price:decimal # Full CRUD scaffold for an entity
nfw add command ApproveOrder Orders # Standalone command flow
nfw add query GetOrderByNumber Orders # Standalone query flow
nfw check # Validate architecture boundaries (CI-friendly)Generation supports opt-in feature settings for caching, logging, transaction, secured operation, and API exposure, and an interactive TUI for workspace management, creation wizards, a command palette, and real-time diagnostics.
| Area | What you get |
|---|---|
| Domain | Base abstractions for Entity<TId>, AggregateRoot, ValueObject, DomainEvent |
| Application | Result / Result<T>, CQRS contracts (commands, queries, events, stream requests, behaviors), business rules, pageable requests |
| CQRS pipeline | Framework-native command/query dispatch, compatible with the Result-based flow |
| Source generators | Deterministic DI registration and Minimal API routes — no runtime assembly scanning |
| Persistence | Abstract repository contracts (CRUD, paging, dynamic querying, bulk ops, migrations) + EF Core adapter |
| Security | JWT auth, refresh tokens, authorization, operation claims, email/OTP authenticators |
| Cross-cutting | Abstractions + adapters for validation, mapping, logging, problem details, localization, translation, mailing, search |
| Architecture audit | nfw check fails fast on forbidden references and namespace usage |
First-party adapters in beta: EF Core (persistence), FluentValidation (validation), Mapster / manual mapping, Serilog (logging).
In scope for beta — .NET-first, execution-focused: CLI + TUI, source-generated DI & routes, framework-native CQRS, topic abstractions with adapters, single-command build & test, quickstart docs.
Planned post-beta:
- Aspire
AppHost+ServiceDefaultsfor distributed local dev and observability - Dapr adapters for pub/sub, state management, and secret store
nfw uplocal orchestration- Go and Rust service scaffolding on the same workspace standard
- MCP-compatible tool and agent integrations
- Protobuf-first contract generation and
nfw synccross-language sync (gRPC)
Delivery sequencing lives in the per-repository roadmap.
- A generated "hello world" .NET service builds with 0 AOT / trimming warnings.
- A standard service cold-starts in < 50 ms under benchmark conditions.
- Generating a CRUD flow takes < 10 seconds to a buildable endpoint.
- Creating a new workspace completes in < 1 second.
- A .NET developer can understand a generated Go service in ≤ 10 minutes.
- ASP.NET MVC / controller-based scaffolding
- Runtime-reflection fallbacks for compile-time features
- Hiding generated code — it stays inspectable and debuggable
- Exception-driven business flow as a primary pattern
NFramework — clean architecture, Native AOT, and CLI-driven automation as non-negotiable foundations.