Something went wrong. Try again.
A personal website builder for the Atmosphere
Something went wrong. Try again.
4 folders · 9 files
README.md
web — the Mooring app #
SvelteKit (Svelte 5) app serving the admin backend and, eventually, the SSR public sites. Deploys to Cloudflare Workers (ADR 0011) via @sveltejs/adapter-cloudflare.
Local development #
npm install # from the repo root (npm workspaces)
npm run db:migrate # apply D1 migrations to the local database
npm run dev # vite dev with emulated Workers bindings
Browse at http://127.0.0.1:5173, not localhost — with no OAuth key configured, the app runs as an atproto loopback OAuth client, and loopback redirect URIs must use 127.0.0.1.
To exercise the exact production runtime (workerd) instead of vite dev:
npm run build && npx wrangler dev
Configuration #
Secrets go in .dev.vars locally (see .dev.vars.example) and wrangler secret put in production:
OAUTH_PRIVATE_KEY_JWK— ES256 private key JWK (JSON). When set, the app is a confidential OAuth client serving its metadata at/client-metadata.jsonand keys at/jwks.json. When absent: loopback dev client.SESSION_SECRET— HMAC key for the session cookie. Required in production.
Layout notes #
src/lib/server/oauth/— atproto OAuth:workers-compat.tsis the shim layer that lets@atproto/oauth-client-noderun on Workers (seedocs/research/2026-08-03-oauth-workers-spike.mdfor why each shim exists),stores.tsthe D1-backed state/session stores,client.tsthe client factory.migrations/— D1 SQL migrations (wrangler d1 migrations apply).- The public-site renderer will be kept separable from this app (ADR 0005) when it lands.