Jon-Luke Diericks · blog ·

How this site was built

This portfolio is a small game: a town you walk around, a wall you can break, a yard where the architecture is physical. Here is what it actually runs on.

Front

Three.js renders the world. Every texture is drawn on a canvas when the page loads, so the build ships no image files: grass, bricks, planks, the building blocks, the neon signs, the sprites. GSAP handles fades, bobbing, speed lines, and the little emote bubbles. The characters are glTF models (KayKit, CC0) with the weapons hidden and materials swapped for toon shading; before they load, a procedurally drawn manga sprite stands in.

Back

Express on Railway with Postgres. One row per visitor holds the events you trigger, the chat, and whatever the concierge found. One row per order, one per block in the yard. A WebSocket carries the other visitors' positions and live block changes.

The NPC

The Jon-Luke you talk to is Claude through the Vercel AI SDK, with a cached system block that holds five markdown files I edit by hand: who I am, how I talk, the work, how an engagement goes, and an FAQ. He gets one or two derived observations about your visit per reply, never the raw log, and he is told to say when he does not know and point you to the real me.

The fast lane

Jev, TypeSafe AI's decision model, judges every message in about a hundred milliseconds: who you probably are, whether a message is spam or an injection attempt. It never writes a word; it decides, and Claude talks.

The research

Firecrawl: web search and page reading for the concierge, and /v2/agent for a capped deep-research call when you leave a name and a company. The concierge runs in a bash sandbox from the AI SDK, keeps a dossier.md, and ends by saving a plan the NPC reads from then on.