Ahmed Abdelaziz

PortfolioDesign Docs

Architecture

How the Design Docs feature works under the hood.

Last updated August 2026

Overview

Design Docs is a small layer on top of the existing portfolio. No second content system, no new Markdown engine — it reuses projects.ts, mdx.tsx, buttons, cards, and theme.

Goal

One source of truth (designDocs[]), source-agnostic rendering (local → MDX, notion → external link).


How It Fits

PieceFileJob
Typesrc/lib/design-docs.tsDesignDoc (id, title, description, type, source, updatedAt)
Validationsrc/lib/design-docs.tsUnique id, local/notion only, URL check for Notion, file exists for local
Mergesrc/lib/projects.tsFrontmatter designDocs + meta.yamlproject.designDocs
Indexsrc/app/projects/[slug]/design-docs/page.tsxLists docs as cards
Doc pagesrc/app/projects/[slug]/design-docs/[docId]/page.tsxRenders MDX via MDXContent
Cardsrc/components/DesignDocCard.tsxShared card UI, external badge for Notion

Data Flow

  1. Build scans projects/ with fast-glob + gray-matter.
  2. For each slug, it tries content/design-docs/<slug>/meta.yaml. If missing → no docs.
  3. Frontmatter and YAML arrays are merged. Duplicate id throws at build time.
  4. project.designDocs is now the single array the UI reads.

No project-specific if — the UI just receives DesignDoc[].


Routes

/projects/<slug>                       → project page
/projects/<slug>/design-docs           → index (all docs)
/projects/<slug>/design-docs/<docId>   → local MDX doc (notion never has this)

generateStaticParams only emits local docs, so Notion docs never get a dead internal page — they are external links from the index.


Extending

Add a new source without touching UI:

type DesignDocType = "local" | "notion" | "github"

Teach the loader where to find github and the card how to label it. Cards stay source-agnostic.

Keep it simple

Metadata in YAML, content in MDX, Notion in a URL. Nothing else to configure.