Personal project
This Site
The Next.js site you're reading now: an MDX + Zod content pipeline, six working lab experiments, and Three.js backgrounds with graceful fallbacks
Year
2024
Role
Design & Development
Duration
3 weeks

This Site
The most honest case study I can offer, because you're inside it right now. This portfolio is a Next.js 14 App Router site with a type-safe MDX content pipeline, a lab of working browser experiments, and Three.js scenes that know when to get out of the way. Everything this page claims can be checked by clicking around.
The Content Pipeline
Every case study, project, and lab experiment on this site is an MDX file with YAML frontmatter, parsed and validated against a Zod schema at build time. This is the actual schema this page passed through to render:
export const WorkCaseSchema = z.object({
title: z.string(),
client: z.string(),
year: z.number(),
services: z.array(z.enum(['strategy', 'design', 'engineering', 'data', 'ai', 'integration'])),
impact: z.string(),
outcomes: z.array(z.string()),
stack: z.array(z.string()),
cover: z.string(),
repo: z.string().optional(),
demo: z.string().optional(),
duration_weeks: z.number().optional(),
role: z.string(),
featured: z.boolean().default(false),
published: z.boolean().default(true),
})
The payoff is that content mistakes fail the build instead of shipping: a misspelled service tag, a missing field, or a year written as text is caught before deploy. For a site whose content is the whole point, treating the type system as the CMS has been the decision that paid off most.
The Lab
The lab is where I test the "everything is checkable" principle hardest. Six experiments, all real implementations rather than embeds:
- A neural network playground that trains a real multilayer perceptron in the browser: forward pass, backpropagation, and a live decision boundary, with learning rate and activation function controls wired to the actual math
- A Web Audio synthesizer with a filter and envelope per note, drive, delay and reverb, and a step sequencer timed on the audio clock
- A 3D scene builder on Three.js with rigid-body physics: add, move, resize and recolour shapes, then save the scene
- A GLSL shader playground compiling fragment shaders live on the GPU, with inline compile errors
- A data visualization playground that parses your own CSV uploads with hand-written SVG charts
- An asteroid shooter on HTML5 Canvas
The experiments avoid libraries where the point is the fundamentals. The charts are hand-rolled SVG rather than D3, and the shader playground is raw WebGL rather than Three.js. Their write-ups list their limitations alongside their features.
Performance Without Sacrificing the Toys
Three.js backgrounds are heavy, and most visitors are on phones. Three rules keep them from costing anyone anything:
- Hardware WebGL detection. The Three.js scenes only load where a real GPU is available. Software rasterizers get the plain page background instead of a slideshow.
- Deferred Three.js. The 3D bundles are dynamically imported, so they never block a route's first load.
- Contained scenes. Each scene lives in the header of its page and stops rendering once that header scrolls off screen.
The design system is Tailwind with shadcn/ui primitives and a light and a dark theme.
Movement
Pages move, but none of the content depends on it. Every page is rendered on the server with its text in the HTML. Movement is added by attributes:
data-enterplays a short sequence when a page opens, in CSS alonedata-revealplays the first time an element scrolls into view, triggered by one sharedIntersectionObserverdata-driftmoves a screenshot slightly slower than its frame, using CSS scroll-driven animations where the browser has them
All of it is switched on by one attribute on the <html> element, set by a small inline script before first paint. With JavaScript off, or with reduced motion requested, the attribute is never set and the page is static and fully visible. If the page fails to hydrate, the attribute is removed after four seconds so nothing stays hidden.
Framer Motion handles the parts that need state: the navigation indicator, the mobile menu, and the line drawings on the lab page.
The Parts That Don't Demo
- Server Actions handle the contact form. Validation runs on both client and server with the same Zod schema.
- Testing. Content-pipeline unit tests in Vitest (malformed frontmatter should fail loudly) and Playwright end-to-end tests on desktop and mobile for the main paths. Both run on every pull request.
- SEO plumbing. Per-page metadata, Open Graph images, and a generated sitemap.
What I'd Keep
Schema-validated content scales better than discipline. Early on I trusted myself to keep frontmatter consistent across files. The Zod pipeline exists because that trust was misplaced. The validator has caught real mistakes that would have shipped as broken pages.
Fallbacks are a feature, not an apology. The hardware-GL detection came from watching the site struggle on a low-end device. Building the static fallback made the 3D version better too, because it forced a clear answer to "what is this background actually for?"
A portfolio is a claim you have to live up to. Every technique named on this site is inspectable on this site. That constraint shaped it more than any design decision. It rules out impressive-sounding things I can't show, which turns out to be a good filter for what's worth building.
Have a project in mind?
A few lines on what you need, your timeline and your budget is enough to start.