atcute-statusphere-example Svelte Themes

Atcute Statusphere Example

Statusphere, but in atcute and SvelteKit

statusphere

a reimplementation of Bluesky's Statusphere example app, using atcute and SvelteKit.

setup

  1. install dependencies:

    pnpm install
    
  2. 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 cookies
    • OAUTH_PRIVATE_KEY_JWK - ES256 keypair for OAuth
  3. start 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=
    
  4. 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
    
  5. migrate the database:

    pnpm db:migrate
    
  6. run it!

    pnpm dev
    

Top categories

Loading Svelte Themes