···11+# CLAUDE.md
22+33+This file provides guidance to Claude Code (claude.ai/code) and other agents when working with code in this repository.
44+55+## Commands
66+77+```bash
88+bun run dev # dev server
99+bun run build # SSR build via adapter-node → build/
1010+bun run preview # preview production build locally
1111+1212+bun install # install deps (uses bun.lock, not package-lock)
1313+```
1414+1515+there are no tests and no lint script. build success is the primary correctness signal.
1616+1717+## Architecture
1818+1919+SvelteKit app with `@sveltejs/adapter-node`, running under Bun in production. deployed via Docker with env vars injected at runtime.
2020+2121+**data flow:**
2222+2323+- `+page.server.ts` — SSR only. calls `com.atproto.sync.listRepos` (unauthenticated, max 1000), then `Promise.allSettled` over all active DIDs doing parallel `describeRepo` + `getRecord` fetches. avatar URLs use `https://blobs.blue/{did}/avatar@webp` (no CID parsing needed).
2424+- `api/invite/+server.ts` — POST endpoint. in-memory IP rate limit (`Map<string, number[]>`), then raw `fetch` to the PDS using Basic auth (`admin:{PDS_ADMIN_PASSWORD}`). rate limiting is disabled in `dev` mode.
2525+- `+page.svelte` — client component. invite code generation, clipboard copy, error display. pdsmoover link at bottom.
2626+2727+**env vars** (all read via `$env/dynamic/private` — resolved at runtime, never baked into bundles):
2828+2929+- `PDS_URL` — required for all PDS calls
3030+- `PDS_ADMIN_PASSWORD` — required for invite code generation
3131+- `INVITE_RATE_LIMIT` — codes per IP per window (default 3)
3232+- `INVITE_RATE_WINDOW` — window in seconds (default 86400)
3333+3434+**key constraint:** `$lib/server/` is enforced server-only by SvelteKit. never use `process.env` directly for secrets — use `$env/dynamic/private`. never import from `$lib/server/` in `+page.svelte` or any client-accessible module.
3535+3636+**styling:** ported from `../site/` — Host Grotesk variable font, oklch color vars (`--color-bg`, `--color-surface`, `--color-fg`), dark mode via `prefers-color-scheme`. pds.ls button icon uses CSS `mask-image` over a vectorized SVG (`static/pdsls-icon.svg`, generated with potrace from the upstream PNG).
···11+# Disclaimer!!!
22+33+this project is entirely vibecoded by sonnet 4.6 (except for the readme i made that myself), if you use this project i cannot guarentee that you will not suffer your pds admin password leaking, though i've attempted to manually make sure that it won't/can't get leaked.
44+55+this is a project specifically for my own selfish desires and i was too lazy to make it myself, _you have been warned._
66+77+---
88+99+# tea party
1010+1111+this is a basic svelte frontend for a pds which displays repos/accounts on a specific pds and has invite code generation (for a semi-open pds). this is mostly server side rendered.
1212+1313+## hosting
1414+1515+**_did you read the [disclaimer?](#Disclaimer!!!)_**
1616+1717+dependancies are:
1818+1919+- `bun`
2020+2121+copy `.env.example` to `.env` and edit as needed
2222+2323+### dev
2424+2525+```bash
2626+bun install
2727+bun run dev
2828+```
2929+3030+### prod
3131+3232+use the `Dockerfile` or:
3333+3434+```bash
3535+bun install
3636+bun run build
3737+bun ./build/index.ts
3838+```