Skip to contentSkip to contact
Dennis Khordenniskhor.com
Recruiter mode

denniskhor.comProductWeb27 Sep 2026 to nowCase study 05 of 7

A Next.js 16 portfolio built like a product: every word renders on the server, and the AI agent reserves its worst case before every model call. Go on, pull the plug.

Five more ways to break it
unit and component tests
7,150
passing in Vitest on 12 Nov 2026, 3 failing
end-to-end tests
219
Chromium and no-JS, listed 12 Nov 2026
checks on the live site
49/49
after the 23 Oct 2026 deploy
days to the app in production
15
27 Sep to 12 Oct 2026

The lights are drawn by scripts. The words are not.

Scripts offNo JavaScriptScripts are off in this browser, so the lights are too. Every word on this page came from the server.Held

Stress bench

Five more ways to break a portfolio. Pick one and watch what stops it.

01 Kill it mid-intro

A heading starts its intro. At 340 ms its script is killed: every animation is cancelled and the words fall back to the real pre-paint gate. Nothing in JavaScript brings them back.

Every word stays

The script stopped; the CSS failsafe lifted the words after 3 s.

Prints when the attack is held

Bay 01Every hidden intro on this site has a CSS failsafe that lifts it even if the script dies: 4 s on the home, 3 s on Teowkee, 6 s by default.Held

02 Clamp it to 390

Hydraulic jaws squeeze a page from 1440 to 390 pixels. Container queries reflow it live, and a light watches for sideways scroll on every frame.

Width390 pxSideways scroll none

Clamped to 390 px: the page reflowed to two columns and nothing scrolled sideways.

Prints when the attack is held

Bay 02No page here scrolls sideways at 390 px, and the home's hero is tested never to overlap at 430x800, 390x844 and 375x667.Held

03 Hammer the Ask

Each press simulates one of the six real suggested questions passing the gates that run before any model call. Five in ten minutes get through. From the sixth on, every press stops at the rate limit, however hard you hammer.

BurstToday0 of 6 askedRefused0
Body cap413
JSON415
Same origin403
Schema400
Eval tokenskip
Rate limit429

Simulated here. Nothing is sent and your allowance is untouched.

Prints when the attack is held

Bay 03If the store that keeps the counts fails, the limit falls back to memory, never open. The worst case of every model call is reserved before the call, and a refused reservation is answered from the sources.Held

04 Make it leak

A made-up answer tries to leak a phone number. The scan reads the whole answer after the stream, and one hit replaces all of it.

Ask my agentsimulated answerWithheld

An automatic check withheld the model's answer before it finished.

Simulated: no digits are ever drawn, and nothing is sent.

Prints when the attack is held

Bay 04The scan checks for phone numbers, private terms, emails other than the public one and a hidden marker. The same private-term list is also checked against the content, the generated data and the prototype's source.Held

05 Phone home

This one is real. The lever asks your browser to fetch from another origin. The site sends every page with connect-src 'self', so the browser blocks it before any lookup.

Waiting for the lever.

Open your browser's devtools if you like: the console shows the block in red, as a policy violation and a failed fetch. Those red lines are the proof, not a bug.

Prints when the attack is held

Bay 05Held by your browser, just now. This site loads everything from itself, and an end-to-end test fails if this page or another key page asks another origin for anything.Held

Signed off

Six receipts from the build, each with the check that holds it.

  1. 15 days27 Sep to 12 Oct 2026: start to the Next.js app in production.01 / 06
  2. 95 of 95Parity entries, each one checked and signed off by me.02 / 06
  3. 101Of 194 filmed behaviours did not match the prototype. Most came from one rule, which the fix wave replaced.03 / 06
  4. 171Chunks searched in under a millisecond: BM25 in memory, no vector database.04 / 06
  5. 0.949Retrieval recall at 6 over 55 answerable questions. A unit test fails the build below 0.9.05 / 06
  6. 91 casesEval set: answerable, not in the sources, privacy, prompt injection and off task.06 / 06

Product27 Sep 2026 to now

denniskhor.com

This site: a Next.js 16 portfolio where every project is a planet in one orbit, rebuilt from its own static prototype, with an AI agent that answers from the write-ups, cites its sources and runs under a hard spend cap.

Opens Ask on "How is this agent evaluated?"

Built with an AI pair programmer, then reviewed and tested by me. The tests and decision records below are how I hold that work to account.

Kind
Product
Platforms
Web
Period
27 Sep 2026 to now
Stack
  • Next.js 16
  • React 19
  • TypeScript 6
  • three.js
  • GSAP
  • Tailwind CSS 4
  • Anthropic SDK
  • Vitest
  • Playwright
  • Vercel
  • End-to-end tests199
  • Unit and component tests6,700+
  • Decision records90

