ATProtoNet.Server.EntityFrameworkCore
0.4.0
dotnet add package ATProtoNet.Server.EntityFrameworkCore --version 0.4.0
NuGet\Install-Package ATProtoNet.Server.EntityFrameworkCore -Version 0.4.0
<PackageReference Include="ATProtoNet.Server.EntityFrameworkCore" Version="0.4.0" />
<PackageVersion Include="ATProtoNet.Server.EntityFrameworkCore" Version="0.4.0" />
<PackageReference Include="ATProtoNet.Server.EntityFrameworkCore" />
paket add ATProtoNet.Server.EntityFrameworkCore --version 0.4.0
#r "nuget: ATProtoNet.Server.EntityFrameworkCore, 0.4.0"
#:package ATProtoNet.Server.EntityFrameworkCore@0.4.0
#addin nuget:?package=ATProtoNet.Server.EntityFrameworkCore&version=0.4.0
#tool nuget:?package=ATProtoNet.Server.EntityFrameworkCore&version=0.4.0
ATProto.NET
A comprehensive .NET 10 SDK for the AT Protocol. Build custom AT Protocol applications with your own Lexicon schemas, interact with Bluesky, or host your own PDS — all from clean, modern .NET APIs.
Source: Forgejo (canonical) · GitHub (mirror — issues & PRs welcome here)
⚠️ This repository was mainly built by a coding agent. Thorough testing has been conducted, and the maintainer (Grandiras) is a human.
Why ATProto.NET?
The AT Protocol isn't just Bluesky — it's an open protocol where one account works across many apps. Each app defines its own Lexicon schemas and stores records in the user's Personal Data Server (PDS). ATProto.NET makes it easy to build these custom applications in .NET.
The SDK is in 0.* because, while it's near feature-complete, it's mostly vibe-coded and won't be called "stable" until it has been put through real use. There's no fixed timeline for 1.0 — the more this project gets exercised, the sooner it happens.
At a glance
- Custom Lexicon support —
RecordCollection<T>for typed CRUD on your own record schemas, plusQueryAsync<T>/ProcedureAsync<T>for custom XRPC methods. - OAuth & identity — full AT Protocol OAuth (DPoP, PAR, PKCE),
did:plc/did:webresolution, type-safeDid/Handle/AtUri/Nsid/Tid/RecordKey/Cid. - Bluesky, Chat, Ozone —
app.bsky.*(actors, feeds, graph, notifications, rich text, video),chat.bsky.*(conversations, DMs),tools.ozone.*(moderation). - Hosting — ASP.NET Core DI + JWT auth, Blazor components with cookie-based OAuth, .NET Aspire integration, and host your own PDS in-process via
ATProtoNet.Pds. - Repository internals — typed firehose consumer with CID/signature verification, MST, CAR v1 parsing, DAG-CBOR, PLC directory client, P-256/K-256 crypto.
- Lexicon tooling —
atproto-lexgendotnet toolfor bidirectional Lexicon JSON ↔ C#, schema diffing, and publishing.
Install
dotnet add package ATProtoNet
Additional packages (ATProtoNet.Server, ATProtoNet.Blazor, ATProtoNet.Aspire, ATProtoNet.Pds, ATProtoNet.Server.EntityFrameworkCore) and the atproto-lexgen dotnet tool are documented in the full package matrix.
A 30-second taste
The headline feature is RecordCollection<T> — strongly-typed CRUD on your own Lexicon schemas, stored in the user's PDS:
using ATProtoNet;
using System.Text.Json.Serialization;
// 1. Define your record type
public class TodoItem : AtProtoRecord
{
public override string Type => "com.example.todo.item";
[JsonPropertyName("title")] public string Title { get; set; } = "";
[JsonPropertyName("completed")] public bool Completed { get; set; }
}
// 2. Connect and authenticate
var client = new AtProtoClientBuilder()
.WithInstanceUrl("https://bsky.social")
.Build();
await client.LoginAsync("alice.bsky.social", "app-password");
// 3. Get a typed collection and do CRUD
var todos = client.GetCollection<TodoItem>("com.example.todo.item");
var created = await todos.CreateAsync(new TodoItem { Title = "Buy groceries" });
await foreach (var record in todos.EnumerateAsync())
Console.WriteLine($"[{(record.Value.Completed ? "x" : " ")}] {record.Value.Title}");
One AT Protocol account can power many such apps — todos, bookmarks, recipes, whatever — each with its own Lexicons, all stored in the same user's PDS.
Where to go next
| If you want to… | Read |
|---|---|
| Install, configure the client, and authenticate | Getting Started |
| Build your own AT Protocol app with custom records | Custom Lexicon Records |
| Use OAuth (recommended for user-facing apps) | OAuth Authentication |
| Wire AT Proto into an ASP.NET / Blazor backend | ASP.NET Core, Blazor |
| Consume the firehose with typed events | Firehose Streaming |
| Host your own PDS | PDS Hosting |
| Understand how the packages compose | Architecture |
| Everything else | docs/index.md |
Contributing
Issues and pull requests are welcome on GitHub (mirrored from Forgejo). See CONTRIBUTING.md for the dev setup, test workflow, and conventions.
License
MIT.
| Product | Versions 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. |
-
net10.0
- ATProtoNet (>= 0.4.0)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.0)
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 |
|---|---|---|
| 0.4.0 | 81 | 5/26/2026 |