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.
- 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.
Started: a portfolio where every project is a planet
Static prototype live on denniskhor.com
194 motion behaviours checked against the prototype
Next.js app replaces the static site
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.
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.
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.
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.
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.
- Sampling
denniskhor.com status
Not sampled yet
Source: denniskhor.com