The problem

A portfolio has two readers with different amounts of time. A recruiter gives it a minute and needs the roles, the products and a way to the full CV. A hiring manager wants evidence that the work is real: how things were decided, how they are tested, and what happens when something goes wrong. Most portfolios serve the first reader with a template and leave the second with a list of links. I wanted one site that does both, and that is itself a piece of engineering worth reading about. That is why it is a product in its own orbit.

Constraints

  • Every word renders on the server. Crawlers, link previews and readers without JavaScript get the whole page, and no text waits for a script to appear.
  • The motion matches a prototype the design was approved from, and visitors who ask for reduced motion get the finished page with none of it.
  • Nothing confidential: employer names appear only where they identify a role, and private terms never reach the repository, the build or an answer.
  • Every live number carries its source and the time it was sampled, and a failed reading is shown as failed.
  • The AI agent answers only from what the site publishes, and it cannot spend more than a fixed amount, however it is used.

What I built

A Next.js 16 App Router site in React 19 and TypeScript 6, hosted on Vercel. Every route is a prerendered Server Component tree using Cache Components; only the live readings stream in, inside Suspense, from cached fetchers. Motion comes from small client islands: three.js draws the home's orbit, GSAP runs the timelines, and both load only through dynamic imports so they never block the first paint.

The home is an orbit. Roles are the inner bodies, sized by what was achieved in them; products orbit further out; earlier work is a belt; the years before software are the foundation underneath. Each body dives into its own world, a page with its own palette, type and one signature moment, inside a shared frame with the same navigation, footer and recruiter mode, which opens the full CV in place.

The agent, Ask my agent, answers questions about the work. Retrieval is BM25 in memory over paragraph-sized chunks of the write-ups, and Claude answers with citations enabled, so every cited sentence links to the paragraph it came from. Before the answer settles, an output scan withdraws anything that contains a phone number, a private term, an email address other than the public one, or a marker hidden in the instructions.

The live readings cover site status, Lighthouse, store listings, the repository's CI and test counts for every project, each with its method and sampling time. I built this with an AI pair programmer; every change went through tests and my review.

Decisions that mattered

A prototype first, then a rebuild beside it

The design was approved from live prototypes, not mock-ups, and the approved static prototype went to production first, on 28 Sep 2026. I then rebuilt the Next.js app beside it in waves, against a parity register I checked and signed off, which held 73 entries when the app replaced the prototype on 12 Oct 2026. The static build stays deployable as the rollback with one command, and its old URLs keep working through permanent redirects.

Every word on the server, motion as islands

Server rendering and intros pull in opposite directions: an intro wants text hidden until it plays, and a crawler wants it visible. The rule that settled it: a boot script marks the document only when JavaScript runs and reduced motion is not asked for, and only then may an island hide what it is about to animate. Each hidden state has a CSS failsafe that lifts it after a few seconds even if the script dies, so no reader is ever left with an empty page. This site's own page lets you test it: pulling the plug stops the hero's lights and loops, then runs the no-JavaScript test's visibility check on the hero.

BM25 in memory instead of a vector database

The corpus is a few hundred paragraphs. BM25 answers in under a millisecond with no embedding API, no vector store and no extra vendor, and paragraph-sized chunks make every citation point at an exact passage. The retrieval scores are recomputed by a unit test on every commit, so a content change that weakens an answer fails the build.

A spend cap that is enforced before the call

A public endpoint that spends money needs a ceiling that no single failure can lift. Each visitor gets 5 questions per 10 minutes and 20 a day, counted against a salted hash of the IP address. Before every model call the worst case it could cost is reserved, atomically, against a small daily budget and a monthly one; a reservation that would pass either is refused, and the question is answered from the sources alone, at no cost. If the store that keeps those counts fails, the limit falls back to memory instead of opening up. The site's eight fixed questions are answered once per deployment and then replayed for free. How I keep a public AI agent cheap and safe walks through each layer.

Hard problems

Motion that matched the prototype in every detail

After the fourth wave the motion looked close but not right. An audit filmed 194 motion behaviours on every page against the prototype and found 101 that did not match: intros missing, timings different, a few broken. The cause was a rule written to protect server rendering that, applied literally, removed every intro that starts from hidden text. The fix was the hidden-start rule above, gated per island, plus a way for each island to know how the page arrived (a fresh load, a dive, or the Back button), so a page restored from history shows as it was left instead of replaying. Full write-up: Auditing animation parity in a Next.js rebuild.

A dive that survives the route change

