Skip to content

Document the storage ledger, history, webhooks and other backend design notes - #22

Merged
Mistium merged 4 commits into
masterfrom
backend-design-notes
Nov 1, 2026
Merged

Mistium merged 4 commits into
masterfrom
backend-design-notes

Conversation

@Mistium

@Mistium Mistium commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Documents the backend design knowledge that until now lived only in mistwarp-api code comments, which MistWarp/api is removing as it moves to OSL's own lint rules. Every statement was checked against mistwarp-api main (6ab167c), not just the comments.

  • storage.md:
    • Storage limits: rewritten for the Rotur storage ledger. Covers what counts and how it's deduplicated, holding before a store and settling after, the six-hourly settle, saving during an outage, going over the allowance, and classroom student pools. The old per-plan limits (500 MB to 50 GB) and the old quota fields no longer matched the code.
    • Quota: a table of every field GET /v1/me/quota returns.
    • Backfilling the ledger: the storage-report subcommand.
    • Generated history: what the backfill and generation at upload do, why an upload releases its save lock while history is prepared, and what is retried.
    • Serving snapshots: Accept-Encoding: identity, the raw-body handling, and a real 404 versus a 502.
  • configuration.md: adds ROTUR_SERVICE_SECRET, ROTUR_LOCAL_API_URL (loopback only) and ROTUR_BASE.
  • accounts.md:
    • Rotur answers every validator request with 200, and only valid: true signs anyone in.
    • Vanity URLs: held for 30 days after the plan lapses, and a Rotur outage never starts that clock.
    • What erasing an account does, including what happens to a teacher's classes.
  • payments.md: the webhook headers, the signature format, the answers sent back, the reason for save, answer, then handle, and the 7-day retention.
  • community.md: how the development feed handles a failed refresh, and how often the loop ticks.

npm run build passes, and it fails on broken links. npm run check resolves all 150 inbound links. An independent review checked every claim against the code: its must-fix, all nine should-fixes and the nits are fixed.

No visible surface beyond text on existing backend pages.

Preview: https://backend-design-notes.docs-1zb.pages.dev/backend/storage/ (Cloudflare Pages branch preview)

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8f8c150
Status: ✅  Deploy successful!
Preview URL: https://788a3b57.docs-1zb.pages.dev
Branch Preview URL: https://backend-design-notes.docs-1zb.pages.dev

View logs

@Mistium
Mistium merged commit 14abb32 into master Nov 1, 2026
2 checks passed
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