# jewel777/repodoctor architecture

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

- Interactive diagram: https://gitdiagram.com/jewel777/repodoctor
- Repository: https://github.com/jewel777/repodoctor

## Overview

RepoDoctor is a Next.js application for assessing public GitHub repositories and comparing two projects. Users enter a repository on the home page to reach a health report, or submit two repositories through the comparison flow to see overall and category-level results. The shared analyzer gathers GitHub metadata and repository signals, derives health findings and scores, and supplies the report and comparison views. The README documents additional analysis areas not fully visible in the sampled excerpts; these are represented as analyzer responsibilities, not separate confirmed runtime services.

Main entry points: [`lib/github/analyzeRepo.ts`](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts) (Health analyzer), [`app/report/[owner]/[repo]/page.tsx`](https://github.com/jewel777/repodoctor/blob/main/app/report/%5Bowner%5D/%5Brepo%5D/page.tsx) (Health report), [`app/compare/[ownerA]/[repoA]/[ownerB]/[repoB]/page.tsx`](https://github.com/jewel777/repodoctor/blob/main/app/compare/%5BownerA%5D/%5BrepoA%5D/%5BownerB%5D/%5BrepoB%5D/page.tsx) (Comparison results), [`app/page.tsx`](https://github.com/jewel777/repodoctor/blob/main/app/page.tsx) (Repository entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User entry"]
  node_home["Repository entry<br/>[page.tsx]"]
  node_compareform["Compare entry<br/>[page.tsx]"]
end

subgraph group_analysis["Repository analysis"]
  node_analyzer["Health analyzer<br/>[analyzeRepo.ts]"]
  node_github{{"GitHub API"}}
  node_metadata["Repository metadata<br/>[analyzeRepo.ts]"]
  node_tree["Repository tree scan<br/>[analyzeRepo.ts]"]
  node_readme["README quality<br/>[analyzeRepo.ts]"]
  node_testing["Test detection<br/>[analyzeRepo.ts]"]
  node_workflows["CI workflow checks<br/>[analyzeRepo.ts]"]
  node_security["Security checks<br/>[analyzeRepo.ts]"]
  node_engineering["Engineering checks<br/>[analyzeRepo.ts]"]
  node_release["Release intelligence<br/>[analyzeRepo.ts]"]
  node_community["Community health<br/>[analyzeRepo.ts]"]
  node_findings["Scores and findings<br/>[analyzeRepo.ts]"]
end

subgraph group_results["Reports and comparison"]
  node_report["Health report<br/>[page.tsx]"]
  node_comparison["Comparison results<br/>[page.tsx]"]
end

node_developer(("Developer"))

node_developer -->|"enters repository"| node_home
node_developer -->|"starts comparison"| node_compareform
node_home -.->|"routes to report"| node_report
node_compareform -.->|"routes to results"| node_comparison
node_report -->|"analyzes repository"| node_analyzer
node_comparison -->|"analyzes both"| node_analyzer
node_analyzer -->|"fetches signals"| node_github
node_analyzer -->|"derives metadata"| node_metadata
node_analyzer -->|"scans paths"| node_tree
node_analyzer -->|"checks README"| node_readme
node_analyzer -->|"detects tests"| node_testing
node_analyzer -->|"checks workflows"| node_workflows
node_analyzer -.->|"checks security"| node_security
node_analyzer -.->|"checks engineering"| node_engineering
node_analyzer -.->|"checks releases"| node_release
node_analyzer -.->|"checks community"| node_community
node_analyzer -->|"produces scores"| node_findings
node_report -->|"renders findings"| node_findings
node_comparison -->|"compares scores"| node_findings

click node_home "https://github.com/jewel777/repodoctor/blob/main/app/page.tsx"
click node_compareform "https://github.com/jewel777/repodoctor/blob/main/app/compare/page.tsx"
click node_report "https://github.com/jewel777/repodoctor/blob/main/app/report/%5Bowner%5D/%5Brepo%5D/page.tsx"
click node_comparison "https://github.com/jewel777/repodoctor/blob/main/app/compare/%5BownerA%5D/%5BrepoA%5D/%5BownerB%5D/%5BrepoB%5D/page.tsx"
click node_analyzer "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_metadata "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_tree "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_readme "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_testing "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_workflows "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_security "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_engineering "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_release "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_community "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"
click node_findings "https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts"

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_home,node_compareform toneBlue
class node_analyzer,node_github,node_metadata,node_tree,node_readme,node_testing,node_workflows,node_security,node_engineering,node_release,node_community,node_findings toneAmber
class node_report,node_comparison toneMint
class node_developer toneIndigo
```

## Components

### User entry

- [Repository entry](https://github.com/jewel777/repodoctor/blob/main/app/page.tsx): `app/page.tsx`
- [Compare entry](https://github.com/jewel777/repodoctor/blob/main/app/compare/page.tsx): `app/compare/page.tsx`

### Repository analysis

- [Health analyzer](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- **GitHub API**
- [Repository metadata](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Repository tree scan](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [README quality](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Test detection](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [CI workflow checks](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Security checks](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Engineering checks](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Release intelligence](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Community health](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`
- [Scores and findings](https://github.com/jewel777/repodoctor/blob/main/lib/github/analyzeRepo.ts): `lib/github/analyzeRepo.ts`

### Reports and comparison

- [Health report](https://github.com/jewel777/repodoctor/blob/main/app/report/%5Bowner%5D/%5Brepo%5D/page.tsx): `app/report/[owner]/[repo]/page.tsx`
- [Comparison results](https://github.com/jewel777/repodoctor/blob/main/app/compare/%5BownerA%5D/%5BrepoA%5D/%5BownerB%5D/%5BrepoB%5D/page.tsx): `app/compare/[ownerA]/[repoA]/[ownerB]/[repoB]/page.tsx`

### Other components

- **Developer**

## Connections

- Developer → Repository entry: enters repository (evidence: `README.md`)
- Developer → Compare entry: starts comparison (evidence: `README.md`)
- Repository entry → Health report: routes to report
- Compare entry → Comparison results: routes to results
- Health report → Health analyzer: analyzes repository (evidence: `app/report/[owner]/[repo]/page.tsx`)
- Comparison results → Health analyzer: analyzes both (evidence: `app/compare/[ownerA]/[repoA]/[ownerB]/[repoB]/page.tsx`)
- Health analyzer → GitHub API: fetches signals (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → Repository metadata: derives metadata (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → Repository tree scan: scans paths (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → README quality: checks README (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → Test detection: detects tests (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → CI workflow checks: checks workflows (evidence: `lib/github/analyzeRepo.ts`)
- Health analyzer → Security checks: checks security (evidence: `README.md`)
- Health analyzer → Engineering checks: checks engineering (evidence: `README.md`)
- Health analyzer → Release intelligence: checks releases (evidence: `README.md`)
- Health analyzer → Community health: checks community (evidence: `README.md`)
- Health analyzer → Scores and findings: produces scores (evidence: `lib/github/analyzeRepo.ts`)
- Health report → Scores and findings: renders findings (evidence: `app/report/[owner]/[repo]/page.tsx`)
- Comparison results → Scores and findings: compares scores (evidence: `app/compare/[ownerA]/[repoA]/[ownerB]/[repoB]/page.tsx`)
