# oss2026hnu/reposcore-cs architecture

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

- Interactive diagram: https://gitdiagram.com/oss2026hnu/reposcore-cs
- Repository: https://github.com/oss2026hnu/reposcore-cs

## Overview

reposcore-cs is a C# CLI for analyzing GitHub contributions and producing per-repository or combined score reports. The main flow validates CLI inputs, collects pull requests and issues, updates cached contribution data, calculates scores, sorts results, and exports selected report formats. A separate claims mode fetches recent issue-claim activity and formats a status report. The excerpts show the CLI orchestration and core scoring, cache, and formatting components; detailed retrieval and output wiring is not fully sampled, so uncertain connections are omitted.

Main entry points: [`Program.cs`](https://github.com/oss2026hnu/reposcore-cs/blob/main/Program.cs) (CLI workflow), [`Data/ReportFormatter.cs`](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportFormatter.cs) (Report formatting), [`Services/GitHubService.cs`](https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs) (GitHub service), [`Data/ScoreCalculator.cs`](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ScoreCalculator.cs) (Score calculation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI orchestration"]
  node_program["CLI workflow<br/>[Program.cs]"]
end

subgraph group_collection["GitHub collection"]
  node_github["GitHub service<br/>[GitHubService.cs]"]
  node_contrib_fetch["PR and issue retrieval<br/>[GitHubService.cs]"]
  node_claims_fetch["Claims retrieval<br/>[GitHubService.cs]"]
end

subgraph group_analysis["Contribution analysis"]
  node_score["Score calculation<br/>[ScoreCalculator.cs]"]
  node_sort["Report sorting<br/>[ReportSorter.cs]"]
end

subgraph group_reports["Reports and cache"]
  node_cache[("Analysis cache<br/>[CacheManager.cs]")]
  node_formatter["Report formatting<br/>[ReportFormatter.cs]"]
  node_output["Report files"]
  node_claims_output["Claims status report<br/>[ReportFormatter.cs]"]
end

node_operator(("CLI user"))
node_github_api["GitHub GraphQL"]

node_operator -->|"invokes"| node_program
node_program -->|"creates"| node_github
node_program -->|"requests contributions"| node_contrib_fetch
node_program -->|"requests claims"| node_claims_fetch
node_github -->|"queries"| node_github_api
node_program -->|"loads and saves"| node_cache
node_program -->|"calculates scores"| node_score
node_program -->|"sorts results"| node_sort
node_program -->|"builds reports"| node_formatter
node_formatter -->|"uses score limits"| node_score
node_formatter -->|"exports formats"| node_output
node_program -->|"prints claims report"| node_claims_output
node_claims_fetch -->|"queries"| node_github_api

click node_program "https://github.com/oss2026hnu/reposcore-cs/blob/main/Program.cs"
click node_github "https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs"
click node_contrib_fetch "https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs"
click node_claims_fetch "https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs"
click node_cache "https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/CacheManager.cs"
click node_score "https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ScoreCalculator.cs"
click node_sort "https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportSorter.cs"
click node_formatter "https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportFormatter.cs"
click node_claims_output "https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportFormatter.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_program,node_operator toneBlue
class node_github,node_contrib_fetch,node_claims_fetch toneAmber
class node_score,node_sort toneMint
class node_cache,node_formatter,node_output,node_claims_output toneRose
class node_github_api toneIndigo
```

## Components

### CLI orchestration

- [CLI workflow](https://github.com/oss2026hnu/reposcore-cs/blob/main/Program.cs): `Program.cs`

### GitHub collection

- [GitHub service](https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs): `Services/GitHubService.cs`
- [PR and issue retrieval](https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs): `Services/GitHubService.cs`
- [Claims retrieval](https://github.com/oss2026hnu/reposcore-cs/blob/main/Services/GitHubService.cs): `Services/GitHubService.cs`

### Contribution analysis

- [Score calculation](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ScoreCalculator.cs): `Data/ScoreCalculator.cs`
- [Report sorting](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportSorter.cs): `Data/ReportSorter.cs`

### Reports and cache

- [Analysis cache](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/CacheManager.cs): `Data/CacheManager.cs`
- [Report formatting](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportFormatter.cs): `Data/ReportFormatter.cs`
- **Report files**
- [Claims status report](https://github.com/oss2026hnu/reposcore-cs/blob/main/Data/ReportFormatter.cs): `Data/ReportFormatter.cs`

### Other components

- **CLI user**
- **GitHub GraphQL**

## Connections

- CLI user → CLI workflow: invokes (evidence: `README.md`)
- CLI workflow → GitHub service: creates (evidence: `Program.cs`)
- CLI workflow → PR and issue retrieval: requests contributions (evidence: `Program.cs`)
- CLI workflow → Claims retrieval: requests claims (evidence: `Program.cs`)
- GitHub service → GitHub GraphQL: queries (evidence: `Services/GitHubService.cs`)
- CLI workflow → Analysis cache: loads and saves (evidence: `Program.cs`)
- CLI workflow → Score calculation: calculates scores (evidence: `Program.cs`)
- CLI workflow → Report sorting: sorts results (evidence: `Program.cs`)
- CLI workflow → Report formatting: builds reports (evidence: `Program.cs`)
- Report formatting → Score calculation: uses score limits (evidence: `Data/ReportFormatter.cs`)
- Report formatting → Report files: exports formats (evidence: `Data/ReportFormatter.cs`)
- CLI workflow → Claims status report: prints claims report (evidence: `Program.cs`)
- Claims retrieval → GitHub GraphQL: queries (evidence: `Services/GitHubService.cs`)
