# jenniemwei/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/jenniemwei/portfolio
- Repository: https://github.com/jenniemwei/portfolio

## Overview

1. **Project shape**
This is a **Next.js App Router portfolio site** built with **TypeScript**. The repo is organized around route files in `src/app`, reusable UI in `src/components`, content/config in `src/data`, and global styles/assets in `src/styles` and `public`.

2. **Route map and page boundaries**
The main routes are:
- `/` home page
- `/info`
- `/else`
- `/work`
- `/work/g2-ai`
- `/work/g2-search`
- `/work/intouch`
- `/work/mclubs`

`src/app/layout.tsx` provides the top-level site shell, while `src/app/work/layout.tsx` defines a shared layout for the work/portfolio sub-tree. That makes the “work” area a distinct presentation boundary from the rest of the site.

3. **Home page composition**
The home page is assembled from focused sections in `src/components/home`, including:
- `Hero`
- `VisualSection`
- `WorkSection`
- `HeroRiveDog`

This suggests a landing page that mixes editorial content, portfolio highlights, and a richer animated hero experience.

4. **Content-driven portfolio data**
The main project content appears to be centralized in `src/data/home-projects.ts` and `src/data/project-pages.ts`. These files likely act as the source of truth for project cards and project detail pages, so the UI is data-driven rather than hardcoded into route files.

5. **Work/project presentation flow**
`src/components/cards` contains the project-card system:
- `ProjectCard`
- `ProjectCardWithPreview`
- `PreviewHeader`
- `PreviewEmbedSection`
- `ProjectPreviewModal`
- `ProjectPreviewProvider`

This is the clearest interactive subsystem in the repo. The data flow is likely: project data feeds cards, cards can open a preview modal, and the modal renders an embedded preview section with shared header/chrome.

6. **Embedded preview and browser chrome behavior**
`src/lib/embedChrome.ts` and the `PreviewEmbedSection` / preview modal components indicate there is custom handling for displaying embedded project previews in a framed “browser-like” view. This is a distinct UI boundary: portfolio content is shown both as static cards and as an interactive preview experience.

7. **Gallery/media subsystem**
`src/components/gallery` contains gallery rows, thumbnail images, video thumbnails, and reveal behavior. This looks like a reusable media presentation layer for showcasing visual work, separate from the card/preview system. Media assets are served from `public/thumbnails`, `public/play`, and related folders.

8. **Navigation and scrolling**
Navigation is implemented in `src/components/nav` with:
- `Nav`
- `SubNav`
- `Footer`
- `SectionScrollLink`
- `HomeScrollToSection`

The presence of `src/lib/home-section-scroll.ts` and `src/lib/scroll-behavior.ts` shows that the site uses custom section-based scrolling, likely for the home page and anchored navigation between sections.

9. **Specialized interaction components**
The `src/components/sections` and `src/components/home` folders show smaller layout primitives like `SectionHeader` and `SpacerSection`, which help structure long-form portfolio pages. `HeroRiveDog.tsx` plus `public/rive/dog.riv` indicate one animated/interactive asset is driven by Rive, making animation an important but isolated subsystem.

10. **Styling and assets**
Styling uses **CSS Modules** for component-local styles plus `src/styles/globals.css` for global rules. The `public` directory contains the site’s font assets (`Saans` family), icons, thumbnails, videos/play assets, and Rive files. This suggests a visually customized portfolio where typography and media assets are part of the architecture, not just decoration.

11. **Overall architecture at a glance**
The repo is structured as:
- **Route layer**: page files and layouts in `src/app`
- **Presentation layer**: reusable components in `src/components`
- **Content layer**: portfolio data in `src/data`
- **Interaction helpers**: scroll/embed utilities in `src/lib`
- **Asset layer**: fonts, images, video, animation in `public`

The key architectural pattern is a **content-driven portfolio UI** with a strong separation between route shells, reusable visual components, and interactive preview/scroll behaviors.

Main entry points: [`src/app/layout.tsx`](https://github.com/jenniemwei/portfolio/blob/main/src/app/layout.tsx) (Site shell), [`src/app/page.tsx`](https://github.com/jenniemwei/portfolio/blob/main/src/app/page.tsx) (Home page), [`src/components/nav/Nav.tsx`](https://github.com/jenniemwei/portfolio/blob/main/src/components/nav/Nav.tsx) (Navigation), [`src/components/cards/ProjectCard.tsx`](https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/ProjectCard.tsx) (Project cards)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App routes"]
  node_app_layout["Site shell<br/>Next layout<br/>[layout.tsx]"]
  node_home_page["Home page<br/>Route page<br/>[page.tsx]"]
  node_info_page["Info page<br/>Route page<br/>[page.tsx]"]
  node_else_page["Else page<br/>Route page<br/>[page.tsx]"]
  node_work_layout["Work shell<br/>Nested layout<br/>[layout.tsx]"]
  node_project_pages_route["Project pages<br/>Route group"]
end

subgraph group_home["Home experience"]
  node_hero["Hero<br/>Home section<br/>[Hero.tsx]"]
  node_visual_section["Visual section<br/>Home section<br/>[VisualSection.tsx]"]
  node_work_section["Work section<br/>Home section<br/>[WorkSection.tsx]"]
  node_hero_rive_dog(("Rive dog<br/>Animated hero<br/>[HeroRiveDog.tsx]"))
end

subgraph group_work["Work portfolio"]
end

subgraph group_ui["Shared UI"]
  node_project_cards["Project cards<br/>Card system<br/>[ProjectCard.tsx]"]
  node_project_preview_provider["Preview state<br/>Preview UI"]
  node_preview_embed["Embed view<br/>Embed UI"]
  node_gallery["Gallery<br/>Media system<br/>[GalleryRow.tsx]"]
  node_nav["Navigation<br/>Nav system<br/>[Nav.tsx]"]
  node_section_primitives["Section primitives<br/>Layout helpers<br/>[SectionHeader.tsx]"]
end

subgraph group_content["Content data"]
  node_home_projects[("Home projects<br/>Content data<br/>[home-projects.ts]")]
  node_project_pages[("Project pages data<br/>Content data<br/>[project-pages.ts]")]
end

subgraph group_infra["Interactions"]
  node_embed_chrome["Embed chrome<br/>UI helper<br/>[embedChrome.ts]"]
  node_scroll_utils["Scroll utils<br/>Interaction helper"]
end

subgraph group_assets["Assets"]
  node_fonts["Typography<br/>Assets"]
  node_rive_asset["Rive asset<br/>Animation asset<br/>[dog.riv]"]
end

node_app_layout -->|"renders"| node_nav
node_app_layout -->|"hosts"| node_home_page
node_app_layout -->|"hosts"| node_info_page
node_app_layout -->|"hosts"| node_else_page
node_app_layout -->|"wraps"| node_work_layout
node_work_layout -->|"frames"| node_project_pages_route
node_home_page -->|"composes"| node_hero
node_home_page -->|"composes"| node_visual_section
node_home_page -->|"composes"| node_work_section
node_hero -->|"includes"| node_hero_rive_dog
node_hero_rive_dog -->|"uses"| node_rive_asset
node_home_page -->|"sources"| node_home_projects
node_project_cards -->|"consumes"| node_home_projects
node_project_cards -->|"opens"| node_project_preview_provider
node_project_preview_provider -->|"renders"| node_preview_embed
node_preview_embed -->|"frames"| node_embed_chrome
node_project_pages_route -->|"sources"| node_project_pages
node_nav -->|"coordinates"| node_scroll_utils
node_nav -->|"uses"| node_section_primitives
node_gallery -->|"pairs with"| node_project_cards
node_visual_section -->|"styles with"| node_fonts

click node_app_layout "https://github.com/jenniemwei/portfolio/blob/main/src/app/layout.tsx"
click node_home_page "https://github.com/jenniemwei/portfolio/blob/main/src/app/page.tsx"
click node_info_page "https://github.com/jenniemwei/portfolio/blob/main/src/app/info/page.tsx"
click node_else_page "https://github.com/jenniemwei/portfolio/blob/main/src/app/else/page.tsx"
click node_work_layout "https://github.com/jenniemwei/portfolio/blob/main/src/app/work/layout.tsx"
click node_hero "https://github.com/jenniemwei/portfolio/blob/main/src/components/home/Hero.tsx"
click node_visual_section "https://github.com/jenniemwei/portfolio/blob/main/src/components/home/VisualSection.tsx"
click node_work_section "https://github.com/jenniemwei/portfolio/blob/main/src/components/home/WorkSection.tsx"
click node_hero_rive_dog "https://github.com/jenniemwei/portfolio/blob/main/src/components/home/HeroRiveDog.tsx"
click node_project_cards "https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/ProjectCard.tsx"
click node_project_preview_provider "https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/ProjectPreviewProvider.tsx"
click node_preview_embed "https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/PreviewEmbedSection.tsx"
click node_gallery "https://github.com/jenniemwei/portfolio/blob/main/src/components/gallery/GalleryRow.tsx"
click node_nav "https://github.com/jenniemwei/portfolio/blob/main/src/components/nav/Nav.tsx"
click node_section_primitives "https://github.com/jenniemwei/portfolio/blob/main/src/components/sections/SectionHeader.tsx"
click node_home_projects "https://github.com/jenniemwei/portfolio/blob/main/src/data/home-projects.ts"
click node_project_pages "https://github.com/jenniemwei/portfolio/blob/main/src/data/project-pages.ts"
click node_embed_chrome "https://github.com/jenniemwei/portfolio/blob/main/src/lib/embedChrome.ts"
click node_scroll_utils "https://github.com/jenniemwei/portfolio/blob/main/src/lib/home-section-scroll.ts"
click node_fonts "https://github.com/jenniemwei/portfolio/blob/main/public/Saans/Saans-TRIAL-Regular.otf"
click node_rive_asset "https://github.com/jenniemwei/portfolio/blob/main/public/rive/dog.riv"

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_app_layout,node_home_page,node_info_page,node_else_page,node_work_layout,node_project_pages_route,node_fonts,node_rive_asset toneBlue
class node_hero,node_visual_section,node_work_section,node_hero_rive_dog toneAmber
class node_project_cards,node_project_preview_provider,node_preview_embed,node_gallery,node_nav,node_section_primitives toneRose
class node_home_projects,node_project_pages toneIndigo
class node_embed_chrome,node_scroll_utils toneTeal
```

## Components

### App routes

Next.js App Router pages and layouts.

- [Site shell](https://github.com/jenniemwei/portfolio/blob/main/src/app/layout.tsx): Next layout · Top-level application layout and global frame. · `src/app/layout.tsx`
- [Home page](https://github.com/jenniemwei/portfolio/blob/main/src/app/page.tsx): Route page · Landing route assembled from home sections. · `src/app/page.tsx`
- [Info page](https://github.com/jenniemwei/portfolio/blob/main/src/app/info/page.tsx): Route page · Standalone informational route. · `src/app/info/page.tsx`
- [Else page](https://github.com/jenniemwei/portfolio/blob/main/src/app/else/page.tsx): Route page · Standalone alternate route. · `src/app/else/page.tsx`
- [Work shell](https://github.com/jenniemwei/portfolio/blob/main/src/app/work/layout.tsx): Nested layout · Shared presentation boundary for work pages. · `src/app/work/layout.tsx`
- **Project pages**: Route group · Individual portfolio detail routes under the work subtree.

### Home experience

Landing page sections and hero composition.

- [Hero](https://github.com/jenniemwei/portfolio/blob/main/src/components/home/Hero.tsx): Home section · Primary landing hero content. · `src/components/home/Hero.tsx`
- [Visual section](https://github.com/jenniemwei/portfolio/blob/main/src/components/home/VisualSection.tsx): Home section · Supporting visual/editorial landing section. · `src/components/home/VisualSection.tsx`
- [Work section](https://github.com/jenniemwei/portfolio/blob/main/src/components/home/WorkSection.tsx): Home section · Homepage portfolio highlight section. · `src/components/home/WorkSection.tsx`
- [Rive dog](https://github.com/jenniemwei/portfolio/blob/main/src/components/home/HeroRiveDog.tsx): Animated hero · Interactive hero animation backed by a Rive asset. · `src/components/home/HeroRiveDog.tsx`

### Shared UI

Reusable navigation, cards, gallery, and section primitives.

- [Project cards](https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/ProjectCard.tsx): Card system · Project card and preview entrypoint components. · `src/components/cards/ProjectCard.tsx`
- [Preview state](https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/ProjectPreviewProvider.tsx): Preview UI · Shared preview/modal state for interactive project cards. · `src/components/cards/ProjectPreviewProvider.tsx`
- [Embed view](https://github.com/jenniemwei/portfolio/blob/main/src/components/cards/PreviewEmbedSection.tsx): Embed UI · Browser-like embedded preview section. · `src/components/cards/PreviewEmbedSection.tsx`
- [Gallery](https://github.com/jenniemwei/portfolio/blob/main/src/components/gallery/GalleryRow.tsx): Media system · Reusable gallery rows and thumbnail/video presentation. · `src/components/gallery/GalleryRow.tsx`
- [Navigation](https://github.com/jenniemwei/portfolio/blob/main/src/components/nav/Nav.tsx): Nav system · Site navigation, footer, and scroll-linked controls. · `src/components/nav/Nav.tsx`
- [Section primitives](https://github.com/jenniemwei/portfolio/blob/main/src/components/sections/SectionHeader.tsx): Layout helpers · Shared section header and spacer building blocks. · `src/components/sections/SectionHeader.tsx`

### Content data

Portfolio content sources.

- [Home projects](https://github.com/jenniemwei/portfolio/blob/main/src/data/home-projects.ts): Content data · Source data for homepage project highlights. · `src/data/home-projects.ts`
- [Project pages data](https://github.com/jenniemwei/portfolio/blob/main/src/data/project-pages.ts): Content data · Source data for individual project detail pages. · `src/data/project-pages.ts`

### Interactions

Scroll, embed, and browser-chrome helpers.

- [Embed chrome](https://github.com/jenniemwei/portfolio/blob/main/src/lib/embedChrome.ts): UI helper · Custom browser-chrome framing for embedded previews. · `src/lib/embedChrome.ts`
- [Scroll utils](https://github.com/jenniemwei/portfolio/blob/main/src/lib/home-section-scroll.ts): Interaction helper · Section scroll and scroll-behavior helpers. · `src/lib/home-section-scroll.ts`

### Assets

Fonts, media, and animation files served from public.

- [Typography](https://github.com/jenniemwei/portfolio/blob/main/public/Saans/Saans-TRIAL-Regular.otf): Assets · Saans font family used for the site. · `public/Saans/Saans-TRIAL-Regular.otf`
- [Rive asset](https://github.com/jenniemwei/portfolio/blob/main/public/rive/dog.riv): Animation asset · Rive animation used by the hero component. · `public/rive/dog.riv`

## Connections

- Site shell → Navigation: renders · Global shell includes site navigation and footer.
- Site shell → Home page: hosts · Top-level app layout provides the frame for routes.
- Site shell → Info page: hosts · Top-level app layout provides the frame for routes.
- Site shell → Else page: hosts · Top-level app layout provides the frame for routes.
- Site shell → Work shell: wraps · Work subtree is nested under the app shell.
- Work shell → Project pages: frames · Shared work layout presents all portfolio detail routes.
- Home page → Hero: composes · Home route is assembled from section components.
- Home page → Visual section: composes · Home route is assembled from section components.
- Home page → Work section: composes · Home route is assembled from section components.
- Hero → Rive dog: includes · Hero integrates the animated dog component.
- Rive dog → Rive asset: uses · Animation component is driven by the Rive file.
- Home page → Home projects: sources · Homepage work highlights come from centralized data.
- Project cards → Home projects: consumes · Cards render portfolio entries from shared content.
- Project cards → Preview state: opens · Preview-enabled cards launch shared preview state.
- Preview state → Embed view: renders · Preview state drives the embedded preview surface.
- Embed view → Embed chrome: frames · Embedded preview uses browser-like chrome helpers.
- Project pages → Project pages data: sources · Detail routes are driven by shared project-page content.
- Navigation → Scroll utils: coordinates · Navigation and section links rely on custom scroll behavior.
- Navigation → Section primitives: uses · Navigation and page structure share section primitives.
- Gallery → Project cards: pairs with · Gallery and card system form the visual portfolio toolkit.
- Visual section → Typography: styles with · Visual sections rely on the custom typography asset.
