# aadith47/github-profile-analyzer architecture

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

- Interactive diagram: https://gitdiagram.com/aadith47/github-profile-analyzer
- Repository: https://github.com/aadith47/github-profile-analyzer

## Overview

GitHub Profile Analyzer is a command-line application that fetches a user profile and repositories, computes repository and profile-quality metrics, scores the profile, plots language usage, and requests an AI-generated report. The sampled entry point owns these calls and prints their results. The README also names the principal capabilities represented here; source excerpts support the detailed wiring shown.

Main entry points: [`main.py`](https://github.com/aadith47/github-profile-analyzer/blob/main/main.py) (Workflow entry), [`app/github_api.py`](https://github.com/aadith47/github-profile-analyzer/blob/main/app/github_api.py) (GitHub API client), [`app/ai_analyzer.py`](https://github.com/aadith47/github-profile-analyzer/blob/main/app/ai_analyzer.py) (AI report generation), [`app/analyzer.py`](https://github.com/aadith47/github-profile-analyzer/blob/main/app/analyzer.py) (Repository analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_main["Workflow entry<br/>[main.py]"]
end

subgraph group_collection["GitHub data"]
  node_github_api["GitHub API client<br/>[github_api.py]"]
end

subgraph group_analysis["Profile analysis"]
  node_analyzer["Repository analysis<br/>[analyzer.py]"]
  node_scorer["Profile scoring<br/>[scorer.py]"]
end

subgraph group_reports["Reports and display"]
  node_visualizer["Language chart<br/>[visualizer.py]"]
  node_ai_analyzer["AI report generation<br/>[ai_analyzer.py]"]
end

node_user(("GitHub user"))
node_github(("GitHub REST API"))
node_gemini(("Gemini service"))
node_terminal(("Console and plot"))

node_user -->|"enters username"| node_main
node_main -->|"requests profile"| node_github_api
node_main -->|"requests repositories"| node_github_api
node_github_api -->|"fetches data"| node_github
node_github -->|"returns JSON"| node_github_api
node_github_api -->|"returns user and repos"| node_main
node_main -->|"builds dataframe and metrics"| node_analyzer
node_analyzer -->|"returns metrics and classifications"| node_main
node_main -->|"calculates score"| node_scorer
node_scorer -->|"returns score"| node_main
node_main -->|"plots language distribution"| node_visualizer
node_main -->|"requests profile report"| node_ai_analyzer
node_ai_analyzer -->|"generates report"| node_gemini
node_gemini -->|"returns report text"| node_ai_analyzer
node_ai_analyzer -->|"returns report"| node_main
node_main -->|"prints results and shows plot"| node_terminal

click node_main "https://github.com/aadith47/github-profile-analyzer/blob/main/main.py"
click node_github_api "https://github.com/aadith47/github-profile-analyzer/blob/main/app/github_api.py"
click node_analyzer "https://github.com/aadith47/github-profile-analyzer/blob/main/app/analyzer.py"
click node_scorer "https://github.com/aadith47/github-profile-analyzer/blob/main/app/scorer.py"
click node_visualizer "https://github.com/aadith47/github-profile-analyzer/blob/main/app/visualizer.py"
click node_ai_analyzer "https://github.com/aadith47/github-profile-analyzer/blob/main/app/ai_analyzer.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_main,node_user toneBlue
class node_github_api toneAmber
class node_analyzer,node_scorer,node_github toneMint
class node_visualizer,node_ai_analyzer toneRose
class node_gemini,node_terminal toneIndigo
```

## Components

### CLI entry

- [Workflow entry](https://github.com/aadith47/github-profile-analyzer/blob/main/main.py): `main.py`

### GitHub data

- [GitHub API client](https://github.com/aadith47/github-profile-analyzer/blob/main/app/github_api.py): `app/github_api.py`

### Profile analysis

- [Repository analysis](https://github.com/aadith47/github-profile-analyzer/blob/main/app/analyzer.py): `app/analyzer.py`
- [Profile scoring](https://github.com/aadith47/github-profile-analyzer/blob/main/app/scorer.py): `app/scorer.py`

### Reports and display

- [Language chart](https://github.com/aadith47/github-profile-analyzer/blob/main/app/visualizer.py): `app/visualizer.py`
- [AI report generation](https://github.com/aadith47/github-profile-analyzer/blob/main/app/ai_analyzer.py): `app/ai_analyzer.py`

### Other components

- **GitHub user**
- **GitHub REST API**
- **Gemini service**
- **Console and plot**

## Connections

- GitHub user → Workflow entry: enters username
- Workflow entry → GitHub API client: requests profile
- Workflow entry → GitHub API client: requests repositories
- GitHub API client → GitHub REST API: fetches data
- GitHub REST API → GitHub API client: returns JSON
- GitHub API client → Workflow entry: returns user and repos
- Workflow entry → Repository analysis: builds dataframe and metrics
- Repository analysis → Workflow entry: returns metrics and classifications
- Workflow entry → Profile scoring: calculates score
- Profile scoring → Workflow entry: returns score
- Workflow entry → Language chart: plots language distribution
- Workflow entry → AI report generation: requests profile report
- AI report generation → Gemini service: generates report
- Gemini service → AI report generation: returns report text
- AI report generation → Workflow entry: returns report
- Workflow entry → Console and plot: prints results and shows plot
