← Back to home
/lab-notes/static-site-cloudflare

A static site with a small backend

Web · 3 min · Tommaso · November 2, 2026

Toortle Lab serves HTML, CSS and JavaScript as static assets. Tools can run in the browser without a processing server.

Cloudflare’s role

The Worker serves assets and routes /api/ paths to server functions. Tools call these same-domain APIs to record interactions.

Supabase’s role

The functions validate an allowlist of fields and send events to Supabase. The secret key stays in Cloudflare backend variables. Public clients have no direct permissions on event tables.

Statistics for each section

Each tool has its own statistics preference. For the new Studios, one shared table stores the tool name, action, results and allowed parameters. Adding a utility does not require a separate table for every button.

← All notes