# yuebo119/flint architecture

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

- Interactive diagram: https://gitdiagram.com/yuebo119/flint
- Repository: https://github.com/yuebo119/flint

## Overview

Flint is a Hugo-compatible static-site generator. The main workflow starts with a user invoking the CLI to build a site: configuration and content are loaded, content is parsed, templates render pages, and the builder writes generated output. The repository also provides a development server, module management, deployment commands, and a Go-template theme migration toolchain. The graph follows documented or indexed relationships; some subsystems, especially migration internals and asset processing, are only partially represented because their implementation files were not supplied in the tree or excerpts.

Main entry points: [`src/Flint.Core/Site/SiteBuilder.cs`](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Site/SiteBuilder.cs) (Site build orchestrator), [`src/Flint.Cli/Program.cs`](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Program.cs) (Flint CLI), [`src/Flint.Cli/Handlers/ServeHandler.cs`](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/ServeHandler.cs) (Serve command), [`src/Flint.Core/Content/ContentParser.cs`](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/ContentParser.cs) (Content parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_cli["Flint CLI<br/>[Program.cs]"]
  node_build_handler["Build command<br/>[BuildHandler.cs]"]
  node_deploy["Deploy command<br/>[DeployHandler.cs]"]
  node_serve_handler["Serve command<br/>[ServeHandler.cs]"]
end

subgraph group_build["Site generation"]
  node_config["Configuration loader<br/>[ConfigLoader.cs]"]
  node_site_builder["Site build orchestrator<br/>[SiteBuilder.cs]"]
  node_output["Generated site<br/>[SiteBuilder.cs]"]
end

subgraph group_content["Content and templates"]
  node_content_parser["Content parser<br/>[ContentParser.cs]"]
  node_frontmatter["Front matter"]
  node_markdown["Markdown renderer<br/>[MarkdownParser.cs]"]
  node_shortcodes["Shortcode processor"]
  node_hooks["Render hooks<br/>[RenderHooks.cs]"]
  node_templates["Scriban renderer"]
end

subgraph group_serve["Development serving"]
  node_dev_server["Development server<br/>[DevServer.cs]"]
end

subgraph group_extensions["Themes and modules"]
  node_module_handler["Module commands<br/>[ModHandler.cs]"]
  node_module_manager["Module manager<br/>[ModuleManager.cs]"]
  node_theme_parser["Go template parser"]
  node_theme_converter["Scriban converter"]
  node_theme_validation["Migration validation<br/>[Gates.cs]"]
end

node_user(("Site author"))
node_deploy_target(("Deployment target"))

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches build"| node_build_handler
node_cli -->|"dispatches serve"| node_serve_handler
node_cli -->|"dispatches deploy"| node_deploy
node_cli -->|"dispatches modules"| node_module_handler
node_build_handler -->|"loads settings"| node_config
node_build_handler -->|"starts build"| node_site_builder
node_site_builder -->|"loads configuration"| node_config
node_site_builder -->|"parses content"| node_content_parser
node_content_parser -->|"reads metadata"| node_frontmatter
node_content_parser -->|"renders Markdown"| node_markdown
node_content_parser -->|"processes shortcodes"| node_shortcodes
node_markdown -->|"uses render hooks"| node_hooks
node_hooks -->|"renders hook templates"| node_templates
node_site_builder -->|"renders pages"| node_templates
node_site_builder -->|"writes site"| node_output
node_serve_handler -->|"loads settings"| node_config
node_serve_handler -->|"builds site"| node_site_builder
node_serve_handler -->|"starts server"| node_dev_server
node_module_handler -->|"manages modules"| node_module_manager
node_theme_parser -.->|"converts syntax"| node_theme_converter
node_theme_converter -.->|"validates migration"| node_theme_validation
node_deploy -->|"deploys output"| node_deploy_target

click node_cli "https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Program.cs"
click node_build_handler "https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/BuildHandler.cs"
click node_deploy "https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/DeployHandler.cs"
click node_config "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Configuration/ConfigLoader.cs"
click node_site_builder "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Site/SiteBuilder.cs"
click node_content_parser "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/ContentParser.cs"
click node_frontmatter "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/FrontMatterParser.cs"
click node_markdown "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/MarkdownParser.cs"
click node_shortcodes "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/Shortcodes/ShortcodeProcessor.cs"
click node_hooks "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/RenderHooks.cs"
click node_templates "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Templates/ScribanTemplateRenderer.cs"
click node_output "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Site/SiteBuilder.cs"
click node_serve_handler "https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/ServeHandler.cs"
click node_dev_server "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Server/DevServer.cs"
click node_module_handler "https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/ModHandler.cs"
click node_module_manager "https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Modules/ModuleManager.cs"
click node_theme_parser "https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Parsing/GoTemplateParser.cs"
click node_theme_converter "https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Conversion/ScribanConverter.cs"
click node_theme_validation "https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Validation/Gates.cs"

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_cli,node_build_handler,node_deploy,node_serve_handler toneBlue
class node_config,node_site_builder,node_output toneAmber
class node_content_parser,node_frontmatter,node_markdown,node_shortcodes,node_hooks,node_templates toneMint
class node_dev_server toneRose
class node_module_handler,node_module_manager,node_theme_parser,node_theme_converter,node_theme_validation,node_user,node_deploy_target toneIndigo
```

## Components

### CLI workflows

- [Flint CLI](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Program.cs): `src/Flint.Cli/Program.cs`
- [Build command](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/BuildHandler.cs): `src/Flint.Cli/Handlers/BuildHandler.cs`
- [Deploy command](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/DeployHandler.cs): `src/Flint.Cli/Handlers/DeployHandler.cs`
- [Serve command](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/ServeHandler.cs): `src/Flint.Cli/Handlers/ServeHandler.cs`

### Site generation

- [Configuration loader](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Configuration/ConfigLoader.cs): `src/Flint.Core/Configuration/ConfigLoader.cs`
- [Site build orchestrator](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Site/SiteBuilder.cs): `src/Flint.Core/Site/SiteBuilder.cs`
- [Generated site](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Site/SiteBuilder.cs): `src/Flint.Core/Site/SiteBuilder.cs`

### Content and templates

- [Content parser](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/ContentParser.cs): `src/Flint.Core/Content/ContentParser.cs`
- [Front matter](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/FrontMatterParser.cs): `src/Flint.Core/Content/FrontMatterParser.cs`
- [Markdown renderer](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/MarkdownParser.cs): `src/Flint.Core/Content/MarkdownParser.cs`
- [Shortcode processor](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/Shortcodes/ShortcodeProcessor.cs): `src/Flint.Core/Content/Shortcodes/ShortcodeProcessor.cs`
- [Render hooks](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Content/RenderHooks.cs): `src/Flint.Core/Content/RenderHooks.cs`
- [Scriban renderer](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Templates/ScribanTemplateRenderer.cs): `src/Flint.Core/Templates/ScribanTemplateRenderer.cs`

### Development serving

- [Development server](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Server/DevServer.cs): `src/Flint.Core/Server/DevServer.cs`

### Themes and modules

- [Module commands](https://github.com/yuebo119/flint/blob/main/src/Flint.Cli/Handlers/ModHandler.cs): `src/Flint.Cli/Handlers/ModHandler.cs`
- [Module manager](https://github.com/yuebo119/flint/blob/main/src/Flint.Core/Modules/ModuleManager.cs): `src/Flint.Core/Modules/ModuleManager.cs`
- [Go template parser](https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Parsing/GoTemplateParser.cs): `src/Flint.ThemeMigrator/Parsing/GoTemplateParser.cs`
- [Scriban converter](https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Conversion/ScribanConverter.cs): `src/Flint.ThemeMigrator/Conversion/ScribanConverter.cs`
- [Migration validation](https://github.com/yuebo119/flint/blob/main/src/Flint.ThemeMigrator/Validation/Gates.cs): `src/Flint.ThemeMigrator/Validation/Gates.cs`

### Other components

- **Site author**
- **Deployment target**

## Connections

- Site author → Flint CLI: runs commands (evidence: `src/Flint.Cli/Program.cs`)
- Flint CLI → Build command: dispatches build (evidence: `src/Flint.Cli/Program.cs`)
- Flint CLI → Serve command: dispatches serve (evidence: `src/Flint.Cli/Program.cs`)
- Flint CLI → Deploy command: dispatches deploy (evidence: `src/Flint.Cli/Program.cs`)
- Flint CLI → Module commands: dispatches modules (evidence: `src/Flint.Cli/Program.cs`)
- Build command → Configuration loader: loads settings (evidence: `src/Flint.Cli/Handlers/BuildHandler.cs`)
- Build command → Site build orchestrator: starts build (evidence: `src/Flint.Cli/Handlers/BuildHandler.cs`)
- Site build orchestrator → Configuration loader: loads configuration (evidence: `src/Flint.Core/Site/SiteBuilder.cs`)
- Site build orchestrator → Content parser: parses content (evidence: `src/Flint.Core/Site/SiteBuilder.cs`)
- Content parser → Front matter: reads metadata (evidence: `src/Flint.Core/Content/ContentParser.cs`)
- Content parser → Markdown renderer: renders Markdown (evidence: `src/Flint.Core/Content/ContentParser.cs`)
- Content parser → Shortcode processor: processes shortcodes (evidence: `src/Flint.Core/Content/ContentParser.cs`)
- Markdown renderer → Render hooks: uses render hooks (evidence: `src/Flint.Core/Content/MarkdownParser.cs`)
- Render hooks → Scriban renderer: renders hook templates (evidence: `src/Flint.Core/Content/RenderHooks.cs`)
- Site build orchestrator → Scriban renderer: renders pages (evidence: `src/Flint.Core/Site/SiteBuilder.cs`)
- Site build orchestrator → Generated site: writes site (evidence: `src/Flint.Core/Site/SiteBuilder.cs`)
- Serve command → Configuration loader: loads settings (evidence: `src/Flint.Cli/Handlers/ServeHandler.cs`)
- Serve command → Site build orchestrator: builds site (evidence: `src/Flint.Cli/Handlers/ServeHandler.cs`)
- Serve command → Development server: starts server (evidence: `src/Flint.Cli/Handlers/ServeHandler.cs`)
- Module commands → Module manager: manages modules (evidence: `src/Flint.Cli/Handlers/ModHandler.cs`)
- Go template parser → Scriban converter: converts syntax
- Scriban converter → Migration validation: validates migration
- Deploy command → Deployment target: deploys output (evidence: `README.md`)
