Flake to setup a local env for atproto development
8
fork

Configure Feed

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

Its working !

+84
+78
README.md
··· 1 + # AT Protocol Development Environment 2 + 3 + A Nix-based development environment for running AT Protocol services (PDS, PLC, Caddy proxy, and MailHog). 4 + 5 + ## Quick Start 6 + 7 + 1. **Enter the development environment:** 8 + ```bash 9 + nix develop 10 + ``` 11 + 12 + 2. **Start all services in tmux:** 13 + ```bash 14 + nix run .#all 15 + ``` 16 + This will start all services in a 2x2 tmux pane layout: 17 + - Top-left: PLC server 18 + - Bottom-left: MailHog server 19 + - Top-right: PDS server 20 + - Bottom-right: Caddy proxy 21 + 22 + 3. **Create an invite code:** 23 + ```bash 24 + scripts/create-invite.sh 25 + ``` 26 + 27 + 4. **Create a user account:** 28 + ```bash 29 + goat account create \ 30 + --pds-host=https://pds.example.org:8443 \ 31 + --password=password \ 32 + --email=hello@example.org \ 33 + --invite-code=pds-example-org:8443-xyldq-yrhxc \ 34 + --handle=edouard.pds.example.org 35 + ``` 36 + 37 + Expected output: 38 + ``` 39 + Success! 40 + DID: did:plc:pzvsc3jwfjwidojtpbxv4rdd 41 + Handle: edouard.pds.example.org 42 + ``` 43 + 44 + 5. **Verify the DID is registered:** 45 + ```bash 46 + goat --plc-host=https://plc.example.org data did:plc:pzvsc3jwfjwidojtpbxv4rdd 47 + ``` 48 + 49 + ## Services 50 + 51 + - **Bluesky PDS**: https://pds.example.org:8443 52 + - **DID PLC**: https://plc.example.org:8444 53 + - **MailHog**: http://localhost:8025 54 + 55 + ## Available Tools 56 + 57 + - `goat` - AT Protocol CLI tool 58 + - `curl`, `jq` - HTTP and JSON utilities 59 + - `tmux` - Terminal multiplexer 60 + 61 + ## Management Commands 62 + 63 + - `tmux attach -t atproto` - Attach to the services session 64 + - `tmux kill-session -t atproto` - Stop all services 65 + - `nix run .#generate-certs` - Generate SSL certificates 66 + 67 + ## Prerequisites 68 + 69 + Make sure to add these lines to your `/etc/hosts` file: 70 + ``` 71 + 127.0.0.1 pds.example.org 72 + 127.0.0.1 plc.example.org 73 + ``` 74 + 75 + Generate SSL certificates before first use: 76 + ```bash 77 + nix run .#generate-certs 78 + ```
+6
packages/pds.nix
··· 40 40 export PDS_HOSTNAME="pds.example.org:8443" 41 41 export PDS_SERVICE_URL="https://pds.example.org:8443" 42 42 43 + # Configure supported handle domains 44 + export PDS_SERVICE_HANDLE_DOMAINS=".pds.example.org" 45 + 43 46 # Enable development mode 44 47 export PDS_DEV_MODE="true" 48 + 49 + # Configure logging 50 + export LOG_ENABLED="true" 45 51 46 52 # Configure SMTP for MailHog 47 53 export PDS_EMAIL_SMTP_URL="smtp://localhost:1025"