Skip to content

AT Protocol demo scripts#461

Draft
cassidyjames wants to merge 4 commits into
mainfrom
cassidyjames/atproto-demo
Draft

AT Protocol demo scripts#461
cassidyjames wants to merge 4 commits into
mainfrom
cassidyjames/atproto-demo

Conversation

@cassidyjames
Copy link
Copy Markdown
Member

@cassidyjames cassidyjames commented May 13, 2026

This is my branch I've been using for demos locally and on Codespace. It adds two scripts:

  • atproto:setup to create item types under the given org
  • atproto:demo to actually feed items to Coop

My goal is for this branch to track main and not touch anything else in the codebase besides these scripts to keep things self-contained and reproducible.

Usage:

  1. Create the item types (run once after npm run create-org):

    cd server && npm run atproto:setup -- --org-id <orgId>

    Copy the item type ID printed at the end.

  2. Start the firehose connector (in a separate terminal):

    npm run atproto:demo -- --api-key <apiKey> --post-type-id <postTypeId>

Posts from the Bluesky firehose will be processed by automated rules as they arrive. The connector defaults to 100 submissions per minute; pass --rate-limit <n> to adjust. Use --dry-run to preview submissions without sending them.

There's probably a lot that can be improved, hence the draft status; I'm just opening this PR for visibility for now. :) Off the top of my head:

  • Submit reports in addition to items so we can demo reports
    • Random posts, or maybe scope it to an allowlist of known accounts for demos
  • Clean up the scripts (it's weird one is in server and the other is not)

Replace the placeholder `authorHandle: did` with separate `did`,
`handle`, and `displayName` fields populated via the Bluesky public
profile API. Profiles are cached per-DID to avoid redundant lookups.

Also renames the item types in atproto-setup from "Bluesky" to "atproto"
and adds `did` and `displayName` to the post schema.
@coderabbitai

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant