# rose4tune/portfolio architecture

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

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

## Overview

DLFly is a Next.js portfolio and technical blog backed by Notion as its CMS. The main visitor workflow is to open a home, blog, or project route; the route obtains content and metadata, then a screen presents lists or detail pages, with Notion record maps rendered for article bodies. The README also documents search/tag filtering, an animated keyword cloud, project showcases, and a resume. Source excerpts and README support the principal links; unsampled implementations are represented by their exact existing paths, with uncertain connections omitted.

Main entry points: [`src/app/blog`](https://github.com/rose4tune/portfolio/tree/dev/src/app/blog) (Blog routes), [`src/app/projects`](https://github.com/rose4tune/portfolio/tree/dev/src/app/projects) (Project routes), [`src/domain/posts/api`](https://github.com/rose4tune/portfolio/tree/dev/src/domain/posts/api) (Post queries), [`src/screens/project`](https://github.com/rose4tune/portfolio/tree/dev/src/screens/project) (Project screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Routes and navigation"]
  node_home_route["Home route<br/>[page.tsx]"]
  node_blog_route["Blog routes"]
  node_project_route["Project routes"]
  node_resume_route["Resume route<br/>[page.tsx]"]
  node_recordmap_route["Record map API<br/>[route.ts]"]
end

subgraph group_content["Content and Notion"]
  node_posts_api["Post queries"]
  node_post_helpers["Post helpers<br/>[helpers.ts]"]
  node_notion_hq["Notion metadata client<br/>[notionClient.ts]"]
  node_recordmap_api["Record map fetch<br/>[getRecordMap.ts]"]
  node_notion_client["Notion page client<br/>[client.ts]"]
  node_retry["Retry helper<br/>[withRetry.ts]"]
end

subgraph group_screens["Screens and features"]
  node_home_screen["Home screen<br/>[HomeScreen.tsx]"]
  node_blog_screen["Blog screens"]
  node_project_screen["Project screens"]
  node_resume_screen["Resume screen<br/>[ResumeScreen.tsx]"]
  node_search_filter["Search and tags"]
  node_keyword_cloud["Keyword cloud"]
end

subgraph group_shared["Shared presentation"]
  node_notion_wrapper["Notion page wrapper"]
  node_notion_renderer["Notion renderer<br/>[NotionRenderer.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_cover_util["Cover image utility<br/>[coverImage.ts]"]
end

node_visitor(("Visitor"))
node_notion_cms[("Notion CMS")]

node_visitor -->|"opens"| node_home_route
node_visitor -->|"opens"| node_blog_route
node_visitor -->|"opens"| node_project_route
node_visitor -->|"opens"| node_resume_route
node_home_route -->|"renders"| node_home_screen
node_blog_route -->|"queries posts"| node_posts_api
node_blog_route -->|"renders"| node_blog_screen
node_project_route -->|"queries posts"| node_posts_api
node_project_route -->|"renders"| node_project_screen
node_resume_route -.->|"renders"| node_resume_screen
node_posts_api -->|"uses"| node_post_helpers
node_posts_api -->|"queries metadata"| node_notion_hq
node_post_helpers -->|"uses"| node_notion_hq
node_notion_hq -.->|"queries database"| node_notion_cms
node_recordmap_route -->|"requests map"| node_recordmap_api
node_recordmap_api -->|"fetches record map"| node_notion_client
node_recordmap_api -->|"uses retry"| node_retry
node_notion_client -->|"fetches page"| node_notion_cms
node_blog_screen -->|"uses"| node_search_filter
node_project_screen -->|"uses"| node_search_filter
node_search_filter -->|"filters list"| node_blog_screen
node_search_filter -->|"filters list"| node_project_screen
node_home_screen -->|"renders"| node_keyword_cloud
node_blog_route -->|"renders detail"| node_notion_wrapper
node_project_route -->|"renders detail"| node_notion_wrapper
node_notion_wrapper -->|"renders blocks"| node_notion_renderer
node_home_screen -.->|"gets project covers"| node_cover_util
node_project_screen -.->|"gets project covers"| node_cover_util
node_visitor -.->|"navigates"| node_navbar

click node_home_route "https://github.com/rose4tune/portfolio/blob/dev/src/app/page.tsx"
click node_blog_route "https://github.com/rose4tune/portfolio/tree/dev/src/app/blog"
click node_project_route "https://github.com/rose4tune/portfolio/tree/dev/src/app/projects"
click node_resume_route "https://github.com/rose4tune/portfolio/blob/dev/src/app/resume/page.tsx"
click node_recordmap_route "https://github.com/rose4tune/portfolio/blob/dev/src/app/api/notion-recordmap/route.ts"
click node_posts_api "https://github.com/rose4tune/portfolio/tree/dev/src/domain/posts/api"
click node_post_helpers "https://github.com/rose4tune/portfolio/blob/dev/src/domain/posts/lib/helpers.ts"
click node_notion_hq "https://github.com/rose4tune/portfolio/blob/dev/src/domain/posts/lib/notionClient.ts"
click node_recordmap_api "https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/api/getRecordMap.ts"
click node_notion_client "https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/lib/client.ts"
click node_retry "https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/lib/withRetry.ts"
click node_home_screen "https://github.com/rose4tune/portfolio/blob/dev/src/screens/home/HomeScreen.tsx"
click node_blog_screen "https://github.com/rose4tune/portfolio/tree/dev/src/screens/blog"
click node_project_screen "https://github.com/rose4tune/portfolio/tree/dev/src/screens/project"
click node_resume_screen "https://github.com/rose4tune/portfolio/blob/dev/src/screens/resume/ResumeScreen.tsx"
click node_search_filter "https://github.com/rose4tune/portfolio/tree/dev/src/widgets/SearchFilterBar"
click node_keyword_cloud "https://github.com/rose4tune/portfolio/blob/dev/src/screens/home/ui/RandomKeywordCloud.tsx"
click node_notion_wrapper "https://github.com/rose4tune/portfolio/blob/dev/src/shared/ui/notion/NotionPageWrapper.tsx"
click node_notion_renderer "https://github.com/rose4tune/portfolio/blob/dev/src/shared/ui/notion/NotionRenderer.tsx"
click node_navbar "https://github.com/rose4tune/portfolio/blob/dev/src/shared/layout/Navbar.tsx"
click node_cover_util "https://github.com/rose4tune/portfolio/blob/dev/src/shared/lib/utils/coverImage.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_home_route,node_blog_route,node_project_route,node_resume_route,node_recordmap_route toneBlue
class node_posts_api,node_post_helpers,node_notion_hq,node_recordmap_api,node_notion_client,node_retry,node_notion_cms toneAmber
class node_home_screen,node_blog_screen,node_project_screen,node_resume_screen,node_search_filter,node_keyword_cloud toneMint
class node_notion_wrapper,node_notion_renderer,node_navbar,node_cover_util toneRose
class node_visitor toneIndigo
```

## Components

### Routes and navigation

- [Home route](https://github.com/rose4tune/portfolio/blob/dev/src/app/page.tsx): `src/app/page.tsx`
- [Blog routes](https://github.com/rose4tune/portfolio/tree/dev/src/app/blog): `src/app/blog`
- [Project routes](https://github.com/rose4tune/portfolio/tree/dev/src/app/projects): `src/app/projects`
- [Resume route](https://github.com/rose4tune/portfolio/blob/dev/src/app/resume/page.tsx): `src/app/resume/page.tsx`
- [Record map API](https://github.com/rose4tune/portfolio/blob/dev/src/app/api/notion-recordmap/route.ts): `src/app/api/notion-recordmap/route.ts`

### Content and Notion

- [Post queries](https://github.com/rose4tune/portfolio/tree/dev/src/domain/posts/api): `src/domain/posts/api`
- [Post helpers](https://github.com/rose4tune/portfolio/blob/dev/src/domain/posts/lib/helpers.ts): `src/domain/posts/lib/helpers.ts`
- [Notion metadata client](https://github.com/rose4tune/portfolio/blob/dev/src/domain/posts/lib/notionClient.ts): `src/domain/posts/lib/notionClient.ts`
- [Record map fetch](https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/api/getRecordMap.ts): `src/domain/notion/api/getRecordMap.ts`
- [Notion page client](https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/lib/client.ts): `src/domain/notion/lib/client.ts`
- [Retry helper](https://github.com/rose4tune/portfolio/blob/dev/src/domain/notion/lib/withRetry.ts): `src/domain/notion/lib/withRetry.ts`

### Screens and features

- [Home screen](https://github.com/rose4tune/portfolio/blob/dev/src/screens/home/HomeScreen.tsx): `src/screens/home/HomeScreen.tsx`
- [Blog screens](https://github.com/rose4tune/portfolio/tree/dev/src/screens/blog): `src/screens/blog`
- [Project screens](https://github.com/rose4tune/portfolio/tree/dev/src/screens/project): `src/screens/project`
- [Resume screen](https://github.com/rose4tune/portfolio/blob/dev/src/screens/resume/ResumeScreen.tsx): `src/screens/resume/ResumeScreen.tsx`
- [Search and tags](https://github.com/rose4tune/portfolio/tree/dev/src/widgets/SearchFilterBar): `src/widgets/SearchFilterBar`
- [Keyword cloud](https://github.com/rose4tune/portfolio/blob/dev/src/screens/home/ui/RandomKeywordCloud.tsx): `src/screens/home/ui/RandomKeywordCloud.tsx`

### Shared presentation

- [Notion page wrapper](https://github.com/rose4tune/portfolio/blob/dev/src/shared/ui/notion/NotionPageWrapper.tsx): `src/shared/ui/notion/NotionPageWrapper.tsx`
- [Notion renderer](https://github.com/rose4tune/portfolio/blob/dev/src/shared/ui/notion/NotionRenderer.tsx): `src/shared/ui/notion/NotionRenderer.tsx`
- [Navigation](https://github.com/rose4tune/portfolio/blob/dev/src/shared/layout/Navbar.tsx): `src/shared/layout/Navbar.tsx`
- [Cover image utility](https://github.com/rose4tune/portfolio/blob/dev/src/shared/lib/utils/coverImage.ts): `src/shared/lib/utils/coverImage.ts`

### Other components

- **Visitor**
- **Notion CMS**

## Connections

- Visitor → Home route: opens
- Visitor → Blog routes: opens
- Visitor → Project routes: opens
- Visitor → Resume route: opens
- Home route → Home screen: renders (evidence: `src/app/page.tsx`)
- Blog routes → Post queries: queries posts (evidence: `src/app/blog/page.tsx`)
- Blog routes → Blog screens: renders (evidence: `src/app/blog/page.tsx`)
- Project routes → Post queries: queries posts (evidence: `src/app/projects/page.tsx`)
- Project routes → Project screens: renders (evidence: `src/app/projects/page.tsx`)
- Resume route → Resume screen: renders
- Post queries → Post helpers: uses (evidence: `src/domain/posts/api/getPosts.ts`)
- Post queries → Notion metadata client: queries metadata (evidence: `src/domain/posts/api/getPosts.ts`)
- Post helpers → Notion metadata client: uses (evidence: `src/domain/posts/lib/helpers.ts`)
- Notion metadata client → Notion CMS: queries database
- Record map API → Record map fetch: requests map (evidence: `src/app/api/notion-recordmap/route.ts`)
- Record map fetch → Notion page client: fetches record map (evidence: `src/domain/notion/api/getRecordMap.ts`)
- Record map fetch → Retry helper: uses retry (evidence: `src/domain/notion/api/getRecordMap.ts`)
- Notion page client → Notion CMS: fetches page
- Blog screens → Search and tags: uses (evidence: `src/screens/blog/BlogScreen.tsx`)
- Project screens → Search and tags: uses (evidence: `src/screens/project/ProjectScreen.tsx`)
- Search and tags → Blog screens: filters list (evidence: `src/screens/blog/BlogScreen.tsx`)
- Search and tags → Project screens: filters list (evidence: `src/screens/project/ProjectScreen.tsx`)
- Home screen → Keyword cloud: renders (evidence: `src/screens/home/HomeScreen.tsx`)
- Blog routes → Notion page wrapper: renders detail (evidence: `src/app/blog/[slug]/page.tsx`)
- Project routes → Notion page wrapper: renders detail (evidence: `src/app/projects/[slug]/page.tsx`)
- Notion page wrapper → Notion renderer: renders blocks
- Home screen → Cover image utility: gets project covers
- Project screens → Cover image utility: gets project covers
- Visitor → Navigation: navigates
