# sehoon787/autopolio architecture

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

- Interactive diagram: https://gitdiagram.com/sehoon787/autopolio
- Repository: https://github.com/sehoon787/autopolio

## Overview

Autopolio turns GitHub activity and user-maintained career records into tailored portfolio documents. The main workflow runs from a user-started analysis/generation pipeline through repository and contributor analysis, technology and achievement extraction, AI summarization, template mapping, and document export. The graph also preserves the career knowledge base, platform templates, provider configuration, and Electron desktop support. Some links are based on README descriptions or the source index; unsampled implementation details are not inferred.

Main entry points: [`api/services/pipeline/pipeline_service.py`](https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_service.py) (Pipeline coordinator), [`api/services/analysis`](https://github.com/sehoon787/autopolio/tree/main/api/services/analysis) (GitHub analysis), [`api/main.py`](https://github.com/sehoon787/autopolio/blob/main/api/main.py) (FastAPI routes), [`api/services/pipeline/pipeline_template_step.py`](https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_template_step.py) (Template mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User clients"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_desktop["Electron desktop<br/>[main.ts]"]
end

subgraph group_api["API and orchestration"]
  node_api_server["FastAPI routes<br/>[main.py]"]
  node_pipeline_api["Pipeline endpoints<br/>[pipeline.py]"]
  node_pipeline_service["Pipeline coordinator"]
  node_llm_settings["AI provider settings<br/>[llm.py]"]
end

subgraph group_analysis["Career analysis"]
  node_github_analysis["GitHub analysis"]
  node_contributor_analysis["Contributor breakdown"]
  node_tech_detection["Technology detection"]
  node_achievement_detection["Achievement detection"]
end

subgraph group_generation["Content generation"]
  node_llm_generation["AI summarization<br/>[llm_generation.py]"]
  node_cli_llm["Local CLI models<br/>[cli_llm_service.py]"]
  node_template_mapping["Template mapping"]
  node_document_generation["Document generation"]
  node_exports["Format export<br/>[export_service.py]"]
  node_platform_templates["Platform templates"]
end

subgraph group_data["Career data"]
  node_knowledge_routes["Career knowledge API"]
  node_career_records[("Career records<br/>[project.py]")]
  node_analysis_records[("Analysis records<br/>[repo_analysis.py]")]
  node_database[("Database sessions<br/>[database.py]")]
end

node_user(("Career builder"))

node_user -->|"uses"| node_webapp
node_user -.->|"uses"| node_desktop
node_webapp -.->|"requests"| node_api_server
node_desktop -.->|"hosts"| node_api_server
node_api_server -->|"registers"| node_pipeline_api
node_pipeline_api -->|"delegates"| node_pipeline_service
node_pipeline_service -->|"runs analysis"| node_github_analysis
node_github_analysis -.->|"isolates commits"| node_contributor_analysis
node_pipeline_service -->|"detects technologies"| node_tech_detection
node_pipeline_service -->|"extracts achievements"| node_achievement_detection
node_pipeline_service -->|"summarizes projects"| node_llm_generation
node_llm_settings -->|"configures CLI"| node_cli_llm
node_pipeline_service -.->|"may invoke"| node_cli_llm
node_pipeline_service -->|"maps fields"| node_template_mapping
node_template_mapping -->|"generates document"| node_document_generation
node_document_generation -.->|"exports formats"| node_exports
node_platform_templates -.->|"provides templates"| node_template_mapping
node_knowledge_routes -.->|"manages records"| node_career_records
node_github_analysis -.->|"stores analysis"| node_analysis_records
node_pipeline_service -->|"uses sessions"| node_database
node_career_records -->|"uses base"| node_database
node_analysis_records -->|"uses base"| node_database

click node_webapp "https://github.com/sehoon787/autopolio/blob/main/frontend/src/App.tsx"
click node_desktop "https://github.com/sehoon787/autopolio/blob/main/frontend/electron/main.ts"
click node_api_server "https://github.com/sehoon787/autopolio/blob/main/api/main.py"
click node_pipeline_api "https://github.com/sehoon787/autopolio/blob/main/api/routers/pipeline.py"
click node_pipeline_service "https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_service.py"
click node_github_analysis "https://github.com/sehoon787/autopolio/tree/main/api/services/analysis"
click node_contributor_analysis "https://github.com/sehoon787/autopolio/blob/main/api/services/analysis/contributor_analyzer.py"
click node_tech_detection "https://github.com/sehoon787/autopolio/blob/main/api/services/analysis/technology_detection_service.py"
click node_achievement_detection "https://github.com/sehoon787/autopolio/blob/main/api/services/achievement/achievement_service.py"
click node_llm_generation "https://github.com/sehoon787/autopolio/blob/main/api/services/llm/llm_generation.py"
click node_cli_llm "https://github.com/sehoon787/autopolio/blob/main/api/services/llm/cli_llm_service.py"
click node_template_mapping "https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_template_step.py"
click node_document_generation "https://github.com/sehoon787/autopolio/blob/main/api/services/document/document_service.py"
click node_exports "https://github.com/sehoon787/autopolio/blob/main/api/services/export/export_service.py"
click node_platform_templates "https://github.com/sehoon787/autopolio/blob/main/api/services/platform/platform_template_service.py"
click node_knowledge_routes "https://github.com/sehoon787/autopolio/tree/main/api/routers/knowledge"
click node_career_records "https://github.com/sehoon787/autopolio/blob/main/api/models/project.py"
click node_analysis_records "https://github.com/sehoon787/autopolio/blob/main/api/models/repo_analysis.py"
click node_database "https://github.com/sehoon787/autopolio/blob/main/api/database.py"
click node_llm_settings "https://github.com/sehoon787/autopolio/blob/main/api/routers/llm.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_webapp,node_desktop toneBlue
class node_api_server,node_pipeline_api,node_pipeline_service,node_llm_settings toneAmber
class node_github_analysis,node_contributor_analysis,node_tech_detection,node_achievement_detection toneMint
class node_llm_generation,node_cli_llm,node_template_mapping,node_document_generation,node_exports,node_platform_templates toneRose
class node_knowledge_routes,node_career_records,node_analysis_records,node_database,node_user toneIndigo
```

## Components

### User clients

- [Web application](https://github.com/sehoon787/autopolio/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Electron desktop](https://github.com/sehoon787/autopolio/blob/main/frontend/electron/main.ts): `frontend/electron/main.ts`

### API and orchestration

- [FastAPI routes](https://github.com/sehoon787/autopolio/blob/main/api/main.py): `api/main.py`
- [Pipeline endpoints](https://github.com/sehoon787/autopolio/blob/main/api/routers/pipeline.py): `api/routers/pipeline.py`
- [Pipeline coordinator](https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_service.py): `api/services/pipeline/pipeline_service.py`
- [AI provider settings](https://github.com/sehoon787/autopolio/blob/main/api/routers/llm.py): `api/routers/llm.py`

### Career analysis

- [GitHub analysis](https://github.com/sehoon787/autopolio/tree/main/api/services/analysis): `api/services/analysis`
- [Contributor breakdown](https://github.com/sehoon787/autopolio/blob/main/api/services/analysis/contributor_analyzer.py): `api/services/analysis/contributor_analyzer.py`
- [Technology detection](https://github.com/sehoon787/autopolio/blob/main/api/services/analysis/technology_detection_service.py): `api/services/analysis/technology_detection_service.py`
- [Achievement detection](https://github.com/sehoon787/autopolio/blob/main/api/services/achievement/achievement_service.py): `api/services/achievement/achievement_service.py`

### Content generation

- [AI summarization](https://github.com/sehoon787/autopolio/blob/main/api/services/llm/llm_generation.py): `api/services/llm/llm_generation.py`
- [Local CLI models](https://github.com/sehoon787/autopolio/blob/main/api/services/llm/cli_llm_service.py): `api/services/llm/cli_llm_service.py`
- [Template mapping](https://github.com/sehoon787/autopolio/blob/main/api/services/pipeline/pipeline_template_step.py): `api/services/pipeline/pipeline_template_step.py`
- [Document generation](https://github.com/sehoon787/autopolio/blob/main/api/services/document/document_service.py): `api/services/document/document_service.py`
- [Format export](https://github.com/sehoon787/autopolio/blob/main/api/services/export/export_service.py): `api/services/export/export_service.py`
- [Platform templates](https://github.com/sehoon787/autopolio/blob/main/api/services/platform/platform_template_service.py): `api/services/platform/platform_template_service.py`

### Career data

- [Career knowledge API](https://github.com/sehoon787/autopolio/tree/main/api/routers/knowledge): `api/routers/knowledge`
- [Career records](https://github.com/sehoon787/autopolio/blob/main/api/models/project.py): `api/models/project.py`
- [Analysis records](https://github.com/sehoon787/autopolio/blob/main/api/models/repo_analysis.py): `api/models/repo_analysis.py`
- [Database sessions](https://github.com/sehoon787/autopolio/blob/main/api/database.py): `api/database.py`

### Other components

- **Career builder**

## Connections

- Career builder → Web application: uses (evidence: `README.md`)
- Career builder → Electron desktop: uses (evidence: `README.md`)
- Web application → FastAPI routes: requests
- Electron desktop → FastAPI routes: hosts
- FastAPI routes → Pipeline endpoints: registers (evidence: `api/main.py`)
- Pipeline endpoints → Pipeline coordinator: delegates (evidence: `api/routers/pipeline.py`)
- Pipeline coordinator → GitHub analysis: runs analysis (evidence: `api/services/pipeline/pipeline_service.py`)
- GitHub analysis → Contributor breakdown: isolates commits (evidence: `README.md`)
- Pipeline coordinator → Technology detection: detects technologies
- Pipeline coordinator → Achievement detection: extracts achievements
- Pipeline coordinator → AI summarization: summarizes projects
- AI provider settings → Local CLI models: configures CLI (evidence: `api/routers/llm.py`)
- Pipeline coordinator → Local CLI models: may invoke
- Pipeline coordinator → Template mapping: maps fields (evidence: `api/services/pipeline/pipeline_service.py`)
- Template mapping → Document generation: generates document (evidence: `api/services/pipeline/pipeline_template_step.py`)
- Document generation → Format export: exports formats (evidence: `README.md`)
- Platform templates → Template mapping: provides templates (evidence: `README.md`)
- Career knowledge API → Career records: manages records (evidence: `README.md`)
- GitHub analysis → Analysis records: stores analysis (evidence: `README.md`)
- Pipeline coordinator → Database sessions: uses sessions (evidence: `api/services/pipeline/pipeline_service.py`)
- Career records → Database sessions: uses base (evidence: `api/models/project.py`)
- Analysis records → Database sessions: uses base (evidence: `api/models/repo_analysis.py`)
