eswat2.app · Architecture

Architecture

How the eswat2.app home page is built. It is a handful of static files on Cloudflare with no server code, and the one moving part, the backdrop, runs off the main thread.

Hosting Workers static assetsWorker code noneLighthouse 100 · both themesUpdated 2026-11-15
01 · Hosting

Static assets, no Worker

Cloudflare Workers, assets only
No server code

The site is deployed as a Worker with no Worker script, only a folder of static files. Every request is a plain asset request served from Cloudflare's edge, so there is nothing on the server to run, scale or patch. Unknown paths get a styled 404 page with a real 404 status.

The browser does run a little JavaScript: the theme toggle and the backdrop. None of it is needed to read the page.

Domain
The zone apex only. www is left unset on purpose, so no request needs a redirect.
Edges
The workers.dev and preview URLs are off, so every request passes through the zone's security rules.
Deploys
Workers Builds runs wrangler deploy on every push to the main branch.
Siblings
poker, retro and sudoku are separate Workers on the same zone.
02 · Style

One shared house style

Archivo, DM Mono and cool blue-grey neutrals

The pages use the same house style as the rest of my standalone pages: one 820px column of cards, mono labels, and colour used only for status. The stylesheet is an unchanged copy of the style's starter template, with small additions kept in their own files. The whole system, with live examples, is at /style.

Themes
Light, system and dark. System is pure CSS, through prefers-color-scheme. A light or dark choice needs JavaScript: a tiny script in the head applies the saved choice before first paint, so the page never flashes the wrong theme, and a small script handles the toggle and saves your choice in the browser.
Contrast
Every text colour reaches at least 4.5:1 on every surface in both themes.
03 · Fonts

Self-hosted type

From 91 to 100 on mobile

The house template loads its fonts from Google Fonts, which cost about 1.1 seconds of render blocking on a mobile run and held Lighthouse performance at 91. The site now serves the latin subsets itself: one variable Archivo file and DM Mono at two weights.

Preload
Only the two faces that render above the fold.
Cache
A year, marked immutable. A changed font gets a new filename instead of an overwrite.
Licence
SIL Open Font License, with both licence files served beside the fonts.
04 · Backdrop

A flow field in a Web Worker

The one deliberate exception to the style
Off the main thread

Behind the home page, 1,000 particles drift along currents of 3D simplex noise, after the "Swirl" demo in Ambient Canvas Backgrounds by crnacura. They are born in a narrow band, which makes them ride the same currents and form ribbons. The band sweeps from the bottom of the screen to the top and back every 30 seconds, so the header is still while it is read.

The page hands its canvas to a Web Worker as an OffscreenCanvas, and the worker draws every frame. The page itself only forwards the window size, the theme, and whether the tab is visible, so scrolling and input never compete with the animation and Lighthouse records no blocking time.

Colour
The blue of the glow at the top of the poker and retro pages, faint enough to read as texture.
Pauses
In hidden tabs. Under reduced motion, or without OffscreenCanvas, the canvas is removed and the page stays plain.
Contrast
Header and footer text carry a soft halo in the ground colour, so it stays readable over the streaks. The cards are opaque.
Options
?scheme=neutral · ?scheme=vivid · ?start=top · ?backdrop=off, plus every tuning setting below.
05 · Playground

Exploring the backdrop

Full screen at /backdrop, with presets and sliders
The URL is the state

/backdrop runs the animation with nothing in front of it. A corner button opens a small card: scheme, start and theme, then a Tune section with presets and a slider for every setting the worker reads.

Every setting lives in the address bar, which is also where the worker reads it. Scheme and start change the running animation directly. A slider writes the URL when you let go and restarts the worker, which reads the URL exactly as a page load would. A canvas can be handed to a worker only once, so a restart swaps in a fresh canvas and worker. Any look can be shared as a link, and the same settings work on the home page.

Any setting away from its default is marked with a dot, so picking a preset shows which settings make its look. The Tune heading names the preset, or says Custom once a slider has moved. Reset to defaults clears the address bar, so it gets the same indigo outline whenever the address bar holds a setting, and loses it once everything is back to default.

Presets
Threads: every particle born on one line, so the strands come out combed. Found by trying a band of zero.
Silk: wide, slow curls with long trails.
Streams: the currents frozen, so the paths build up into fixed streams.
Eddies: dense, tight curls on fast-changing currents.
Count
count, 50 to 5000. The default is 1000.
Band
sweep, seconds per pass, and band, the half-height in pixels where particles are born.
Trails
trail, the share of the last frame erased each frame. Off by default.
Motion
speed, life and width, as multipliers on each particle's random range.
Currents
flow packs the curls tighter, shown as Curl. drift sets how fast the currents change; 0 freezes them.
06 · Agents

Readable by AI clients

A plain-text summary of the site and its apps lives at /llms.txt. For career, project and research questions, the eswat2-mcp knowledge base answers over MCP and REST.