
Open source · Critter Stack
Document database and event store on PostgreSQL
PostgreSQL as a transactional document database and the most complete event store on .NET.
Marten turns PostgreSQL into a document database and event store with a .NET-native API. Store and query documents with LINQ, append events to streams, and build projections that keep read models current inline, asynchronously, or on demand. It has been in production since 2016 and underpins systems in finance, healthcare, logistics, and IoT.
Marten pairs naturally with Wolverine for command handling and messaging, and shares its programming model with Polecat on SQL Server and Fisher on SQLite, so code written against one store moves to another.
JSONB storage with a rich LINQ provider, computed and duplicated-field indexes, patching, and full-text, vector, and hybrid search.
Streams with optimistic concurrency, snapshots, archiving, stream compaction, and strong-typed identifiers.
Single-stream, multi-stream, and flat-table projections, run inline with the write or by the async daemon with blue/green rebuilds.
Conjoined tenancy in one database, database-per-tenant, or tenants added at runtime without a deployment.
The aggregate handler workflow, transactional outbox, and declarative persistence in command handlers and HTTP endpoints.
Weasel generates and applies the schema, so a new database is one command away in development and CI.
New to Marten? These 5 posts are the ones to read first, in order.
54 posts from the JasperFx blog cover Marten. Here are the most recent.
17th November 2026Managed Projection Distribution with the Critter StackAsynchronous projections are stateful, so each one has to run on exactly one node, keep running when that node dies, and not pile up on one unlucky pod. Here is how Wolverine distributes Marten and Polecat projection work across a cluster, fairly by default and with database affinity for multi-tenanted systems, and what CritterWatch adds on top: visualization, operator controls, a lot more health monitoring, MCP tools, and LLM alert triage.
16th November 2026Indexing JSON Documents in Marten and PolecatStoring documents as JSON doesn't mean giving up database indexes. A tour of the indexing options in Marten on PostgreSQL and Polecat on SQL Server: single property, multi-property, unique, partial, GIN and GiST indexes, how child collection queries use them, how both tools detect and migrate index changes, and how to read the SQL and the query plan to prove an index is being used.
13th November 2026Tenants Taking TurnsA JasperFx client running thousands of tenants across hundreds of PostgreSQL databases was losing pods to out of memory kills during projection rebuilds. Here is how we worked through it together: partition the projection work by tenant, make the tenants take turns, and put a limit on the work in flight so one node can never load more than it can hold. Plus the other levers Marten gives you for very large systems, and how JasperFx works with clients on this kind of problem.
10th November 2026Clone n' Go with Stateful Resources and WeaselEvery Critter Stack tool that touches a database knows exactly what that database should look like, and can make it so. This is the basics of how that works: the AutoCreate modes, the Weasel migration engine underneath Marten, Polecat, Fisher and Wolverine, the stateful resource model that puts databases and message brokers behind one interface, and the four ways to get a schema into place from a laptop to a DBA-owned production database.
9th November 2026Our Plan for the Critter Stack on .NET 11JasperFx 3, Weasel 10, Marten 10, Polecat 6, Fisher 2, Wolverine 7 and CritterWatch 2 are all coming together on .NET 10 and .NET 11, and the headline is not the framework bump. It is the pile of opt-in defaults from the Wolverine 6.x and Marten 9.x lines that finally get to become the defaults, each with a single one-line opt-out. Here is what flips, why, what else is in the train, and how we are running the whole thing as one Stoat plan to dogfood Stoat before its 1.0.JasperFx builds and maintains Marten. A support plan gives your team direct access to us; consulting and workshops get a project moving.
WolverineCommand bus, message bus, and HTTP endpoints
CritterWatchMonitoring and operations for the Critter Stack
PolecatEvent store and document database on SQL Server 2025
FisherEmbedded event store and document database on SQLite
BobcatExecutable specifications and test supervision
AlbaIntegration testing for ASP.NET Core
WeaselSchema management for PostgreSQL, SQL Server, and SQLite