# abinjoyal/github-activity-repository-reporter architecture

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

- Interactive diagram: https://gitdiagram.com/abinjoyal/github-activity-repository-reporter
- Repository: https://github.com/abinjoyal/github-activity-repository-reporter

## Overview

The product is a GitHub profile analytics reporter with Streamlit and CLI interfaces. Users request a single-user report or a two-developer comparison; each interface gathers profile, repository, language, and event data, computes metrics, and presents results or exports Markdown. The graph separates those analytics stages and the output layers. The excerpts show the CLI workflow in full and the dashboard’s data-fetching and comparison flow; the README documents dashboard capabilities whose implementation is outside the excerpts.

Main entry points: [`app.py`](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/app.py) (Web Dashboard), [`main.py`](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/main.py) (CLI Reporter), [`src/api/github_client.py`](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/api/github_client.py) (GitHub Client), [`src/exporters/markdown_exporter.py`](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/exporters/markdown_exporter.py) (Markdown Exporter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_dashboard["Web Dashboard<br/>[app.py]"]
  node_cli["CLI Reporter<br/>[main.py]"]
end

subgraph group_acquisition["GitHub Data"]
  node_github_client["GitHub Client<br/>[github_client.py]"]
end

subgraph group_analytics["Analytics"]
  node_repo_metrics["Repository Metrics<br/>[statistics.py]"]
  node_language_metrics["Language Metrics<br/>[statistics.py]"]
  node_activity_metrics["Activity Metrics<br/>[statistics.py]"]
  node_developer_match["Developer Match<br/>[statistics.py]"]
end

subgraph group_outputs["Reports and Presentation"]
  node_markdown_export["Markdown Exporter"]
  node_markdown_report["Markdown Report"]
  node_console_format["Console Formatter<br/>[formatting.py]"]
  node_dashboard_view["Charts and Dashboard<br/>[app.py]"]
end

node_user(("User"))
node_github_api["GitHub REST API"]
node_cli_user(("CLI User"))

node_user -->|"uses"| node_dashboard
node_cli_user -->|"runs"| node_cli
node_dashboard -->|"fetches data"| node_github_client
node_cli -->|"fetches data"| node_github_client
node_github_client -->|"requests data"| node_github_api
node_dashboard -->|"aggregates repos"| node_repo_metrics
node_dashboard -->|"aggregates languages"| node_language_metrics
node_dashboard -->|"parses events"| node_activity_metrics
node_cli -->|"aggregates repos"| node_repo_metrics
node_cli -->|"aggregates languages"| node_language_metrics
node_cli -->|"parses events"| node_activity_metrics
node_dashboard -->|"compares users"| node_developer_match
node_cli -->|"compares users"| node_developer_match
node_dashboard -->|"generates reports"| node_markdown_export
node_cli -->|"generates reports"| node_markdown_export
node_markdown_export -->|"writes"| node_markdown_report
node_cli -->|"prints summary"| node_console_format
node_dashboard -->|"renders metrics"| node_dashboard_view

click node_dashboard "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/app.py"
click node_cli "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/main.py"
click node_github_client "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/api/github_client.py"
click node_repo_metrics "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py"
click node_language_metrics "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py"
click node_activity_metrics "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py"
click node_developer_match "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py"
click node_markdown_export "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/exporters/markdown_exporter.py"
click node_console_format "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/utils/formatting.py"
click node_dashboard_view "https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/app.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_dashboard,node_cli,node_user,node_cli_user toneBlue
class node_github_client toneAmber
class node_repo_metrics,node_language_metrics,node_activity_metrics,node_developer_match,node_github_api toneMint
class node_markdown_export,node_markdown_report,node_console_format,node_dashboard_view toneRose
```

## Components

### User Interfaces

- [Web Dashboard](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/app.py): `app.py`
- [CLI Reporter](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/main.py): `main.py`

### GitHub Data

- [GitHub Client](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/api/github_client.py): `src/api/github_client.py`

### Analytics

- [Repository Metrics](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py): `src/analytics/statistics.py`
- [Language Metrics](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py): `src/analytics/statistics.py`
- [Activity Metrics](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py): `src/analytics/statistics.py`
- [Developer Match](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/analytics/statistics.py): `src/analytics/statistics.py`

### Reports and Presentation

- [Markdown Exporter](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/exporters/markdown_exporter.py): `src/exporters/markdown_exporter.py`
- **Markdown Report**
- [Console Formatter](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/src/utils/formatting.py): `src/utils/formatting.py`
- [Charts and Dashboard](https://github.com/abinjoyal/github-activity-repository-reporter/blob/main/app.py): `app.py`

### Other components

- **User**
- **GitHub REST API**
- **CLI User**

## Connections

- User → Web Dashboard: uses (evidence: `README.md`)
- CLI User → CLI Reporter: runs (evidence: `README.md`)
- Web Dashboard → GitHub Client: fetches data (evidence: `app.py`)
- CLI Reporter → GitHub Client: fetches data (evidence: `main.py`)
- GitHub Client → GitHub REST API: requests data (evidence: `src/api/github_client.py`)
- Web Dashboard → Repository Metrics: aggregates repos (evidence: `app.py`)
- Web Dashboard → Language Metrics: aggregates languages (evidence: `app.py`)
- Web Dashboard → Activity Metrics: parses events (evidence: `app.py`)
- CLI Reporter → Repository Metrics: aggregates repos (evidence: `main.py`)
- CLI Reporter → Language Metrics: aggregates languages (evidence: `main.py`)
- CLI Reporter → Activity Metrics: parses events (evidence: `main.py`)
- Web Dashboard → Developer Match: compares users (evidence: `app.py`)
- CLI Reporter → Developer Match: compares users (evidence: `main.py`)
- Web Dashboard → Markdown Exporter: generates reports (evidence: `README.md`)
- CLI Reporter → Markdown Exporter: generates reports (evidence: `main.py`)
- Markdown Exporter → Markdown Report: writes (evidence: `src/exporters/markdown_exporter.py`)
- CLI Reporter → Console Formatter: prints summary (evidence: `main.py`)
- Web Dashboard → Charts and Dashboard: renders metrics (evidence: `app.py`)
