Carrel
The writing desk, where drafts are written, checked, and published.
- Ring
- What people use
- Kind
- writing
- Address
- carrel.dustinedwards.info
- Source
- DrDustinEdwards/
carrel - Visibility
- Public
- Parts
- 7
- Connections
- 14
- Write-up
- Carrel on dustinedwards.info
How it connects
Used by 2
Inside Carrel
Runs
Carrel Worker
Cloudflare Worker
Carrel Worker The editor behind Access, and the MCP door AI sessions use, in one Worker. writes to carrel reads Site Worker (dustinedwards.info) publishes to Site Worker (dustinedwards.info) writes to OAUTH_KV reads Cloudflare Access serves AI sessions writes to GitHub reads GitHub reads Google writes to Email writes to Writings reads Writings writes to carrel-desk-tool-callsFifteen-minute check
Workers cron trigger
Fifteen-minute check Checks each connected site against site-api's contract and refreshes Carrel's index of its posts. watches Site Worker (dustinedwards.info) writes to carrel reads Google writes to Bluesky and X writes to Drafting routine writes to Email writes to MCP Worker (Capsid)Nightly backup
Workers cron trigger
Nightly backup Dumps the D1 database into carrel-backups with d1-dump, alone, once a night. writes to carrel-backups reads carrel
Stores
carrel
D1
carrel People and roles, working drafts, AI drafts, flags and the index of each site's posts.OAUTH_KV
Workers KV
OAUTH_KV Grants and tokens for the AI door's OAuth provider.carrel-backups
R2
carrel-backups The nightly D1 dumps.carrel-desk-tool-calls
R2
carrel-desk-tool-calls Copies of the tool-call log, kept after the log prunes them.
Outside
Cloudflare Access
Access, and Access for SaaS
Cloudflare Access Guards every page at the Worker level, and is the login behind the AI door's own OAuth.AI sessions
MCP clients
AI sessions The AI sessions that read posts, save AI drafts and flag problems through the AI door.GitHub
Repos, Actions, a GitHub App
GitHub The GitHub App Carrel commits book files to Writings through, and CI, which deploys the Worker. deploys Carrel Worker watches Carrel WorkerGoogle
Drive and Search Console APIs
Google Manuscripts in a shared Drive folder, and search data for dustinedwards.info.Bluesky and X
Bluesky and X APIs
Bluesky and X Where Carrel posts original social posts. It never replies, messages, follows or likes.Drafting routine
Claude Code routine
Drafting routine Drafts brand posts when no session drafted them ahead. Carrel only fires it.Email
Workers send_email binding
Email Alerts when a site's state changes, and the unpublish link after an AI publish.Writings
Private Git repository
Writings One folder per book: chapters of scene files, outlines, characters, places and world rules, plus Dustin's own voice passages.
Uses 12
- Capsid writes to
- d1-dump installs
- devkit installs
- site-runtime installs
- Capsomer installs
- site-api installs
- Germomics publishes to
- dustinedwards.info reads, publishes to, watches
- TXASM publishes to
- julieedwards.info publishes to
- Foxing publishes to
- Foxhound publishes to
Step by step
Publishing a post
A post goes from a private draft in Carrel to a live page on dustinedwards.info. Every site speaks the same contract, and the site decides what may go live.
- Drafted: the writer works in Carrel's editor, which autosaves a draft only that person can see.
- Previewed: Carrel shows the draft as the site will render it, in a sandbox, next to any flags from the checks and reviewers.
- Saved: an Editor or the Owner saves the draft to the site and names the version it replaces. The site refuses an out-of-date save, so nobody overwrites newer work.
- Published: only the Owner can publish, and a first publish asks for confirmation. The site's own publish policy makes the call, so one place decides.
- Or by instruction: the Owner's AI session can publish through MCP, but never while a flag is open. It sends no text, so only the saved version goes live, and Dustin gets an email with an unpublish link.
- Recorded: Carrel indexes the live post, records who published it (an AI session by its client name) and clears the sent draft.
- Watched: every 15 minutes, Carrel runs site-api's conformance suite against the site and sends an email when the result changes.
Flows through it
- Publishing a post, in 7 steps: A post goes from a private draft in Carrel to a live page on dustinedwards.info. Every site speaks the same contract, and the site decides what may go live.
Its riskiest functions
| Function | Module | Complexity | Covered | CRAP |
|---|---|---|---|---|
Editor | app/routes/editor.tsx | 129 | 0% | CriticalCRAP 16770 |
BookFile | app/routes/book.file.tsx | 45 | 0% | CriticalCRAP 2070 |
Writing | app/routes/writing.tsx | 38 | 0% | CriticalCRAP 1482 |
action | app/routes/editor.tsx | 48 | 27% | CriticalCRAP 948 |
Manuscripts | app/routes/manuscripts.tsx | 24 | 0% | CriticalCRAP 600 |