DataStudio.Marten 2.0.2

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package DataStudio.Marten --version 2.0.2
                    
NuGet\Install-Package DataStudio.Marten -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataStudio.Marten" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataStudio.Marten" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DataStudio.Marten" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataStudio.Marten --version 2.0.2
                    
#r "nuget: DataStudio.Marten, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataStudio.Marten@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataStudio.Marten&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DataStudio.Marten&version=2.0.2
                    
Install as a Cake Tool

Data Studio

An admin UI for the data stores your ASP.NET Core application already uses, embedded in the application itself. Add AddDataStudio(), one call per module, and MapDataStudio(), and it runs inside your process against your own configured Marten store, NpgsqlDataSource and Kafka clusters: no connection string to hand over, no second deployment, and nothing that changes anything until you turn it on. MIT-licensed, net10.0, Blazor Server.

  • It knows what your application knows. Document aliases, duplicated fields, soft delete, tenancy, projections and topics' key formats come from your own configuration, which is why it shows more than a general SQL or Kafka client can.
  • Read-only until you say otherwise. Every capability is off by default, each is authorized by your own policies, and everything done through it is audited.
  • Registering it changes nothing. No global styles, no middleware order, no altered authentication, no second projection daemon. A host that adds the packages and never maps them is the application it was.

Marten

For MartenDB, over the application's own IDocumentStore: browse documents and their JSON, follow event streams and travel in time, watch and steer projections and the async daemon, check stored shapes against your types, run guarded queries (a clause box, SQL, LINQ) and see what a schema migration would change before it is applied. It brings the Postgres module's pages for the stores' databases.

Marten overview Document list
Overview: the store, its tenancy, stream identity and the databases behind it Documents: collections, a field:value search and its index verdict
Stream detail Projections
A stream: the timeline, each event's JSON and headers, and time travel beside it Projections and the async daemon: shard state, progression and the high-water mark

Postgres

For any application that registers an NpgsqlDataSource, Marten or not: a health advisor that says what is wrong, how sure it is and what to change; a database browser; sessions and locks; the statements that take the database's time; autovacuum, storage and replication; foreign keys as a diagram; and a SQL console whose guard is a read-only transaction. The findings are also available to your own code, with no UI, as DataStudio.Postgres.Diagnostics.

Health Query plan
Health: findings by area, each with its evidence, how sure the advisor is and what to change Query: a guarded SQL console that draws the plan and says what is wrong with it
Database browser Sessions
Database: every table, view, function, trigger, sequence and type; here a Quartz.NET job store Sessions: who is connected, what they run and what they wait for

Kafka

For the clusters, topics, partitions and consumer groups your application's own Kafka credentials can describe. Behind capabilities that are off by default: search for records by key, header, CloudEvents attribute or JSON path, read values with redaction rules applied before anything leaves the engine, export what you found and follow topics live. It never creates a topic, never commits an offset and never joins a group.

Kafka topic Kafka search
A topic: partitions, watermarks, configuration and each consumer group's lag Search: records by key, header, CloudEvents attribute or JSON path in a time window, with exactly what was read
Kafka record Kafka live tail
A record: key, headers, attributes and value, with the fields your rules redact masked Live tail: records as they arrive, paused and resumed without losing its place

Apache Kafka is a trademark of the Apache Software Foundation. Data Studio is not affiliated with or endorsed by the Apache Software Foundation.

Install

Your application Install
Uses Marten dotnet add package DataStudio.Marten
Uses Npgsql with no Marten dotnet add package DataStudio.Postgres
Uses only Kafka dotnet add package DataStudio.Kafka
Uses Marten and Kafka dotnet add package DataStudio.Marten, then dotnet add package DataStudio.Kafka
Is a Wolverine application with Kafka also dotnet add package DataStudio.Kafka.Wolverine
Wants only the health findings in its own code, with no UI dotnet add package DataStudio.Postgres.Diagnostics

Seven packages, released together at one version and pinned exactly to each other, so upgrade them together. DataStudio.Marten brings Marten (floor 9.57.0) and the Postgres module; Npgsql has floor 9.0.4 and Confluent.Kafka floor 2.14.0. PostgreSQL 15 to 19 are tested. What each package is and brings is in docs/setup.md.

Quick start

using DataStudio;
using DataStudio.Marten;

builder.Services
    .AddDataStudio()
    .AddMarten();          // or .AddPostgres(), and .AddKafka(kafka => kafka.AddCluster("primary", clientConfig))

// ...

app.MapDataStudio().RequireAuthorization();

The studio is then at /studio, read-only, behind whatever RequireAuthorization() means in your application. The front page has one tile per module, in the order you added them, and each module's pages are under its own segment: /studio/marten, /studio/postgres, /studio/kafka.

To let people change things, turn capabilities on and say who may use them:

