Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e894799
demo: experimental atproto demo
cassidyjames Apr 30, 2026
e3278db
demo: increase atproto firehose default rate limit to 100/min
cassidyjames Apr 30, 2026
2bd8450
demo: fetch author handle and display name from Bluesky API
cassidyjames Apr 30, 2026
0c5a649
Merge branch 'main' into cassidyjames/atproto-demo
cassidyjames May 18, 2026
0d19c3f
Merge branch 'main' into cassidyjames/atproto-demo
cassidyjames May 21, 2026
e1b7908
revert: restore client and server files to match main
cassidyjames May 21, 2026
1f749ce
demo: add post sampling buffer for report submission
cassidyjames May 21, 2026
3a6d762
demo: submit one mock report per minute
cassidyjames May 21, 2026
99fcc58
atproto: debugging output for reports
cassidyjames May 21, 2026
6711c49
atproto: update docs
cassidyjames May 21, 2026
2a1c066
demo: replace fixed report timer with rate-limited submission
cassidyjames May 21, 2026
cfbb45b
demo: add atproto content proxy for MRT review iframe
cassidyjames May 21, 2026
a8b9c03
demo: add embed fields to item type schema + setup update mode
cassidyjames May 22, 2026
defbaeb
demo: submit embed data with item submissions
cassidyjames May 22, 2026
6786403
demo: render embed cards in atproto content proxy
cassidyjames May 22, 2026
03dd8d6
demo: blur only images in atproto content proxy
cassidyjames May 23, 2026
7457ce8
demo: unblur images on hover in atproto content proxy
cassidyjames May 23, 2026
eba0231
atproto-proxy: blur immediately
cassidyjames May 23, 2026
ab02c32
atproto-proxy: Use Inter font
cassidyjames May 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ VITE_DOCS_URL=https://roostorg.github.io/coop/latest
# This is used to proxy the content URL to the content proxy service.
VITE_CONTENT_PROXY_URL=http://localhost:4000

# Comma-separated list of patterns to match content URLs that should be displayed in iframes
# Comma-separated list of patterns to match content URLs that should be displayed in iframes.
# For the atproto demo, set this to: bsky.app
VITE_CONTENT_URL_PATTERN=
64 changes: 64 additions & 0 deletions server/bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,67 @@ npm run recover-mrt-queue -- \
- Report history is best-effort: only inbound `submitReport` rows that made
it into `REPORTING_SERVICE.REPORTS` are restored. Rule-driven enqueues
(`ENQUEUE_TO_MRT`) never had a report history to begin with.

---

## atproto-proxy.mts

Content proxy for the MRT job review iframe. The review UI embeds post content in an iframe via a proxy URL (default: `http://localhost:4000`). bsky.app blocks direct embedding with `X-Frame-Options: SAMEORIGIN`, so this script fetches post data from the Bluesky public API instead and renders it as a standalone HTML page. It also handles blur and grayscale postMessage events sent by the review UI's wellness settings.

Run this alongside `atproto:demo` in a separate terminal:

```sh
cd server && npm run atproto:proxy
```

You also need to set `VITE_CONTENT_URL_PATTERN=bsky.app` in `client/.env` so the review UI knows to show the iframe for Bluesky post URLs.

**Options:**
- `--port` — port to listen on (default: `4000`)

---

## atproto-setup.ts

Creates (or updates) the AT Protocol item types needed by the atproto demo firehose connector. Run this once after `npm run create-org` to register the item types, then pass the printed item type IDs to `npm run atproto:demo`.

**Create mode** (first run):

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

**Update mode** (to add new fields to an existing org's item types):

```sh
cd server && npm run atproto:setup -- --org-id <orgId> --post-type-id <id> --user-type-id <id>
```

The script prints an **atproto Post item type ID** and an **atproto User item type ID** — copy both for use with `atproto:demo`.

## atproto-demo.mts

Feed a local Coop instance with real content from the [AT Protocol](https://atproto.com/) (Bluesky) firehose.

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

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

Copy both the **Post item type ID** and the **User item type ID** from the output.

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

```sh
npm run atproto:demo -- \
--api-key <apiKey> \
--post-type-id <postTypeId> \
--user-type-id <userTypeId>
```

Posts from the Bluesky firehose will appear as submitted items. With `--user-type-id` set, posts are also submitted as mock reports at a separate rate, routed to your default queue. Omit `--user-type-id` to skip report submission entirely.

Pass `--rate-limit <n>` to adjust the item submission cap (default: 100/min) and `--report-rate-limit <n>` for the report cap (default: 1/min). Use `--dry-run` to preview submissions without sending them.

See `atproto-demo.mts` for the full list of options.
Loading
Loading