A modern, lightweight, and extensible framework for building scalable event-sourced applications using Domain-Driven Design principles. Built for .NET 9+, cloud-native, production-ready.
A complete toolkit for building scalable, auditable, and maintainable .NET applications with proven architectural patterns.
First-class support for Aggregates, Entities, Value Objects, and Bounded Contexts. Model your business domain with clarity.
Complete command/query separation with optimized read models. Sagas orchestrate complex business processes across boundaries.
Event-first design with full audit trail, command replay for debugging, and state reconstruction at any point in time.
AWS SQS/SNS integration for distributed command and event processing. FIFO queues, KMS encryption, automatic resource provisioning.
Built-in distributed tracing and metrics. <1ms overhead, Jaeger/Zipkin/OTLP exporters, custom Grafana dashboards.
Polly circuit breakers, retry policies with exponential backoff. ArrayPool optimization delivers 40× memory reduction.
Commands flow through sagas, events project into read models — all with built-in persistence and replay.
Define aggregates, sagas, and views with clean, strongly-typed code.
// 1. Install packages
// dotnet add package SourceFlow.Net
// dotnet add package SourceFlow.Stores.EntityFramework
using SourceFlow;
using SourceFlow.Stores.EntityFramework.Extensions;
var services = new ServiceCollection();
// Register types & configure SourceFlow
EntityDbContext.RegisterAssembly(typeof(Program).Assembly);
ViewModelDbContext.RegisterAssembly(typeof(Program).Assembly);
services.UseSourceFlow(typeof(Program).Assembly);
services.AddSourceFlowEfStores("Server=localhost;Database=SourceFlow;...");
var sp = services.BuildServiceProvider();
// Use it!
var factory = sp.GetRequiredService<IAggregateFactory>();
var account = await factory.Create<IAccountAggregate>();
account.CreateAccount(1, "John Doe", 1000m);
account.Deposit(1, 500m);
account.Withdraw(1, 200m);
Modular packages — install only what you need.
Core framework with Aggregates, Sagas, Commands, Events, Views, Command Bus, Event Queue, and OpenTelemetry observability.
Production-ready persistence using EF Core. SQL Server, PostgreSQL, SQLite, MySQL. Polly resilience, dynamic migrations, observability.
Distributed messaging with Amazon SQS, SNS, and KMS. FIFO queues, automatic provisioning, idempotency, dead letter queues.
By Najaf A. Shaikh · First Edition, 2026. 32 chapters of runnable code evolving from naive CRUD to a containerised, observable, event-sourced system built on SourceFlow.Net.
SourceFlow.Net is licensed under the permissive MIT license. Built in the open for the .NET developer community.
MIT licensed. 100% free for both commercial and personal use. No vendor lock-in, no hidden subscriptions.
Built for developers, by developers. We welcome pull requests, discussions, issue reports, and feedback on GitHub.
Production-grade performance, scalability, and stability, maintained transparently in public repositories.
| Package | Version | Release | Highlights | Frameworks |
|---|---|---|---|---|
| SourceFlow | v2.0.0 | 15 Mar 2026 | Cloud.Core consolidated. Breaking namespace changes. | .NET 10 / 9 / Standard 2.1 / 2.0 |
| SourceFlow.Stores.EntityFramework | v2.0.0 | 29 Nov 2025 | EF store + cloud idempotency provider. | .NET 10 / 9 / 8 / Standard 2.1 / 2.0 |
| SourceFlow.Cloud.AWS | v2.0.0 | 15 Mar 2026 | SQS/SNS/KMS, LocalStack testing, benchmarks. | .NET 10 / 9 / 8 |
| SourceFlow.Cloud.Azure | v2.0.0 | TBC | Azure Service Bus + Azurite testing. | .NET 10 / 9 / 8 |