# limhyunwoo97/bolgdraftagent architecture

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

- Interactive diagram: https://gitdiagram.com/limhyunwoo97/bolgdraftagent
- Repository: https://github.com/limhyunwoo97/bolgdraftagent

## Overview

Blog Draft Agent is a Windows desktop app for turning photos, factual notes, and saved writing samples into a reviewable blog outline and then a finished, copyable or downloadable post; it does not publish to Naver. The main workflow runs from the Tkinter UI through image analysis and themed/style-aware drafting, with local template fallbacks when NVIDIA is unavailable. Separate branches manage local theme samples and optional Naver profile login. Relationships are based on the shown excerpts and README; unsampled UI behavior and storage wiring are not expanded beyond documented capabilities.

Main entry points: [`app.py`](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py) (Blog editor UI), [`blog_agent/naver_oauth.py`](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/naver_oauth.py) (Naver OAuth), [`blog_agent/nvidia_client.py`](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/nvidia_client.py) (NVIDIA client), [`blog_agent/draft_service.py`](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/draft_service.py) (Outline stage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_writer["Blog editor UI<br/>[app.py]"]
  node_photo_inputs["Photo inputs<br/>[app.py]"]
  node_preview["Photo previews<br/>[app.py]"]
end

subgraph group_drafting["Draft creation"]
  node_outline["Outline stage<br/>[draft_service.py]"]
  node_body["Body stage<br/>[draft_service.py]"]
  node_style["Theme and style<br/>[style.py]"]
end

subgraph group_local["Local data"]
  node_settings["App settings<br/>[config.py]"]
  node_profiles[("Theme samples<br/>[profiles.py]")]
end

subgraph group_integrations["External integrations"]
  node_nvidia_client["NVIDIA client<br/>[nvidia_client.py]"]
  node_oauth["Naver OAuth<br/>[naver_oauth.py]"]
end

node_nvidia_service{{"NVIDIA API"}}
node_naver_auth{{"Naver authorization"}}
node_naver_profile{{"Naver profile API"}}
node_author(("Author"))
node_post_output["Post files and clipboard"]
node_browser["Web browser"]

node_author -->|"enters content"| node_writer
node_writer -->|"selects photos"| node_photo_inputs
node_photo_inputs -.->|"renders previews"| node_preview
node_writer -->|"requests outline"| node_outline
node_writer -->|"submits reviewed plan"| node_body
node_outline -->|"analyzes and drafts"| node_nvidia_client
node_body -->|"analyzes and drafts"| node_nvidia_client
node_outline -->|"builds style context"| node_style
node_body -->|"builds style context"| node_style
node_writer -->|"loads and saves samples"| node_profiles
node_writer -.->|"loads and saves settings"| node_settings
node_writer -->|"starts login"| node_oauth
node_nvidia_client -->|"reads credentials"| node_settings
node_nvidia_client -->|"sends API requests"| node_nvidia_service
node_oauth -->|"reads OAuth settings"| node_settings
node_oauth -->|"opens authorization"| node_browser
node_browser -->|"requests consent"| node_naver_auth
node_naver_auth -->|"redirects callback"| node_oauth
node_oauth -->|"fetches profile"| node_naver_profile
node_writer -->|"copies or saves"| node_post_output

click node_writer "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py"
click node_photo_inputs "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py"
click node_preview "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py"
click node_outline "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/draft_service.py"
click node_body "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/draft_service.py"
click node_style "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/style.py"
click node_nvidia_client "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/nvidia_client.py"
click node_settings "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/config.py"
click node_profiles "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/profiles.py"
click node_oauth "https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/naver_oauth.py"

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_writer,node_photo_inputs,node_preview,node_browser toneBlue
class node_outline,node_body,node_style toneAmber
class node_settings,node_profiles,node_nvidia_service,node_naver_profile toneMint
class node_nvidia_client,node_oauth toneRose
class node_naver_auth,node_author,node_post_output toneIndigo
```

## Components

### Desktop experience

- [Blog editor UI](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py): `app.py`
- [Photo inputs](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py): `app.py`
- [Photo previews](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/app.py): `app.py`

### Draft creation

- [Outline stage](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/draft_service.py): `blog_agent/draft_service.py`
- [Body stage](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/draft_service.py): `blog_agent/draft_service.py`
- [Theme and style](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/style.py): `blog_agent/style.py`

### Local data

- [App settings](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/config.py): `blog_agent/config.py`
- [Theme samples](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/profiles.py): `blog_agent/profiles.py`

### External integrations

- [NVIDIA client](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/nvidia_client.py): `blog_agent/nvidia_client.py`
- [Naver OAuth](https://github.com/limhyunwoo97/bolgdraftagent/blob/main/blog_agent/naver_oauth.py): `blog_agent/naver_oauth.py`

### Other components

- **NVIDIA API**
- **Naver authorization**
- **Naver profile API**
- **Author**
- **Post files and clipboard**
- **Web browser**

## Connections

- Author → Blog editor UI: enters content (evidence: `README.md`)
- Blog editor UI → Photo inputs: selects photos (evidence: `app.py`)
- Photo inputs → Photo previews: renders previews (evidence: `app.py`)
- Blog editor UI → Outline stage: requests outline (evidence: `README.md`)
- Blog editor UI → Body stage: submits reviewed plan (evidence: `README.md`)
- Outline stage → NVIDIA client: analyzes and drafts (evidence: `blog_agent/draft_service.py`)
- Body stage → NVIDIA client: analyzes and drafts (evidence: `blog_agent/draft_service.py`)
- Outline stage → Theme and style: builds style context (evidence: `blog_agent/draft_service.py`)
- Body stage → Theme and style: builds style context (evidence: `blog_agent/draft_service.py`)
- Blog editor UI → Theme samples: loads and saves samples (evidence: `README.md`)
- Blog editor UI → App settings: loads and saves settings (evidence: `app.py`)
- Blog editor UI → Naver OAuth: starts login (evidence: `app.py`)
- NVIDIA client → App settings: reads credentials (evidence: `blog_agent/nvidia_client.py`)
- NVIDIA client → NVIDIA API: sends API requests (evidence: `blog_agent/nvidia_client.py`)
- Naver OAuth → App settings: reads OAuth settings (evidence: `blog_agent/naver_oauth.py`)
- Naver OAuth → Web browser: opens authorization (evidence: `blog_agent/naver_oauth.py`)
- Web browser → Naver authorization: requests consent (evidence: `README.md`)
- Naver authorization → Naver OAuth: redirects callback (evidence: `README.md`)
- Naver OAuth → Naver profile API: fetches profile (evidence: `blog_agent/naver_oauth.py`)
- Blog editor UI → Post files and clipboard: copies or saves (evidence: `README.md`)
