# emuiga/theunfoldedorigami architecture

> Architecture diagram of the GitHub repository emuiga/theunfoldedorigami, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emuiga/theunfoldedorigami
- Repository: https://github.com/emuiga/theunfoldedorigami

## Overview

This is a personal portfolio and writing site. Visitors browse the portfolio, profile, interests, and writing; essay pages resolve a slug into an article for display. Content is read from Contentful when configured, with essay files as a fallback. The graph also preserves the newsletter and revalidation API routes, though the available excerpts do not establish their callers or downstream effects. Relationships reflect explicit imports and calls in the excerpts or source index; unsampled route internals are not inferred.

Main entry points: [`lib/essays.ts`](https://github.com/emuiga/theunfoldedorigami/blob/main/lib/essays.ts) (Essay data access), [`lib/contentful.ts`](https://github.com/emuiga/theunfoldedorigami/blob/main/lib/contentful.ts) (Contentful access), [`components/PageHeader.tsx`](https://github.com/emuiga/theunfoldedorigami/blob/main/components/PageHeader.tsx) (Page navigation), [`app/essays/page.tsx`](https://github.com/emuiga/theunfoldedorigami/blob/main/app/essays/page.tsx) (Essay index)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Site pages"]
  node_portfolio["Portfolio home<br/>[page.tsx]"]
  node_home["Notebook home<br/>[page.tsx]"]
  node_about["About page<br/>[page.tsx]"]
  node_interests["Interests page<br/>[page.tsx]"]
  node_essay_index["Essay index<br/>[page.tsx]"]
  node_essay_detail["Essay detail<br/>[page.tsx]"]
  node_thoughts["Thoughts page<br/>[page.tsx]"]
  node_origami["Technical writing<br/>[page.tsx]"]
  node_random["Random essay<br/>[page.tsx]"]
end

subgraph group_writing["Writing and content"]
  node_essay_data["Essay data access<br/>[essays.ts]"]
  node_contentful["Contentful access<br/>[contentful.ts]"]
  node_article_list["Article list<br/>[ArticleList.tsx]"]
  node_essay_hover["Essay hover list<br/>[EssayListHover.tsx]"]
end

subgraph group_shared["Shared presentation"]
  node_page_header["Page navigation<br/>[PageHeader.tsx]"]
  node_portfolio_header["Portfolio header"]
  node_typing["Typing cycler<br/>[TypingCycler.tsx]"]
  node_footer["Site footer<br/>[Footer.tsx]"]
  node_music_conditional["Conditional music"]
  node_music_player["Music player<br/>[MusicPlayer.tsx]"]
end

subgraph group_endpoints["API endpoints"]
  node_newsletter_api["Newsletter endpoint<br/>[route.ts]"]
  node_revalidate_api["Revalidation endpoint<br/>[route.ts]"]
end

node_visitor(("Visitor"))
node_contentful_service[("Contentful CMS")]

node_visitor -->|"opens"| node_portfolio
node_portfolio -->|"loads projects"| node_contentful
node_portfolio -->|"renders"| node_portfolio_header
node_visitor -->|"opens"| node_home
node_home -->|"renders"| node_page_header
node_home -->|"renders"| node_typing
node_about -->|"renders"| node_page_header
node_interests -->|"loads books and quotes"| node_contentful
node_interests -->|"renders"| node_page_header
node_essay_index -->|"loads essays"| node_essay_data
node_essay_index -->|"renders"| node_essay_hover
node_essay_detail -->|"loads essay data"| node_essay_data
node_thoughts -->|"loads essays"| node_essay_data
node_thoughts -->|"renders"| node_article_list
node_origami -->|"loads technical essays"| node_essay_data
node_origami -->|"renders"| node_article_list
node_random -->|"selects essay"| node_essay_data
node_essay_data -->|"delegates when configured"| node_contentful
node_contentful -->|"queries"| node_contentful_service
node_essay_index -->|"renders"| node_page_header
node_essay_detail -.->|"serves article"| node_visitor
node_newsletter_api -.->|"accepts requests"| node_visitor
node_revalidate_api -.->|"may revalidate content"| node_contentful
node_music_conditional -->|"renders conditionally"| node_music_player
node_footer -.->|"displays"| node_visitor

click node_portfolio "https://github.com/emuiga/theunfoldedorigami/blob/main/app/page.tsx"
click node_home "https://github.com/emuiga/theunfoldedorigami/blob/main/app/home/page.tsx"
click node_about "https://github.com/emuiga/theunfoldedorigami/blob/main/app/about/page.tsx"
click node_interests "https://github.com/emuiga/theunfoldedorigami/blob/main/app/interests/page.tsx"
click node_essay_index "https://github.com/emuiga/theunfoldedorigami/blob/main/app/essays/page.tsx"
click node_essay_detail "https://github.com/emuiga/theunfoldedorigami/blob/main/app/essays/%5Bslug%5D/page.tsx"
click node_thoughts "https://github.com/emuiga/theunfoldedorigami/blob/main/app/thoughts/page.tsx"
click node_origami "https://github.com/emuiga/theunfoldedorigami/blob/main/app/origami/page.tsx"
click node_random "https://github.com/emuiga/theunfoldedorigami/blob/main/app/random/page.tsx"
click node_essay_data "https://github.com/emuiga/theunfoldedorigami/blob/main/lib/essays.ts"
click node_contentful "https://github.com/emuiga/theunfoldedorigami/blob/main/lib/contentful.ts"
click node_article_list "https://github.com/emuiga/theunfoldedorigami/blob/main/components/ArticleList.tsx"
click node_essay_hover "https://github.com/emuiga/theunfoldedorigami/blob/main/components/EssayListHover.tsx"
click node_page_header "https://github.com/emuiga/theunfoldedorigami/blob/main/components/PageHeader.tsx"
click node_portfolio_header "https://github.com/emuiga/theunfoldedorigami/blob/main/components/PortfolioHeader.tsx"
click node_typing "https://github.com/emuiga/theunfoldedorigami/blob/main/components/TypingCycler.tsx"
click node_footer "https://github.com/emuiga/theunfoldedorigami/blob/main/components/Footer.tsx"
click node_music_conditional "https://github.com/emuiga/theunfoldedorigami/blob/main/components/MusicPlayerConditional.tsx"
click node_music_player "https://github.com/emuiga/theunfoldedorigami/blob/main/components/MusicPlayer.tsx"
click node_newsletter_api "https://github.com/emuiga/theunfoldedorigami/blob/main/app/api/newsletter/route.ts"
click node_revalidate_api "https://github.com/emuiga/theunfoldedorigami/blob/main/app/api/revalidate/route.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_portfolio,node_home,node_about,node_interests,node_essay_index,node_essay_detail,node_thoughts,node_origami,node_random toneBlue
class node_essay_data,node_contentful,node_article_list,node_essay_hover,node_contentful_service toneAmber
class node_page_header,node_portfolio_header,node_typing,node_footer,node_music_conditional,node_music_player toneMint
class node_newsletter_api,node_revalidate_api toneRose
class node_visitor toneIndigo
```

## Components

### Site pages

- [Portfolio home](https://github.com/emuiga/theunfoldedorigami/blob/main/app/page.tsx): `app/page.tsx`
- [Notebook home](https://github.com/emuiga/theunfoldedorigami/blob/main/app/home/page.tsx): `app/home/page.tsx`
- [About page](https://github.com/emuiga/theunfoldedorigami/blob/main/app/about/page.tsx): `app/about/page.tsx`
- [Interests page](https://github.com/emuiga/theunfoldedorigami/blob/main/app/interests/page.tsx): `app/interests/page.tsx`
- [Essay index](https://github.com/emuiga/theunfoldedorigami/blob/main/app/essays/page.tsx): `app/essays/page.tsx`
- [Essay detail](https://github.com/emuiga/theunfoldedorigami/blob/main/app/essays/%5Bslug%5D/page.tsx): `app/essays/[slug]/page.tsx`
- [Thoughts page](https://github.com/emuiga/theunfoldedorigami/blob/main/app/thoughts/page.tsx): `app/thoughts/page.tsx`
- [Technical writing](https://github.com/emuiga/theunfoldedorigami/blob/main/app/origami/page.tsx): `app/origami/page.tsx`
- [Random essay](https://github.com/emuiga/theunfoldedorigami/blob/main/app/random/page.tsx): `app/random/page.tsx`

### Writing and content

- [Essay data access](https://github.com/emuiga/theunfoldedorigami/blob/main/lib/essays.ts): `lib/essays.ts`
- [Contentful access](https://github.com/emuiga/theunfoldedorigami/blob/main/lib/contentful.ts): `lib/contentful.ts`
- [Article list](https://github.com/emuiga/theunfoldedorigami/blob/main/components/ArticleList.tsx): `components/ArticleList.tsx`
- [Essay hover list](https://github.com/emuiga/theunfoldedorigami/blob/main/components/EssayListHover.tsx): `components/EssayListHover.tsx`

### Shared presentation

- [Page navigation](https://github.com/emuiga/theunfoldedorigami/blob/main/components/PageHeader.tsx): `components/PageHeader.tsx`
- [Portfolio header](https://github.com/emuiga/theunfoldedorigami/blob/main/components/PortfolioHeader.tsx): `components/PortfolioHeader.tsx`
- [Typing cycler](https://github.com/emuiga/theunfoldedorigami/blob/main/components/TypingCycler.tsx): `components/TypingCycler.tsx`
- [Site footer](https://github.com/emuiga/theunfoldedorigami/blob/main/components/Footer.tsx): `components/Footer.tsx`
- [Conditional music](https://github.com/emuiga/theunfoldedorigami/blob/main/components/MusicPlayerConditional.tsx): `components/MusicPlayerConditional.tsx`
- [Music player](https://github.com/emuiga/theunfoldedorigami/blob/main/components/MusicPlayer.tsx): `components/MusicPlayer.tsx`

### API endpoints

- [Newsletter endpoint](https://github.com/emuiga/theunfoldedorigami/blob/main/app/api/newsletter/route.ts): `app/api/newsletter/route.ts`
- [Revalidation endpoint](https://github.com/emuiga/theunfoldedorigami/blob/main/app/api/revalidate/route.ts): `app/api/revalidate/route.ts`

### Other components

- **Visitor**
- **Contentful CMS**

## Connections

- Visitor → Portfolio home: opens
- Portfolio home → Contentful access: loads projects (evidence: `app/page.tsx`)
- Portfolio home → Portfolio header: renders (evidence: `app/page.tsx`)
- Visitor → Notebook home: opens
- Notebook home → Page navigation: renders (evidence: `app/home/page.tsx`)
- Notebook home → Typing cycler: renders (evidence: `app/home/page.tsx`)
- About page → Page navigation: renders (evidence: `app/about/page.tsx`)
- Interests page → Contentful access: loads books and quotes (evidence: `app/interests/page.tsx`)
- Interests page → Page navigation: renders (evidence: `app/interests/page.tsx`)
- Essay index → Essay data access: loads essays (evidence: `app/essays/page.tsx`)
- Essay index → Essay hover list: renders (evidence: `app/essays/page.tsx`)
- Essay detail → Essay data access: loads essay data (evidence: `app/essays/[slug]/page.tsx`)
- Thoughts page → Essay data access: loads essays (evidence: `app/thoughts/page.tsx`)
- Thoughts page → Article list: renders (evidence: `app/thoughts/page.tsx`)
- Technical writing → Essay data access: loads technical essays (evidence: `app/origami/page.tsx`)
- Technical writing → Article list: renders (evidence: `app/origami/page.tsx`)
- Random essay → Essay data access: selects essay (evidence: `app/random/page.tsx`)
- Essay data access → Contentful access: delegates when configured (evidence: `lib/essays.ts`)
- Contentful access → Contentful CMS: queries (evidence: `lib/contentful.ts`)
- Essay index → Page navigation: renders (evidence: `app/essays/page.tsx`)
- Essay detail → Visitor: serves article
- Newsletter endpoint → Visitor: accepts requests
- Revalidation endpoint → Contentful access: may revalidate content
- Conditional music → Music player: renders conditionally (evidence: `components/MusicPlayerConditional.tsx`)
- Site footer → Visitor: displays
