Something went wrong. Try again.
An easy to set up and operate PDS admin panel. forked from brookie.blog/pds-operator
Something went wrong. Try again.
Files
Verified signature Signed by scanash.com SHA256:+SmSDOGjqryRjeSnPDJxSAeczyFrIlGy3oQW5tu+ptI Click to copy SHA
- TypeScript 87%
- CSS 12%
- Docker <1%
- HTML <1%
README.md
# PDS Operator
Self-hosted admin dashboard for an [atproto](https://atproto.com) PDS: account
list/search/takedown/enable/password-reset, moderation-labeler flags with Bluesky DM
alerts, relay sync status, invite codes, passkey sign-in, and an audit log. Talks to the
PDS and relay only over their public HTTPS APIs, no SSH/DB access required.

<p>
<img src="docs/screenshot.png" width="49%" alt="flagged accounts view" />
<img src="docs/login.png" width="49%" alt="login with passkey" />
</p>

## How it works
The server keeps a local SQLite copy of everything in `server/data.sqlite`. A background
syncer does a full pass against the PDS on startup and every 15 minutes. Between passes
it stays subscribed to the PDS firehose and each labeler's label stream, so handle
changes, takedowns, and new labels land within seconds. Stream cursors survive restarts,
and dead sockets are detected and reconnected. Requests to outside services (avatars,
label backfill) are throttled and retried with backoff when rate limited. The SQLite
file is a rebuildable cache. The only data worth backing up is `server/audit.log`.
## Setup
```
cd web && npm install
cd ../server && npm install
npm run setup # interactive, writes server/.env
```
The wizard asks for the PDS, relay, and DM alert config, generates a session secret, and
can start the server and mint a passkey enrollment link in one go. It can also generate
a fly.toml and print the fly.io deploy commands (optional, any host works). The operator password is optional. Leave it empty
for passkey-only sign-in, where enrollment links from the CLI are the only way in:
```
npm run enroll # prints a single-use link + QR code, expires in 15 minutes
```
Run it again any time to enroll another device, or as recovery if all passkeys are lost
(shell access is the break-glass). To configure by hand instead, copy `.env.example` to
`server/.env` and generate the hash with
`n…