Holocron is a single Cloudflare Worker with one Durable Object class. There is no database to provision, no queue, no KV namespace. Deploying creates:
| Resource | What it is |
|---|---|
Worker holocron |
Serves the built app (static assets) and routes /api/* and /ws/* |
Durable Object BoardObject |
One instance per board, SQLite-backed, created on demand |
| Rate limit binding | Caps board creation at 10 per minute per IP |
Boards live only inside their Durable Object. When a board expires its object deletes all of its storage, so an idle deployment holds nothing.
- A Cloudflare account. The free Workers plan is enough for a few teams; Durable Objects with SQLite storage are included on the free plan with limits, see Durable Objects pricing.
- Node 22+ and bun (used for installs; npm's resolver currently fails on Vitest 4.1's peer dependencies).
git clone https://github.com/jbouder/holocron
cd holocron
bun install
npx wrangler login # opens the browser once
npm run deploy # builds, then `wrangler deploy`The first deploy prints a *.workers.dev URL. Open it; you have a Holocron.
wrangler deploy reads wrangler.jsonc at the repository root. The Vite
plugin writes the final config and bundle under dist/ and points wrangler at
it, so no --config flag is needed.
The reset time is two variables in wrangler.jsonc:
Edit and redeploy. New boards pick up the new schedule; boards created before
the change keep the expiry they were created with. The home page and Help page
read the live value from /api/config, so the copy stays correct.
In the Cloudflare dashboard: Workers & Pages → holocron → Settings → Domains &
Routes → Add → Custom domain. Or add to wrangler.jsonc:
"routes": [{ "pattern": "retro.example.com", "custom_domain": true }]WebSockets work on custom domains without extra configuration.
Three workflows:
.github/workflows/ci.ymlruns thecheckjob (Biome,tsc -b,vite build, Vitest) on every pull request and every push tomain, then thee2ejob (Playwright and axe in Chromium againstvite preview; the HTML report is uploaded as an artifact when it fails). It never deploys and never touches a secret..github/workflows/deploy.ymlruns when CI succeeds on a commit pushed tomain, and deploys exactly that commit. Run it by hand (Actions → Deploy → Run workflow onmain) to re-deploy the currentmainwithout re-running CI, for example after rotating the Cloudflare token or changing a var inwrangler.jsonc..github/workflows/preview.ymldeploys each pull request from a branch in this repository as its own Worker (see Pull request previews).
Deploy and Preview need two repository secrets:
| Secret | Where to get it |
|---|---|
CLOUDFLARE_API_TOKEN |
Dashboard → My Profile → API Tokens → Create → "Edit Cloudflare Workers" template |
CLOUDFLARE_ACCOUNT_ID |
Dashboard → Workers & Pages → Overview (right-hand column) |
Add them under Settings → Secrets and variables → Actions as repository
secrets (the workflows check for the token before it enters the
environment, so environment-scoped secrets are not seen). Without
CLOUDFLARE_API_TOKEN the deploy and preview jobs are skipped and the runs
stay green, so a fork gets the checks only. The deploy job uses a production environment;
create it (Settings → Environments) if you want required reviewers before a
deploy. Deploys queue rather than cancel one another.
Pull requests never deploy to production. PRs from forks never see the
Cloudflare secrets and get no preview. To block merging until checks pass, add
a branch protection rule (or ruleset) on main under Settings → Branches with
"Require status checks to pass" and select check and e2e (from CI). Do not add the
Deploy or Preview jobs: Deploy runs only after merge, and Preview skips for
forks and when the secrets are missing, so a PR could wait on them forever.
GitHub only offers a job once it has run at least once.
Cloudflare's version preview URLs are not generated for Workers that
implement a Durable Object, so each pull request gets a whole Worker instead,
named holocron-pr-<number> on your workers.dev subdomain:
- Opening, pushing to or reopening the PR builds it and deploys that Worker, then posts the URL as one PR comment that later pushes update.
- Closing or merging the PR deletes the Worker (
wrangler delete --force) and says so in the comment. - A preview has its own Durable Object namespace, so its boards are separate
from production's and are wiped on the same schedule. Board creation uses
rate-limit namespace
1002instead of production's1001(namespaces are account-wide), and Turnstile is always off.
Previews run only for PRs from branches in this repository, using the same
CLOUDFLARE_API_TOKEN; the "Edit Cloudflare Workers" template already allows
creating and deleting Workers. Anyone who can push a branch can therefore run
code with that token, so keep push access to people you would trust with a
deploy. To turn previews off, disable the workflow (Actions → Preview → ⋯ →
Disable workflow) or delete .github/workflows/preview.yml. If a preview
Worker is ever left behind, delete it with
npx wrangler delete holocron-pr-<number>.
.github/dependabot.yml asks Dependabot for monthly pull requests: npm
packages (through package.json and bun.lock) and the GitHub Actions the
workflows use. Minor and patch bumps are grouped into one PR per ecosystem;
each major version gets its own. They are ordinary PRs, so they run check
and never deploy (Dependabot runs don't see repository secrets, so they get
no preview either). Nothing merges automatically. Actions are pinned to
commit SHAs with the version in a trailing comment; Dependabot updates both,
so review that they still match when you merge one (see docs/security.md).
On a fork, Dependabot version updates follow this file once you enable them
under Settings → Code security. Turn on Dependabot alerts and security
updates there too if you want patches for known vulnerabilities between the
monthly runs. Leave src/components/ui/* to the shadcn CLI; Dependabot only
touches dependency manifests.
cp .dev.vars.example .dev.vars # optional
npm run devnpm run dev runs Vite with the Cloudflare plugin: the Worker and the Durable
Object run locally in Miniflare with hot reload, state persisted under
.wrangler/. Open two browser tabs on the same board to see live sync.
Set DEV_BOARD_TTL_SECONDS=60 in .dev.vars to make new boards expire a
minute after creation so you can watch the wipe.
npm run tailstreams live logs (wrangler tail).observability.enabledis on inwrangler.jsonc, so Workers Logs in the dashboard keeps recent invocations.- The Worker logs one JSON line per failed request. Normal traffic is not logged by the app.
Every board wipes itself at the reset. To remove everything immediately, delete the Worker (Dashboard → Workers & Pages → holocron → Settings → Delete), which also deletes the Durable Object namespace and all its storage. Redeploying starts clean.
Creating a board needs no account, so the only guard by default is the
per-IP rate limit (10 boards a minute, CREATE_LIMITER in wrangler.jsonc).
Looking a board up by code (joining, the socket, exports) has its own,
looser limit (300 a minute, PROBE_LIMITER). Raise it if a large team
shares one address.
If you see abuse from many addresses, require a
Cloudflare Turnstile check
on the home page's Create button. Joining a board is never affected.
-
Dashboard → Turnstile → Add widget. Add your hostname (and
localhostif you want it in development), mode Managed. Copy the site key and the secret key. -
Put the site key in
wrangler.jsonc:"vars": { // ... "TURNSTILE_SITE_KEY": "0x4AAAAAAA..." }
-
Store the secret as a Worker secret (it is never committed):
npx wrangler secret put TURNSTILE_SECRET_KEY
-
npm run deploy.
Turnstile is on only when both are set; with either one missing, board
creation works exactly as without it. When on, the Worker redeems the token
with Siteverify before creating the board and checks the action
(create-board) and that the hostname is the one the request came to. A
missing token is a 400, a failed check a 403, and Siteverify being
unreachable a 503; all three stop the board from being created. The IP rate
limit still runs first.
To try it locally, use Cloudflare's always-pass
test keys
in .dev.vars (see .dev.vars.example). To turn it off again, set
TURNSTILE_SITE_KEY back to "" and redeploy, or delete the secret.
Turnstile is a Cloudflare service: when it is on, the home page loads its
script from challenges.cloudflare.com and visitors who create a board are
checked by it. See data-retention.md.
All in shared/limits.ts: cards per board, columns, participants, card
length, votes range, timer range, ops per second. The create rate limit is in
wrangler.jsonc under ratelimits.
git pull
bun install
npm run deployDurable Object migrations are declared in wrangler.jsonc. The current
version has one (v1, new_sqlite_classes). If a future version adds a
migration tag, deploying applies it.
index.html carries Open Graph tags so a pasted link unfurls in Slack,
Teams and the like. Preview images have to be absolute URLs, so og:image
points at the public instance. On your own deployment, change it to your
origin:
<meta property="og:image" content="https://retro.example.com/og.png" />The image itself (public/og.png), the favicons and the manifest icons are
rendered from docs/brand/mark.svg; nothing else needs to change.
public/_headers sets the headers for the static assets (Cloudflare's
static assets read that file). Keep them if you serve the built files some
other way:
Referrer-Policy: same-origin: a board URL carries its code, and the Analysis panel's model download fails without it, because Hugging Face rejects requests whoseRefereris a*.workers.devpage. The worker script's own response header is what governs those requests.Content-Security-Policy: only this origin's scripts, plus the inline theme script inindex.htmlby hash, WebAssembly for the analysis model, and Turnstile. Connections go to this origin (the board socket), Hugging Face andraw.githubusercontent.com(the model). The app can't be framed. If you change the inline script,npm testfails and prints the hash to put in_headers. If you point the analysis at another model host, add it toconnect-src.X-Content-Type-Options: nosniff,X-Frame-Options: DENY, and aPermissions-Policythat turns off camera, microphone, location and device APIs the app never uses.
The Worker's own responses (/api, /ws) carry nosniff, a
default-src 'none' CSP and frame-ancestors 'none', set in
worker/index.ts. npm run dev doesn't apply _headers;
npx vite preview after a build does.