The site you're reading. Content is the repository: projects are Markdown/MDX folders, design docs are validated YAML + MDX, and almost every page is prerendered to HTML at build time. No database, no CMS, no admin panel.
What makes it interesting isn't the stack list — it's the boundary between what is static and what must run at request time, and the pipeline that keeps both honest.
Overview
The portfolio is built around one rule: adding content should never mean
touching code. Drop a folder into projects/, optionally attach
content/design-docs/<slug>/meta.yaml, push — the next build discovers,
validates, and renders it.
That rule drove the architecture:
- a build-time discovery and parsing pipeline instead of a content API;
- one MDX component map shared by project pages and design docs;
- strict metadata validation that fails the build rather than shipping a broken page;
- a single request-time route for project assets, because images live next to
their Markdown instead of in
public/.
The site also documents itself in its own format — its Architecture, Requirements, and ADRs are rendered by the same pipeline as every other project.
How a Page Gets Built
projects/<folder>/<file>.md
│
├── fast-glob (recursive discovery)
│ └── gray-matter (frontmatter → typed Project)
│
content/design-docs/<slug>/meta.yaml
│
├── YAML parse + validation
│ └── merge with inline `designDocs` (duplicate IDs fail)
│
└── getProjects(): filter `visible`, sort by date/order
│
├── `/` static
├── `/projects/[slug]` generateStaticParams → SSG
├── `/sitemap.xml` static
└── design docs index/pages → SSG (local docs only)
Everything above the runtime line is resolved before the site is served. That includes the home page, every project page, every local design doc, the sitemap, robots, the manifest, and the OG/Twitter images.
The Static / Dynamic Boundary
| Surface | Rendering | Why |
|---|---|---|
| Home, project pages | Static / SSG | Content is known at build time |
| Design Docs index + pages | SSG | Generated only for projects that declare docs |
/sitemap.xml, /robots.txt | Static | Derived from the same project list |
/project-assets/[...path] | Dynamic (Node) | Serves co-located images, PDFs, and video |
The asset route is the one deliberate exception. It joins the requested
segments, resolves them under projects/, rejects anything that escapes the
directory, maps the extension to a MIME type, and caches the response for a year
as immutable. Project images are referenced relatively (./banner.svg) and
rewritten by a remark plugin to /project-assets/<folder>/<file>.
That route is also why the site is static-first, not purely static: a
output: "export" build cannot run a request-time filesystem read. Hosting it
needs a Node runtime (Vercel or equivalent) — or a migration of project images
into public/.
Content Pipeline
- Discover —
fast-globwalksprojects/recursively for.md/.mdx. - Parse —
gray-mattersplits frontmatter from body.slugdefaults to the filename;dirpreserves the folder for asset resolution;imageresolves to a project-asset URL or falls back to the placeholder banner. - Validate —
apiDocsUrlmust behttp(s)://; inlinedesignDocsfollow the same rules asmeta.yaml; duplicate doc IDs fail the build. - Enrich — design docs declared in
content/design-docs/<slug>/meta.yamlare loaded and merged with any inline entries. - Sort —
visible: falseis dropped; the rest order bydatedescending, thenorder. - Prerender —
generateStaticParams()enumerates every slug up front anddynamicParams = false, so unknown URLs are 404s instead of runtime lookups.
Design Docs
Each project can attach multiple documents, declared once in meta.yaml:
designDocs:
- id: architecture
title: Architecture
type: local
source: architecture.mdx
updatedAt: "2026-09-01"
- id: api-design
title: API Design
type: notion
source: https://www.notion.so/page-id
local docs are MDX rendered by the same component map as project bodies.
notion docs are external links — nothing is scraped or embedded. Validation is
strict on shape (id, title, type, source), uniqueness, and URL validity,
so metadata mistakes surface at build time rather than as a blank page.
One MDX Pipeline
Project bodies and design docs share src/lib/mdx.tsx, so a syntax feature
added once works everywhere:
remark-gfm— tables, task lists, strikethrough;remarkProjectAssets— rewrites relative image URLs for project bodies;remarkCallouts—> [!info]blockquotes become ten themed callout types;rehypeSlugifyHeadings— stable, deduplicated heading IDs that feed the table of contents.
Rendering is server-side with next-mdx-remote in RSC mode. Only the interactive
islands ship JavaScript: the Mermaid renderer (dynamically imported, serialized
through a queue, theme-aware, with a pan/zoom viewer), the scroll-spy table of
contents, the theme toggle, and the motion primitives.
SEO, Theming, and Motion
- Metadata — canonical URLs and Open Graph article metadata per page; OG and Twitter images generated by route conventions.
- Structured data —
Personin the root layout,WebSite+ProfilePageon the home page,Articleon project pages. - Sitemap — home plus one URL per project; design-doc pages are not yet included (a known gap, listed below).
- Theming —
next-themeswith a system-first default, a#120F17dark surface, and a View Transitions–based theme wipe where the browser supports it. - Motion — Motion primitives under a global
reducedMotion="user"rule; every animation has a still path.
Tech Stack
| Layer | Choice |
|---|---|
| Framework | Next.js 16 (App Router, React Server Components) + Turbopack |
| Language | TypeScript |
| Content | next-mdx-remote (RSC), gray-matter, yaml, fast-glob |
| Styling | Tailwind CSS v4 + shadcn/ui (Radix primitives) |
| Theming | next-themes |
| Diagrams | Mermaid, lazily imported on the client |
| Motion | motion with reduced-motion enforcement |
| Assets | Guarded Node route with immutable caching |
| Deployment | Vercel (Node runtime required for project assets) |
Honest Trade-offs
- Static-first, not exportable — co-located assets need a Node runtime;
GitHub Pages would require moving images into
public/and deleting the route. - Validation stops at metadata — a missing local design-doc file renders a
404 instead of failing the build (
validateLocalSources()exists but is not wired in). - Design docs are outside the sitemap, and they do not get the default OG image.
- Relative images inside design docs are not rewritten — the project asset plugin only runs for project bodies.
- No syntax highlighting beyond styled code blocks, and Mermaid diagrams are invisible to crawlers and no-JS visitors.
- No automated tests or CI —
npm run lintandnpm run buildare the verification gate.
What This Project Shows
Product sense — documentation is treated as part of the product, not an afterthought: every project can carry architecture docs, and the site documents itself in its own format.
Engineering judgment — the interesting decisions are about boundaries: what belongs at build time, what must be dynamic, where validation should fail loudly, and how to keep one rendering pipeline instead of two. The trade-offs above are documented rather than hidden.
Dive deeper
The full record lives in this project's Design Docs: Architecture, Functional Requirements, Architecture Decisions, Design Docs System, and How to Use.