an atproto pds written in F# (.NET 9) 馃
pds fsharp giraffe dotnet atproto
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

1# PDSharp 2 3> A Personal Data Server (PDS) for the AT Protocol, written in F# with Giraffe. 4 5## Goal 6 7Build and deploy a single-user PDS that can host your AT Protocol repository, serve blobs, and federate with Bluesky. 8 9## Requirements 10 11- .NET 9.0 SDK 12- [Just](https://github.com/casey/just) (optional, for potential future task running) 13 14## Getting Started 15 16### Restore & Build the project 17 18```bash 19dotnet restore 20dotnet build 21``` 22 23### Run the tests 24 25```bash 26dotnet test 27``` 28 29### Run the Server 30 31```bash 32dotnet run --project PDSharp/PDSharp.fsproj 33``` 34 35The server will start at `http://localhost:5000`. 36 37### Verify 38 39Check the `describeServer` endpoint: 40 41```bash 42curl http://localhost:5000/xrpc/com.atproto.server.describeServer 43``` 44 45## Configuration 46 47The application uses `appsettings.json` and supports Environment Variable overrides. 48 49| Key | Env Var | Default | Description | 50| ----------- | ------------------- | ----------------------- | ------------------------- | 51| `DidHost` | `PDSHARP_DidHost` | `did:web:localhost` | The DID of the PDS itself | 52| `PublicUrl` | `PDSHARP_PublicUrl` | `http://localhost:5000` | Publicly reachable URL | 53 54Example `appsettings.json`: 55 56```json 57{ 58 "PublicUrl": "http://localhost:5000", 59 "DidHost": "did:web:localhost" 60} 61``` 62 63## Architecture 64 65### App (Giraffe) 66 67- `XrpcRouter`: `/xrpc/<NSID>` routing 68- `Auth`: Session management (JWTs) 69- `RepoApi`: Write/Read records (`putRecord`, `getRecord`) 70- `ServerApi`: Server meta (`describeServer`) 71 72### Core (Pure F#) 73 74- `DidResolver`: Identity resolution 75- `RepoEngine`: MST, DAG-CBOR, CIDs, Blocks 76- `Models`: Data types for XRPC/Database 77 78### Infra 79 80- SQLite/Postgres for persistence 81- S3/Disk for blob storage