gianhossle.com/projects/building-gianhossle-com
← all projects

Building gianhossle.com

A static-first site on Cloudflare's edge: no servers to run, real-time 3D, an in-browser chess engine. The infrastructure, the trade-offs and the strategy behind it, with live telemetry from your visit.

liveAstro 7Cloudflare WorkersWebGL · three.jsBlenderTypeScript
served from···asking the edge…
time to first byte···measuring…
this page weighs···counting requests…
frame rate···sampling…
01 · strategy

The brief behind the build

For hiring managers and teams who need proof, not claims: a portfolio that is itself a working product.

Audience

Hiring managers and teams in consulting, product and marketing.

Job to be done

Judge skills in a minute, without a call.

Value proposition

Strategy, systems and execution in one artifact you can click through.

Differentiation

A PDF CV asserts, a template site decorates. This one demonstrates.

Proof

Live 3D, an engine running on your CPU, a pipeline that ships in about a minute.

Success measure

Conversations started. No trackers: outcomes, not clicks.

  1. 01DiscoverCV, LinkedIn, referrals
  2. 02Hookthe home screen, ten seconds
  3. 03Proveinteractive pages, no walls of text
  4. 04Convertone contact action
02 · the system

From a git push to your screen

One static build, no servers to run. Pick a flow and replay it, or click any node to see what it does and why it is there.

$
03 · the edge

Cloudflare is the whole runtime

DNS, TLS, caching and the file server in one place. Nothing of mine runs per request, so there is nothing to scale, patch or wake up. The panel on the right is not an illustration: it is what happened to the page you are reading.

  • DNS + anycastThe domain is proxied, so one address range is answered by the nearest data centre.
  • TLS + HTTP/3TLS 1.3 and HTTP/3 (QUIC) end at the edge. The browser never talks to a server of mine.
  • Static assetsA Worker config points at the build output and serves it directly. Each deploy is an immutable version.
  • CachingHashed files under /_astro are cached for a year. HTML is revalidated on every visit, so a deploy shows up immediately.
  • BuildsGit push, build, atomic deploy. A failed build never replaces the live version.
  • Diagnostics/cdn-cgi/trace names the data centre that answered. The telemetry above reads it.
Connection anatomy · this page load

    measuring…

    Response headers · live
    asking the edge…
    04 · the wire

    Every request this page made

    This is not a screenshot. It is the browser's own PerformanceResourceTiming data for the page you are looking at, drawn live: which protocol carried each file, what came from cache, and where the time went.

    measuring…
    12 round trips, measured from your browser
    queued / connectingwaiting for the first bytedownloading

    Fingerprinted names such as _astro/…hash.js are what lets Cloudflare and your browser cache the scripts and styles for a long time, while the HTML stays fresh. Lazy files show up here when they are first needed.

    05 · the camera solver

    A frame that can never crop a model

    Every 3D model on the site lives in a fixed frame you can rotate. A fixed camera distance always clips something at some angle, so the solver projects the eight corners of the model's bounding box through the camera at every orbit angle and pushes the camera back until none leaves the frame. Then it locks the distance to the worst case across the whole rotation range. This lab runs the realmakeFit and worstCase. Drag the box.

    ⟲ drag to rotate · scroll to zoom
    distance now
    –
    fixed camera
    –
    locked radius
    –
    frame fill
    –

    The green band in the chart is the rotation range a visitor is allowed to drag through; the dashed green line is the radius the page locks the camera to, so dragging can never reveal a clipped corner. A perfectly round model uses a ring of points instead of a box, which is tighter and identical from every side.

    06 · the engine

    Alpha–beta, drawn and then measured

    The chess opponent is a negamax search with alpha–beta pruning, and it runs in a Web Worker so thinking never stalls the 3D board. Pruning is the whole trick: once a move is proven worse than one already found, the rest of that branch is never visited. Below is the idea on a toy tree, followed by the real engine running on your own CPU.

    △ MAX picks the highest value▽ MIN picks the lowest× branch cut offdashed = never visited

    Try “best move first”: the better the move ordering, the more gets cut. The chess engine tries captures first for the same reason. Pruning never changes the answer, only how much work it takes to find it.

    search depth (plies)
    alpha–beta pruning

    pruning on
    not run yet
    pruning off
    not run yet

    07 · the cascade

    The bug where Tailwind lost to a reset

    Tailwind v4 puts its utilities inside @layer. My own reset (* { padding: 0 }) was unlayered, and unlayered CSS beats every layer, whatever the specificity. So each new glass button rendered with zero padding. Moving the reset into the lowest layer fixed it without touching a single utility. Flip it yourself: the browser works out the winner in the sandbox, live.

    same HTML, same utilities, one line moved
    themelowest
    base
    components
    utilities.px-6 .py-3
    unlayered styles
    08 · the build

    Stamped in at build time

    This panel is not typed in. While Astro rendered this page it read the repository: line counts, model sizes and the stack, to the major version. Deploy again and the numbers change by themselves.

    $ astro buildprerendering every page to static HTML

    built2026-10-22 06:37 UTC

    source73 files · 11,499 lines
    Astro37 files · 4,692
    TypeScript30 files · 4,387
    CSS6 files · 2,420
    3D models7 GLB files · 8.5 MB
    dependencies16 direct packages

    toolchainastro 7 · vite 8 · tailwindcss 4
    runtimethree r183 · model-viewer 4 · chess.js 1 · react 19
    09 · the source

    The real code, not a diagram of it

    These blocks are cut out of the repository while the page is built, so they can never drift from what is actually running.

    The whole deployment config. There is no server code: a Worker that only serves ./dist, on two custom domains.

    wrangler.jsonc · lines 1–14
    {
      "$schema": "node_modules/wrangler/config-schema.json",
      "compatibility_date": "2026-09-01",
      // Static site: Astro builds into ./dist and Cloudflare serves it directly.
      "assets": {
        "directory": "./dist",
        "not_found_handling": "404-page"
      },
      // The site owns the root domain and www; other hostnames are routed elsewhere.
      "routes": [
        { "pattern": "gianhossle.com", "custom_domain": true },
        { "pattern": "www.gianhossle.com", "custom_domain": true }
      ]
    }
    10 · the reasoning

    Why it is built this way

    01

    Static first

    Every page is finished HTML before it leaves the build. Nothing renders per request, so there is nothing to scale, patch or wake up.

    02

    Workers static assets

    A 15-line wrangler.jsonc serves ./dist. If a page ever needs server logic, a Worker can sit in front of the very same assets.

    03

    File-style URLs

    build.format: "file" writes name.html, so a page is served without a trailing-slash redirect, and the tab bar can key its tabs by path.

    04

    Native view transitions

    One CSS rule, @view-transition, cross-fades every navigation. The browser bar and tab bar keep their own transition names and never flicker.

    05

    Layers over specificity

    Third-party CSS (Tailwind, the glass button) lives in cascade layers below the hand-written styles. One moved line replaced an arms race of selectors.

    06

    State without a backend

    Open tabs are in sessionStorage, the tile layout and tab-bar state in localStorage. Every visitor gets the same HTML and personalises it locally.

    07

    Heavy work off the main thread

    The chess search runs in a Web Worker. The camera solver only checks eight corners, cheap enough to run on every camera-change event.

    08

    Procedural 3D

    Models are Python scripts running in Blender, exported as binary glTF and compressed where it pays. Dimensions, materials and animation clips can be regenerated instead of re-modelled.

    09

    Accessible by default

    Tiles can be reordered with the keyboard and announce their moves, every control on this page is a real button, and prefers-reduced-motion switches the movement off.