a reimplementation of Bluesky's Statusphere example app, using atcute and SvelteKit.
install dependencies:
pnpm install
set up the environment variables:
pnpm env:setup
this copies the .env.example file to .env with the following values filled in:
COOKIE_SECRET - random secret for signing cookiesOAUTH_PRIVATE_KEY_JWK - ES256 keypair for OAuthstart a Tap instance:
docker run -p 2480:2480 \
-v ./data:/data \
-e TAP_DATABASE_URL=sqlite:///data/tap.db \
-e TAP_SIGNAL_COLLECTION=xyz.statusphere.status \
-e TAP_COLLECTION_FILTERS=xyz.statusphere.status,app.bsky.actor.profile \
ghcr.io/bluesky-social/indigo/tap:latest
Tap handles subscribing to the atproto firehose, backfilling repos, and filtering events. we set it up such that it'd backfill all repos that have posted a status, and only emits events for status and profile records.
then configure the Tap connection:
TAP_URL=http://localhost:2480
# if configured with a password
TAP_ADMIN_PASSWORD=
set up a tunnel:
confidential OAuth clients requires a publicly accessible URL. for local development, you'll need to tunnel your local server using a service like ngrok or cloudflared.
once running, set the tunnel URL as your public URL in .env:
OAUTH_PUBLIC_URL=https://your-tunnel-url.example.com
migrate the database:
pnpm db:migrate
run it!
pnpm dev