# tryferos/tryferos-blog architecture

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

- Interactive diagram: https://gitdiagram.com/tryferos/tryferos-blog
- Repository: https://github.com/tryferos/tryferos-blog

## Overview

This is a Next.js editorial site for browsing topic-organized articles, reading MDX content, and finding articles through search. The main workflow resolves a topic/article URL against the content catalog, derives metadata, and renders an article screen; the home page and search provide discovery paths. Article reading also has layout, body, and sidebar concerns, while code highlighting supports technical examples. Source excerpts and the index establish routing, catalog/model relationships, layout composition, and search wiring; several feature internals are unsampled, so their connections are omitted rather than inferred.

Main entry points: [`src/app/[topic]/[article]/page.tsx`](https://github.com/tryferos/tryferos-blog/blob/main/src/app/%5Btopic%5D/%5Barticle%5D/page.tsx) (Article route), [`src/models/article.model.ts`](https://github.com/tryferos/tryferos-blog/blob/main/src/models/article.model.ts) (Article model), [`src/types/content.types.ts`](https://github.com/tryferos/tryferos-blog/blob/main/src/types/content.types.ts) (Content types), [`src/app/layout.tsx`](https://github.com/tryferos/tryferos-blog/blob/main/src/app/layout.tsx) (Root layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Pages and routing"]
  node_home["Home page<br/>[page.tsx]"]
  node_article_route["Article route<br/>[page.tsx]"]
end

subgraph group_content["Editorial content"]
  node_mdx_content["MDX content"]
  node_topic_catalog["Topic catalog<br/>[content.topics.ts]"]
  node_article_model["Article model<br/>[article.model.ts]"]
  node_topic_model["Topic model<br/>[topic.model.ts]"]
  node_content_types["Content types<br/>[content.types.ts]"]
  node_article_status["Article statuses"]
end

subgraph group_reading["Article reading"]
  node_article_screen["Article screen<br/>[index.tsx]"]
  node_article_layout["Article layout<br/>[article.layout]"]
  node_article_body["Article body<br/>[article.body]"]
  node_article_sidebar["Article sidebar<br/>[article.sidebar]"]
  node_reading_controls["Reading controls"]
  node_code_highlighting["Code highlighting<br/>[highlighter.tsx]"]
end

subgraph group_discovery["Discovery and navigation"]
  node_search["Article search<br/>[ArticleSearch.tsx]"]
  node_search_dialog["Search dialog<br/>[SearchDialog.tsx]"]
  node_search_preview["Search preview<br/>[SearchPreview.tsx]"]
end

subgraph group_shell["Site shell"]
  node_site_layout["Site layout<br/>[index.tsx]"]
  node_root_layout["Root layout<br/>[layout.tsx]"]
  node_shared_components["Shared components"]
  node_ui_components["UI components"]
  node_layout_tokens["Layout tokens<br/>[layout.tokens.ts]"]
end

node_reader(("Reader"))

node_reader -->|"browses"| node_home
node_reader -->|"opens URL"| node_article_route
node_article_route -->|"looks up"| node_topic_catalog
node_article_route -->|"resolves route"| node_topic_model
node_article_route -->|"checks status"| node_article_model
node_article_route -->|"renders"| node_article_screen
node_topic_catalog -->|"catalogs"| node_mdx_content
node_topic_model -->|"checks publication"| node_article_model
node_topic_catalog -->|"uses types"| node_content_types
node_article_model -->|"uses types"| node_content_types
node_article_model -->|"reads statuses"| node_article_status
node_topic_model -->|"uses types"| node_content_types
node_root_layout -->|"wraps pages"| node_site_layout
node_root_layout -->|"uses"| node_shared_components
node_root_layout -->|"uses toaster"| node_ui_components
node_search -->|"opens"| node_search_dialog
node_search_dialog -.->|"renders"| node_search_preview
node_search_preview -->|"uses"| node_ui_components
node_search_preview -->|"uses"| node_shared_components
node_search -->|"accepts groups"| node_content_types
node_shared_components -->|"reads tokens"| node_layout_tokens
node_article_body -.->|"highlights code"| node_code_highlighting

click node_home "https://github.com/tryferos/tryferos-blog/blob/main/src/app/page.tsx"
click node_article_route "https://github.com/tryferos/tryferos-blog/blob/main/src/app/%5Btopic%5D/%5Barticle%5D/page.tsx"
click node_article_screen "https://github.com/tryferos/tryferos-blog/blob/main/src/features/article/index.tsx"
click node_article_layout "https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.layout"
click node_article_body "https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.body"
click node_article_sidebar "https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.sidebar"
click node_reading_controls "https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/components"
click node_mdx_content "https://github.com/tryferos/tryferos-blog/tree/main/src/data/topics"
click node_topic_catalog "https://github.com/tryferos/tryferos-blog/blob/main/src/data/topics/content.topics.ts"
click node_article_model "https://github.com/tryferos/tryferos-blog/blob/main/src/models/article.model.ts"
click node_topic_model "https://github.com/tryferos/tryferos-blog/blob/main/src/models/topic.model.ts"
click node_content_types "https://github.com/tryferos/tryferos-blog/blob/main/src/types/content.types.ts"
click node_article_status "https://github.com/tryferos/tryferos-blog/blob/main/src/data/article.statuses.ts"
click node_search "https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/ArticleSearch.tsx"
click node_search_dialog "https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/search-dialog/SearchDialog.tsx"
click node_search_preview "https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/search-dialog/SearchPreview.tsx"
click node_site_layout "https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/index.tsx"
click node_root_layout "https://github.com/tryferos/tryferos-blog/blob/main/src/app/layout.tsx"
click node_code_highlighting "https://github.com/tryferos/tryferos-blog/blob/main/src/lib/code-block/highlighter.tsx"
click node_shared_components "https://github.com/tryferos/tryferos-blog/tree/main/src/components/shared"
click node_ui_components "https://github.com/tryferos/tryferos-blog/tree/main/src/components/ui"
click node_layout_tokens "https://github.com/tryferos/tryferos-blog/blob/main/src/data/layout.tokens.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,node_article_route toneBlue
class node_mdx_content,node_topic_catalog,node_article_model,node_topic_model,node_content_types,node_article_status toneAmber
class node_article_screen,node_article_layout,node_article_body,node_article_sidebar,node_reading_controls,node_code_highlighting toneMint
class node_search,node_search_dialog,node_search_preview toneRose
class node_site_layout,node_root_layout,node_shared_components,node_ui_components,node_layout_tokens,node_reader toneIndigo
```

## Components

### Pages and routing

- [Home page](https://github.com/tryferos/tryferos-blog/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Article route](https://github.com/tryferos/tryferos-blog/blob/main/src/app/%5Btopic%5D/%5Barticle%5D/page.tsx): `src/app/[topic]/[article]/page.tsx`

### Editorial content

- [MDX content](https://github.com/tryferos/tryferos-blog/tree/main/src/data/topics): `src/data/topics`
- [Topic catalog](https://github.com/tryferos/tryferos-blog/blob/main/src/data/topics/content.topics.ts): `src/data/topics/content.topics.ts`
- [Article model](https://github.com/tryferos/tryferos-blog/blob/main/src/models/article.model.ts): `src/models/article.model.ts`
- [Topic model](https://github.com/tryferos/tryferos-blog/blob/main/src/models/topic.model.ts): `src/models/topic.model.ts`
- [Content types](https://github.com/tryferos/tryferos-blog/blob/main/src/types/content.types.ts): `src/types/content.types.ts`
- [Article statuses](https://github.com/tryferos/tryferos-blog/blob/main/src/data/article.statuses.ts): `src/data/article.statuses.ts`

### Article reading

- [Article screen](https://github.com/tryferos/tryferos-blog/blob/main/src/features/article/index.tsx): `src/features/article/index.tsx`
- [Article layout](https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.layout): `src/features/article/article.layout`
- [Article body](https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.body): `src/features/article/article.body`
- [Article sidebar](https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/article.sidebar): `src/features/article/article.sidebar`
- [Reading controls](https://github.com/tryferos/tryferos-blog/tree/main/src/features/article/components): `src/features/article/components`
- [Code highlighting](https://github.com/tryferos/tryferos-blog/blob/main/src/lib/code-block/highlighter.tsx): `src/lib/code-block/highlighter.tsx`

### Discovery and navigation

- [Article search](https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/ArticleSearch.tsx): `src/features/site-layout/site-layout.header/components/ArticleSearch.tsx`
- [Search dialog](https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/search-dialog/SearchDialog.tsx): `src/features/site-layout/site-layout.header/components/search-dialog/SearchDialog.tsx`
- [Search preview](https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/site-layout.header/components/search-dialog/SearchPreview.tsx): `src/features/site-layout/site-layout.header/components/search-dialog/SearchPreview.tsx`

### Site shell

- [Site layout](https://github.com/tryferos/tryferos-blog/blob/main/src/features/site-layout/index.tsx): `src/features/site-layout/index.tsx`
- [Root layout](https://github.com/tryferos/tryferos-blog/blob/main/src/app/layout.tsx): `src/app/layout.tsx`
- [Shared components](https://github.com/tryferos/tryferos-blog/tree/main/src/components/shared): `src/components/shared`
- [UI components](https://github.com/tryferos/tryferos-blog/tree/main/src/components/ui): `src/components/ui`
- [Layout tokens](https://github.com/tryferos/tryferos-blog/blob/main/src/data/layout.tokens.ts): `src/data/layout.tokens.ts`

### Other components

- **Reader**

## Connections

- Reader → Home page: browses
- Reader → Article route: opens URL
- Article route → Topic catalog: looks up (evidence: `src/app/[topic]/[article]/page.tsx`)
- Article route → Topic model: resolves route (evidence: `src/app/[topic]/[article]/page.tsx`)
- Article route → Article model: checks status (evidence: `src/app/[topic]/[article]/page.tsx`)
- Article route → Article screen: renders (evidence: `src/app/[topic]/[article]/page.tsx`)
- Topic catalog → MDX content: catalogs (evidence: `src/data/topics/content.topics.ts`)
- Topic model → Article model: checks publication (evidence: `src/models/topic.model.ts`)
- Topic catalog → Content types: uses types (evidence: `src/data/topics/content.topics.ts`)
- Article model → Content types: uses types (evidence: `src/models/article.model.ts`)
- Article model → Article statuses: reads statuses (evidence: `src/models/article.model.ts`)
- Topic model → Content types: uses types (evidence: `src/models/topic.model.ts`)
- Root layout → Site layout: wraps pages (evidence: `src/app/layout.tsx`)
- Root layout → Shared components: uses (evidence: `src/app/layout.tsx`)
- Root layout → UI components: uses toaster (evidence: `src/app/layout.tsx`)
- Article search → Search dialog: opens (evidence: `src/features/site-layout/site-layout.header/components/ArticleSearch.tsx`)
- Search dialog → Search preview: renders
- Search preview → UI components: uses (evidence: `src/features/site-layout/site-layout.header/components/search-dialog/SearchPreview.tsx`)
- Search preview → Shared components: uses (evidence: `src/features/site-layout/site-layout.header/components/search-dialog/SearchPreview.tsx`)
- Article search → Content types: accepts groups (evidence: `src/features/site-layout/site-layout.header/components/ArticleSearch.tsx`)
- Shared components → Layout tokens: reads tokens (evidence: `src/components/shared/Column.tsx`)
- Article body → Code highlighting: highlights code
