MASA Framework is a .NET next-generation microservice development framework that delivers cloud-native best practices built on top of the Distributed Application Runtime (Dapr). It lets you compose modern applications — distributed systems, microservices, Domain-Driven Design, and multi-tenant SaaS platforms — from a rich set of independently installable building blocks, without locking your domain logic to any single vendor or technology.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/masastack/MASA.Framework/llms.txt
Use this file to discover all available pages before exploring further.
Two-Layer Architecture
Every capability in MASA Framework is split into two complementary NuGet layers:Masa.BuildingBlocks.*— Pure abstractions: interfaces, base classes, and contracts. Your domain and application code depends only on these packages.Masa.Contrib.*— Concrete implementations: plug in the provider you need (SQL Server, Redis, Dapr, etc.) and swap it later without touching a single line of domain logic.
Because your service classes depend on
Masa.BuildingBlocks abstractions, you can swap a Masa.Contrib implementation package — for example, switching from SQL Server to PostgreSQL — with just a one-line change in Program.cs.Why Use MASA Framework?
Composable Packages
Install only the building blocks you need. Each block is a separate NuGet package; there is no monolithic framework dependency.
Dapr Integration
First-class Dapr support for service invocation, pub/sub integration events, distributed state, and secret management.
Swap Implementations Freely
Abstractions in
Masa.BuildingBlocks mean you change a Contrib package, not your domain code, when switching databases or message brokers.Full DDD Support
Aggregate roots, domain events, repositories, and CQRS patterns ship as first-class concepts in the framework.
Key Building Blocks
MASA Framework provides the following building blocks out of the box:| Building Block | Package Prefix | Description |
|---|---|---|
| EventBus | Masa.BuildingBlocks.Dispatcher.Events | In-process event dispatching with middleware pipeline |
| Integration Events | Masa.BuildingBlocks.Dispatcher.IntegrationEvents | Cross-service pub/sub via Dapr |
| Minimal APIs | Masa.BuildingBlocks.Service.MinimalAPIs | Convention-based route auto-mapping via ServiceBase |
| Caching | Masa.BuildingBlocks.Caching | Unified distributed and multilevel cache abstractions |
| Configuration | Masa.BuildingBlocks.Configuration | Pluggable configuration providers including DCC |
| DDD | Masa.BuildingBlocks.Ddd.Domain | Aggregates, domain events, repositories |
| EF Core | Masa.Contrib.Data.EFCore.* | EF Core integration for multiple databases |
| Isolation | Masa.BuildingBlocks.Isolation | Multi-tenant and multi-environment data isolation |
| Background Jobs | Masa.BuildingBlocks.Extensions.BackgroundJobs | Scheduled and queued job abstractions |
| Rules Engine | Masa.BuildingBlocks.RulesEngine | Pluggable business rules evaluation |
| Object Storage | Masa.BuildingBlocks.Storage.ObjectStorage | Cloud object storage abstractions |
| I18n | Masa.BuildingBlocks.Globalization.I18n | Internationalization and localization |
| CQRS | Masa.BuildingBlocks.ReadWriteSplitting.Cqrs | Command/Query separation scaffolding |
NuGet Package Naming Convention
MASA Framework follows a consistent naming pattern that makes it easy to find and pair packages:License
MASA Framework is released under the MIT License. Copyright © 2021–present MASA Stack.Explore Further
Quickstart
Build your first MASA Framework microservice with EventBus, Minimal APIs, and EF Core in five steps.
Architecture
Deep-dive into the BuildingBlocks/Contrib layering, MasaApp global service locator, and assembly scanning.
Event Bus
Learn how to publish and handle in-process events with the MASA EventBus and middleware pipeline.
DDD Overview
Understand how MASA Framework models aggregates, domain events, and repositories for DDD projects.