# ayshasharaf/repomap architecture

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

- Interactive diagram: https://gitdiagram.com/ayshasharaf/repomap
- Repository: https://github.com/ayshasharaf/repomap

## Overview

RepoMap accepts a public Spring Boot Java repository URL, scans the repository, and presents seven architectural and health views. The main path is browser dashboard → web proxy → Python scanner → scan and overview generation → persisted, streamed JSON → dashboard. Scan diagrams include route sequences, transactions, and triggers; the web app also supports scan history, comparisons, and GitHub repository metadata. The README documents these capabilities; some subsystem wiring is represented only where source excerpts or documentation support it.

Main entry points: [`apps/web/components/Dashboard.tsx`](https://github.com/ayshasharaf/repomap/blob/main/apps/web/components/Dashboard.tsx) (Scan dashboard), [`scanner/main.py`](https://github.com/ayshasharaf/repomap/blob/main/scanner/main.py) (Scanner API), [`apps/web/app/scan-github/route.ts`](https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/scan-github/route.ts) (Scan API proxy), [`apps/web/lib/readScans.ts`](https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/readScans.ts) (Saved scan reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web dashboard"]
  node_page["Dashboard page<br/>[page.tsx]"]
  node_dashboard["Scan dashboard<br/>[Dashboard.tsx]"]
  node_proxy["Scan API proxy<br/>[route.ts]"]
  node_repo_meta["Repository metadata<br/>[route.ts]"]
  node_flow["Flow metadata parser<br/>[flow.ts]"]
  node_diagrams["Diagram renderer<br/>[MermaidDiagram.tsx]"]
  node_diff["Scan comparison<br/>[diff.ts]"]
  node_history["Saved scan reader<br/>[readScans.ts]"]
end

subgraph group_scanner["Repository scanner"]
  node_scanner_api["Scanner API<br/>[main.py]"]
  node_repo_clone["Clone repository<br/>[main.py]"]
  node_java_scan["Java AST scan<br/>[scan.py]"]
  node_overview["Overview analysis<br/>[overview.py]"]
  node_route_diagrams["Route diagrams<br/>[sequence.py]"]
end

subgraph group_results["Scan results"]
  node_scan_result["Scan JSON"]
  node_scan_store[("Saved scans")]
end

subgraph group_integrations["External integrations"]
  node_github["GitHub repository"]
  node_github_api["GitHub metadata API"]
  node_mermaid["Mermaid library"]
end

node_engineer(("Repository user"))

node_engineer -->|"opens"| node_page
node_page -->|"renders"| node_dashboard
node_dashboard -->|"submits URL"| node_proxy
node_proxy -->|"forwards scan"| node_scanner_api
node_scanner_api -->|"starts scan"| node_repo_clone
node_repo_clone -->|"shallow clones"| node_github
node_scanner_api -->|"scans directory"| node_java_scan
node_scanner_api -->|"builds overview"| node_overview
node_java_scan -->|"produces entities, findings, diagrams"| node_scan_result
node_overview -->|"adds summary"| node_scan_result
node_scanner_api -->|"persists result"| node_scan_store
node_scanner_api -->|"streams result"| node_proxy
node_proxy -->|"returns NDJSON"| node_dashboard
node_dashboard -->|"deletes saved scan"| node_scan_store
node_history -->|"reads saved scans"| node_scan_store
node_history -->|"loads history"| node_dashboard
node_dashboard -->|"parses diagram metadata"| node_flow
node_dashboard -->|"renders views"| node_diagrams
node_diagrams -->|"renders diagrams"| node_mermaid
node_dashboard -->|"compares scans"| node_diff
node_dashboard -.->|"requests metadata"| node_repo_meta
node_repo_meta -.->|"fetches repository details"| node_github_api

click node_page "https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/page.tsx"
click node_dashboard "https://github.com/ayshasharaf/repomap/blob/main/apps/web/components/Dashboard.tsx"
click node_proxy "https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/scan-github/route.ts"
click node_repo_meta "https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/repo-meta/route.ts"
click node_flow "https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/flow.ts"
click node_diagrams "https://github.com/ayshasharaf/repomap/blob/main/apps/web/components/MermaidDiagram.tsx"
click node_diff "https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/diff.ts"
click node_history "https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/readScans.ts"
click node_scanner_api "https://github.com/ayshasharaf/repomap/blob/main/scanner/main.py"
click node_repo_clone "https://github.com/ayshasharaf/repomap/blob/main/scanner/main.py"
click node_java_scan "https://github.com/ayshasharaf/repomap/blob/main/scanner/scan.py"
click node_overview "https://github.com/ayshasharaf/repomap/blob/main/scanner/overview.py"
click node_route_diagrams "https://github.com/ayshasharaf/repomap/blob/main/scanner/sequence.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_page,node_dashboard,node_proxy,node_repo_meta,node_flow,node_diagrams,node_diff,node_history,node_engineer toneBlue
class node_scanner_api,node_repo_clone,node_java_scan,node_overview,node_route_diagrams toneAmber
class node_scan_result,node_scan_store toneMint
class node_github,node_github_api,node_mermaid toneRose
```

## Components

### Web dashboard

- [Dashboard page](https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/page.tsx): `apps/web/app/page.tsx`
- [Scan dashboard](https://github.com/ayshasharaf/repomap/blob/main/apps/web/components/Dashboard.tsx): `apps/web/components/Dashboard.tsx`
- [Scan API proxy](https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/scan-github/route.ts): `apps/web/app/scan-github/route.ts`
- [Repository metadata](https://github.com/ayshasharaf/repomap/blob/main/apps/web/app/repo-meta/route.ts): `apps/web/app/repo-meta/route.ts`
- [Flow metadata parser](https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/flow.ts): `apps/web/lib/flow.ts`
- [Diagram renderer](https://github.com/ayshasharaf/repomap/blob/main/apps/web/components/MermaidDiagram.tsx): `apps/web/components/MermaidDiagram.tsx`
- [Scan comparison](https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/diff.ts): `apps/web/lib/diff.ts`
- [Saved scan reader](https://github.com/ayshasharaf/repomap/blob/main/apps/web/lib/readScans.ts): `apps/web/lib/readScans.ts`

### Repository scanner

- [Scanner API](https://github.com/ayshasharaf/repomap/blob/main/scanner/main.py): `scanner/main.py`
- [Clone repository](https://github.com/ayshasharaf/repomap/blob/main/scanner/main.py): `scanner/main.py`
- [Java AST scan](https://github.com/ayshasharaf/repomap/blob/main/scanner/scan.py): `scanner/scan.py`
- [Overview analysis](https://github.com/ayshasharaf/repomap/blob/main/scanner/overview.py): `scanner/overview.py`
- [Route diagrams](https://github.com/ayshasharaf/repomap/blob/main/scanner/sequence.py): `scanner/sequence.py`

### Scan results

- **Scan JSON**
- **Saved scans**

### External integrations

- **GitHub repository**
- **GitHub metadata API**
- **Mermaid library**

### Other components

- **Repository user**

## Connections

- Repository user → Dashboard page: opens
- Dashboard page → Scan dashboard: renders
- Scan dashboard → Scan API proxy: submits URL
- Scan API proxy → Scanner API: forwards scan
- Scanner API → Clone repository: starts scan
- Clone repository → GitHub repository: shallow clones
- Scanner API → Java AST scan: scans directory
- Scanner API → Overview analysis: builds overview
- Java AST scan → Scan JSON: produces entities, findings, diagrams
- Overview analysis → Scan JSON: adds summary
- Scanner API → Saved scans: persists result
- Scanner API → Scan API proxy: streams result
- Scan API proxy → Scan dashboard: returns NDJSON
- Scan dashboard → Saved scans: deletes saved scan
- Saved scan reader → Saved scans: reads saved scans
- Saved scan reader → Scan dashboard: loads history
- Scan dashboard → Flow metadata parser: parses diagram metadata
- Scan dashboard → Diagram renderer: renders views
- Diagram renderer → Mermaid library: renders diagrams
- Scan dashboard → Scan comparison: compares scans
- Scan dashboard → Repository metadata: requests metadata
- Repository metadata → GitHub metadata API: fetches repository details
