∞ forever components

Dev Status

Token Bucket Rate Limiter

A 20 req/s token-bucket limiter with a live bucket, 200 and 429 counters, a request log and single, burst and flood controls.

css+canvasmedium complexitymoderate motionclickaccessible

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
1

When to use it

API docs, gateway dashboards and developer-tool pages that explain rate limiting with a bucket of tokens that drains on each request and refills over time.

When not to

Monitoring real traffic. The bucket size, refill rate and request log are simulated in the page.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Change the bucket size with MAX in the script, the refill step in tick() (0.0667 per frame, about 4 tokens a second), and the burst size passed to consume() in the buttons. Status colours come from --accent, --warning and --danger on :root; the canvas reads them through readTokens(), so keep the names. The controls are the .tbk-btn buttons and the flood toggle keeps aria-pressed in step. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • Forever Opus tokens on :root (--bg, --surface*, --text*, --border*, --accent) — one moss accent, no gradients
  • copy and data values in markup/script

Keep intact

  • demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
  • theme hook: ?theme= bootstrap, forever:theme message listener and :root[data-theme="light"] tokens
  • IIFE wrapper, visibilitychange sleep, prefers-reduced-motion guard, time-based (dt) animation

Known limitations

  • State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
  • Text is very small at 180px tiles.

rate-limittoken-bucketapidevopsstatus

More Dev Status components

  • Status PageA public service status page: six services, each with an Operational state pill and a compact 90-day uptime strip carrying past-incident marks; on a loop…
  • Release ChangelogA release changelog feed: dated semver cards stream in at the top of a thin vertical timeline rail with connecting dots, each listing Feature (green), Fix…
  • Render Queue Bitrate AnalyzerA cream status card with a red and amber bitrate waterfall that ripples on its own, a Mbps readout, dropped-frame and buffer pills and a certified-encode…
  • DAG Pipeline MatrixCI pipeline as a seven-stage dependency graph; stages run in parallel, and clicking a stage injects a fault and skips its downstream stages.
  • Canary Traffic SplitterCanary release gate with a stable/canary traffic split, p99 and 5xx lanes, a weight slider and an injected-spike auto-rollback.
  • Consensus Quorum RingFive-node Raft ring with leader election, term and commit index; click or key-activate nodes to partition them and lose quorum below three.