Clicking a body grows its world's colour from the click point to cover the screen, changes the route underneath, and collapses on the new page. React re-renders the whole tree on navigation, so the veil lives outside it, on the document body, and each page reports when it is ready to be revealed. Each world can add its own scene to the veil, loaded only for that destination. This site's scene is plain text: its name, its path and how long the new page took to commit, measured on that navigation. On a slow line the name breathes while the page loads, and after six seconds a button offers the way back.

Keeping private terms out of everything

The site describes real employment, so some words must never appear. They live in a list that is ignored by git and supplied to CI as a secret. The same list is checked against the content, the generated data, the prototype's source and every answer the agent gives, and the repository's history was squashed before its first push so no earlier draft survives.

How it is tested

Vitest runs more than 6,700 unit and component tests, including the retrieval evaluation, a check that every document links only to files that exist, and the privacy scans. Playwright runs 199 end-to-end tests against the production build: every page loads without errors, the agent streams a cited answer, old URLs redirect, the no-JavaScript view shows one main heading and working links with no text left invisible, phones never scroll sideways, and the home's hero never overlaps on three phone sizes. Model evaluations run on demand over a fixed set of questions, graded by deterministic checks and by a separate judge model, and every complete run is published, pass or fail. After each production deploy, a script runs 49 checks against the live domain.

Results

The site has been live on denniskhor.com since 28 Sep 2026, and the Next.js app has served it since 12 Oct 2026, passing all 49 post-deploy checks. 90 decision records explain how it was built and why. The agent answers with citations, and its total spend has a hard monthly ceiling by design.

What I would do next

  • Run the model evaluations on a schedule once the budget allows, so a regression in an answer shows up without anyone asking.
  • Bring the reading pages' largest paint on phones under the target. It was accepted at launch.
  • Add each new project as a body with its own world; the orbit's layout already makes room for up to eight products.

Milestones

What shipped, and when.

  1. Started: a portfolio where every project is a planet

  2. Static prototype live on denniskhor.com

  3. 194 motion behaviours checked against the prototype

  4. Next.js app replaces the static site

  5. AI agent behind a hard daily and monthly spend cap

Decisions

5 of the 90 decision records. Open one to read its context and consequence.

  1. Accepted

    Retrieval is BM25 in memory over committed chunks

    Score every paragraph with BM25 in the server's memory, with no vector database, embedding API or extra vendor.
    Context
    The agent's corpus is a few hundred paragraphs of the site's own write-ups.
    Consequence
    Retrieval takes under a millisecond, every citation points at an exact paragraph, and a unit test re-scores it on every commit.

    Decision record ADR-008 from 27 September 2026. Status: accepted.

  2. Accepted

    Citations come from search result blocks

    Send each retrieved paragraph to Claude as a search result with citations enabled, carrying its URL and title.
    Context
    An answer about someone's work is only worth trusting if each claim can be checked.
    Consequence
    Every cited sentence links straight to the paragraph it came from, and the answer shows which sources it used.

    Decision record ADR-010 from 27 September 2026. Status: accepted.

  3. Accepted

    Rebuild beside the live prototype, then cut over

    Rebuild in Next.js on a branch in waves, every route prerendered with every word on the server, and keep the static site deployable until cutover.
    Context
    The approved static prototype was already live, and a rewrite in one step would have left nothing to fall back to.
    Consequence
    The app replaced the static site on 12 Oct 2026, and the static build stays one command away as the rollback.

    Decision record ADR-048 from 29 September 2026. Status: accepted.

  4. Accepted

    Intros start hidden, gated per island

    Hide what an intro animates only when a boot script confirms JavaScript runs and reduced motion is off, with a CSS failsafe that lifts it after a few seconds.
    Context
    An audit of 194 motion behaviours found 101 that did not match the prototype, most of them intros a server-rendering rule had removed.
    Consequence
    The intros match the prototype, and readers without JavaScript, crawlers and reduced-motion visitors always get the finished page.

    Decision record ADR-049 from 11 October 2026. Status: accepted.

  5. Accepted

    A hard spend cap in front of the agent

    Limit each visitor to 5 questions per 10 minutes and 20 a day, reserve each call's worst-case cost against a daily and a monthly budget, and replay the suggested questions' answers for free.
    Context
    A public endpoint that calls a paid model can be used by anyone, as often as they like.
    Consequence
    Total spend is bounded by design, and a refused question is still answered from the sources, at no cost.

    Decision record ADR-051 from 12 October 2026. Status: accepted.

Live status

Sampled 16 Nov 2026, 04:49 UTC. Failures are shown as they were read.

Ask about fit

Paste a job description. You get a verdict, the evidence that matches it with citations, and what the sources do not show.

Open to senior AI and software engineering roles: on site or hybrid in Sydney, or remote for Australian and US teams.

Email meBook 15 minCV