builder.Services
    .AddDataStudio(studio => studio.AuthorizationPolicy = "Studio")
    .AddMarten(marten =>
    {
        marten.WriteAuthorizationPolicy = "StudioWrite";
        marten.Capabilities = MartenCapabilities.All();   // a development box; pick them one by one elsewhere
    });

The full registration (compiled from the sample, so it cannot drift), every option, the opt-in ASP.NET Core health check, tenancy and hosting notes are in docs/setup.md.

The first five minutes

  • Marten › Overview and Postgres › Health: your stores and databases, and findings with the StoreOptions line or the statement that would change each one.
  • Documents: a collection, a field:value search with its index verdict, a document's JSON and metadata.
  • Events: a stream's timeline and time travel; Event flow shows which projections read which event types.
  • Query: the clause box, the SQL console and LINQ mode keep recent and saved queries in your browser.
  • Kafka › Search: pick a topic and a time window, then search by key, header or attribute.
  • Find by id (the header box, / or Ctrl+K): paste a document id, a stream id, a table name or a queryid.
  • Press ? for every keyboard shortcut. Activity lists what was done through the studio in this process.

Safe by default

  • Three layers of authorization, all yours. Who gets in (DataStudioOptions.AuthorizationPolicy); which store, database, tenant, cluster or topic they see; and who may use each capability. The studio authenticates nobody, and a startup guard refuses a mapping that answered none of it.
  • Capabilities are off by default, and ReadOnly turns them all off again whatever they say. Refusals live in the service layer, not in the markup, and every use is audited, failed or not.
  • The SQL console's guard is the transaction: SET TRANSACTION READ ONLY, timeouts and an optional SET LOCAL ROLE. A read-only transaction is not a sandbox, so grant RunSql to people you would give psql to.
  • Secrets stay where they are. A connection string is never shown, only its settings one by one; Kafka values are redacted inside the engine by rules you declare, before any page, export or log sees them.

More: docs/authorization.md, the threat model in docs/security.md, and the short form with today's limits in docs/limits.md.

What it is not

Not a standalone application, not a fleet monitor and not a connection-string tool: there is no "point it at a database" mode. CritterWatch is the Critter Stack's fleet console; pgAdmin is a general SQL client. Data Studio is the local one between them: this process, this store, with your own configuration in front of you.

More screenshots

Overview, dark Document detail
The dark theme, from the picker behind the gear button One document: JSON on the left, what its metadata columns say on the right
Dead letters Schema drift
Dead letters, expanded to the failing event and its exception Schema: what Marten would change, before anything is applied
Relationships over tables Relationships
Relationships over plain tables beside the document types Relationships: the foreign keys StoreOptions declares, checked against the ones Postgres holds
Table rows Row detail
A table's rows: a filter with its index verdict, keyset paging and typed headers One row: every column, what it points at and what points at it
Kafka topics Kafka related records
Kafka: the topics the application's own credentials can describe Kafka: the records related to one record across topics, by the correlation fields you declare
Postgres overview Front page
The Postgres module alone, in a host with no Marten The front page: one tile per module, in the order the host added them

Documentation

Setup Packages, registration, options, tenancy, hosting
Authorization and capabilities The three layers, the resources your policies are asked about, every capability
Every screen What each page of each module shows
Postgres module, health advisor, finding codes The database pages, the checks and their stable codes
Kafka module Clusters, topics, search, redaction, export, live tail, limits
Diagnostics API The findings in your own code, with or without the UI
Security model, limits The threat model, and what Data Studio does not do yet
LINQ mode, Connection page, compaction Single features in depth
PostgreSQL versions, Aurora What is tested, and what differs on managed platforms
Stability, upgrading from 1.x, changelog What is promised between releases

Try the samples

dotnet run --project samples/DataStudio.Sample.Marten

With Docker running and nothing configured, each sample starts throwaway containers, says so in a loud banner and seeds demo data; none ever falls back to localhost. samples/DataStudio.Sample.Kafka shows Marten and Kafka side by side, and samples/DataStudio.Sample.Postgres the Postgres module alone. Users, switches and what is seeded are in docs/sample.md.

Building, versioning, contributing

.\build.ps1 Test builds and runs everything (the integration suites need Docker); details are in docs/building.md. A release of any size may still break what a host compiles against, so pin the version you tested: docs/stability.md says what is promised. To report a vulnerability, see SECURITY.md. AGENTS.md holds the rules and design decisions of this codebase; read it before opening a pull request.

License

MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-preview.5 0 12/3/2026
3.0.0-preview.4 43 12/2/2026
3.0.0-preview.3 55 12/2/2026
3.0.0-preview.2 80 11/30/2026
3.0.0-preview.1 81 11/28/2026
2.0.2 110 11/28/2026
2.0.1 106 11/21/2026
2.0.0 118 11/19/2026
2.0.0-beta.3 61 11/19/2026
2.0.0-beta.2 59 11/19/2026
2.0.0-beta.1 64 11/17/2026