Paste a public GitHub repository URL and get eight views of how it is built: Overview, Architecture, Data flow, Endpoints, Dependencies, Entry points, Key paths, and Health.
Pitch: architecture maps for any public repo when an AI key is set, plus Spring Boot structure (entities, endpoints, modules) when the repo is Java.
GitHub URL → Python scanner (FastAPI) → JSON → Next.js dashboard
- The scanner (
scanner/) shallow-clones the repo, walks every.javafile withjavalang, and returns JSON describing entities, relations, endpoints, findings, diagrams, and an overview. WhenREPOMAP_AI_API_KEYorOPENAI_API_KEYis set, it also asks that model for an architecture diagram of any language and keeps the chart only if every linked path exists in the clone. - The web app (
apps/web/) receives that JSON (streamed as NDJSON), renders it into seven sections, and writes it toscans/so it survives a page refresh.
| Tool | Version |
|---|---|
| Python | 3.11+ |
| Node.js | 18+ |
| git | any recent |
cd scanner
pip install -r requirements.txtOptional smoke check:
python3 -m unittest test_smoke.py -v# from the scanner/ directory
uvicorn main:app --reload --port 8000The scanner listens on http://localhost:8000.
cp apps/web/.env.example apps/web/.env.local
# .env.local already points SCANNER_URL at http://localhost:8000cd apps/web
npm install
npm run devOpen http://localhost:3000.
Paste any public Spring Boot Java GitHub URL, e.g.:
https://github.com/spring-projects/spring-petclinic
Note: Architecture, overview, dependencies, and entry points work for any public repo (architecture needs an AI key). Spring Boot Java (
@Entity) also fills entities and endpoints. Security findings stay in the scanner JSON for a later UI.
.
├── scanner/ # Python FastAPI — clones, scans, returns JSON
│ ├── main.py # HTTP server (POST /scan-github, POST /scan-github/stream)
│ ├── scan.py # AST scanner — entities, relations, endpoints, findings, diagrams
│ ├── overview.py # High-level summary — modules, deps, entry points, health
│ ├── sequence.py # Per-route sequence / transaction / trigger diagrams
│ └── requirements.txt
│
├── apps/web/ # Next.js 15 frontend
│ ├── app/ # Routes (page, scan-github API proxy, repo-meta)
│ ├── components/ # Dashboard.tsx (all 7 views), MermaidDiagram.tsx
│ └── lib/ # types.ts, flow.ts (parse embedded Mermaid metadata), readScans.ts
│
├── scans/ # Scan results written here by the scanner; read on startup
└── contract.md # JSON schema contract between scanner and frontend
| Variable | Default | Description |
|---|---|---|
SCANNER_URL |
http://localhost:8000 |
URL of the running scanner process |
GITHUB_TOKEN |
(none) | Optional GitHub PAT for the web app. Sent as Authorization: Bearer on repo-meta requests. Without it, GitHub caps those calls at 60/hour per IP. |
REPOMAP_MAX_JAVA_FILES |
2500 |
Scanner cap. Repos above it are scanned module by module instead of being returned unscored. Set this on the scanner process. |
REPOMAP_AI_API_KEY |
(none) | Scanner key for architecture. With a Groq key (gsk_…), every map goes through Groq. Without a key, the static file-tree chart is kept. |
REPOMAP_AI_BASE_URL |
https://api.openai.com/v1 |
OpenAI-compatible chat endpoint. Use https://api.groq.com/openai/v1 for Groq. |
REPOMAP_AI_MODEL |
gpt-4o-mini |
Model name sent with the diagram request. On Groq, with no model set, the scanner uses openai/gpt-oss-120b. |
Set SCANNER_URL and GITHUB_TOKEN in apps/web/.env.local. For the architecture diagram, paste a Groq key into scanner/.env (REPOMAP_AI_API_KEY). The scanner reads that file on the next map. REPOMAP_MAX_JAVA_FILES can go in the same file.
Every successful scan is written to scans/<repo>.json by the scanner. The Next.js app reads all files in scans/ on startup (lib/readScans.ts), so previously scanned repos are available immediately after a restart without re-scanning. The sidebar can scan a repo again or remove it, which deletes that file.