# aryan1718/git-map architecture

> Architecture diagram of the GitHub repository aryan1718/git-map, 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/aryan1718/git-map
- Repository: https://github.com/aryan1718/git-map

## Overview

GIT-MAP turns a public GitHub repository into an interactive code knowledge graph. A user opens a repository URL; the backend fetches a commit’s supported files, extracts and normalizes symbols and references, builds graph data, and serves graph views. The React frontend provides the landing and repository-view experience, while the API also exposes chunked Discovermap responses. The main analysis path is visible in the sampled routes and services; the wiring of the unsampled static visualization is not shown, so that connection is omitted.

Main entry points: [`app/api/routes.py`](https://github.com/aryan1718/git-map/blob/main/app/api/routes.py) (Repository analysis), [`frontend/src/pages/Graph.jsx`](https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Graph.jsx) (Repository view), [`app/services/github.py`](https://github.com/aryan1718/git-map/blob/main/app/services/github.py) (GitHub client), [`frontend/src/pages/Home.jsx`](https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Home.jsx) (Landing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User experience"]
  node_home["Landing page<br/>[Home.jsx]"]
  node_urlparse["GitHub URL parser<br/>[parseGithubUrl.js]"]
  node_graphpage["Repository view<br/>[Graph.jsx]"]
  node_canvas["Graph canvas"]
end

subgraph group_api["API and orchestration"]
  node_app["FastAPI app<br/>[main.py]"]
  node_routes["API routes<br/>[routes.py]"]
  node_analysisflow["Repository analysis<br/>[routes.py]"]
  node_cache[("Memory cache<br/>[cache.py]")]
end

subgraph group_analysis["Repository analysis"]
  node_github["GitHub client<br/>[github.py]"]
  node_repomap["Symbol extraction<br/>[repomap.py]"]
  node_normalizer["Symbol normalization"]
  node_builder["Graph builder<br/>[graph_builder.py]"]
end

subgraph group_views["Graph representations"]
  node_discover["Discovermap adapter"]
  node_staticview["Embedded graph view<br/>[index.html]"]
end

node_user(("Repository explorer"))
node_githubservice["GitHub API"]

node_user -->|"opens"| node_home
node_home -->|"parses URL"| node_urlparse
node_user -->|"opens repo"| node_graphpage
node_graphpage -->|"loads repo view"| node_app
node_app -->|"mounts routes"| node_routes
node_routes -->|"serves HTML"| node_staticview
node_routes -->|"dispatches analysis"| node_analysisflow
node_analysisflow -->|"fetches repo"| node_github
node_github -->|"requests files"| node_githubservice
node_githubservice -->|"returns repo data"| node_github
node_analysisflow -->|"reads cache"| node_cache
node_analysisflow -->|"writes graph"| node_cache
node_analysisflow -->|"extracts tags"| node_repomap
node_analysisflow -->|"builds graph"| node_builder
node_builder -->|"normalizes symbols"| node_normalizer
node_routes -->|"formats discover data"| node_discover
node_graphpage -->|"renders graph"| node_canvas

click node_home "https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Home.jsx"
click node_urlparse "https://github.com/aryan1718/git-map/blob/main/frontend/src/utils/parseGithubUrl.js"
click node_graphpage "https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Graph.jsx"
click node_canvas "https://github.com/aryan1718/git-map/blob/main/frontend/src/components/RepoGraphCanvas.jsx"
click node_app "https://github.com/aryan1718/git-map/blob/main/app/main.py"
click node_routes "https://github.com/aryan1718/git-map/blob/main/app/api/routes.py"
click node_analysisflow "https://github.com/aryan1718/git-map/blob/main/app/api/routes.py"
click node_cache "https://github.com/aryan1718/git-map/blob/main/app/core/cache.py"
click node_github "https://github.com/aryan1718/git-map/blob/main/app/services/github.py"
click node_repomap "https://github.com/aryan1718/git-map/blob/main/app/services/repomap.py"
click node_normalizer "https://github.com/aryan1718/git-map/blob/main/app/services/semantic_normalizer.py"
click node_builder "https://github.com/aryan1718/git-map/blob/main/app/services/graph_builder.py"
click node_discover "https://github.com/aryan1718/git-map/blob/main/app/services/discovermap_adapter.py"
click node_staticview "https://github.com/aryan1718/git-map/blob/main/app/static/index.html"

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_urlparse,node_graphpage,node_canvas toneBlue
class node_app,node_routes,node_analysisflow,node_cache toneAmber
class node_github,node_repomap,node_normalizer,node_builder,node_githubservice toneMint
class node_discover,node_staticview toneRose
class node_user toneIndigo
```

## Components

### User experience

- [Landing page](https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Home.jsx): `frontend/src/pages/Home.jsx`
- [GitHub URL parser](https://github.com/aryan1718/git-map/blob/main/frontend/src/utils/parseGithubUrl.js): `frontend/src/utils/parseGithubUrl.js`
- [Repository view](https://github.com/aryan1718/git-map/blob/main/frontend/src/pages/Graph.jsx): `frontend/src/pages/Graph.jsx`
- [Graph canvas](https://github.com/aryan1718/git-map/blob/main/frontend/src/components/RepoGraphCanvas.jsx): `frontend/src/components/RepoGraphCanvas.jsx`

### API and orchestration

- [FastAPI app](https://github.com/aryan1718/git-map/blob/main/app/main.py): `app/main.py`
- [API routes](https://github.com/aryan1718/git-map/blob/main/app/api/routes.py): `app/api/routes.py`
- [Repository analysis](https://github.com/aryan1718/git-map/blob/main/app/api/routes.py): `app/api/routes.py`
- [Memory cache](https://github.com/aryan1718/git-map/blob/main/app/core/cache.py): `app/core/cache.py`

### Repository analysis

- [GitHub client](https://github.com/aryan1718/git-map/blob/main/app/services/github.py): `app/services/github.py`
- [Symbol extraction](https://github.com/aryan1718/git-map/blob/main/app/services/repomap.py): `app/services/repomap.py`
- [Symbol normalization](https://github.com/aryan1718/git-map/blob/main/app/services/semantic_normalizer.py): `app/services/semantic_normalizer.py`
- [Graph builder](https://github.com/aryan1718/git-map/blob/main/app/services/graph_builder.py): `app/services/graph_builder.py`

### Graph representations

- [Discovermap adapter](https://github.com/aryan1718/git-map/blob/main/app/services/discovermap_adapter.py): `app/services/discovermap_adapter.py`
- [Embedded graph view](https://github.com/aryan1718/git-map/blob/main/app/static/index.html): `app/static/index.html`

### Other components

- **Repository explorer**
- **GitHub API**

## Connections

- Repository explorer → Landing page: opens
- Landing page → GitHub URL parser: parses URL
- Repository explorer → Repository view: opens repo
- Repository view → FastAPI app: loads repo view
- FastAPI app → API routes: mounts routes
- API routes → Embedded graph view: serves HTML
- API routes → Repository analysis: dispatches analysis
- Repository analysis → GitHub client: fetches repo
- GitHub client → GitHub API: requests files
- GitHub API → GitHub client: returns repo data
- Repository analysis → Memory cache: reads cache
- Repository analysis → Memory cache: writes graph
- Repository analysis → Symbol extraction: extracts tags
- Repository analysis → Graph builder: builds graph
- Graph builder → Symbol normalization: normalizes symbols
- API routes → Discovermap adapter: formats discover data
- Repository view → Graph canvas: renders graph
