RepoVision
Open Innovation Dev Tools
The problem RepoVision solves
RepoVision
Don't just read code. Understand how it works.
RepoVision turns any GitHub repository into an interactive architecture flowchart you can actually explore. Paste a URL and get a single, GitDiagram-style view of how the system fits together — then click any block to read a plain-language explanation, open the real source code, jump to that file on GitHub at the exact line, and trace what a change could affect.
The problem it solves
Code is easy to publish and hard to understand. Open an unfamiliar repo and you're handed thousands of files with no map: you read file by file, guess at the relationships, and hope you didn't miss the connective piece. Documentation is missing or stale. AI diagram tools invent plausible architecture you can't trust. And when you change a shared utility, its blast radius is invisible. The result is hours of orientation time and avoidable bugs.
What it does about it
- See the whole system at once — a flowchart grouping real files into modules, with a plain-language overview written for a newcomer.
- Map → code in one click — every block links to real source, extracted symbols, and the exact GitHub line.
- Know what a change touches — impact analysis walks dependencies backwards to show direct/indirect dependents, affected architecture, and the paths between them.
- Trust what you see — architecture comes from real static analysis. AI names and groups things, but every path and arrow is validated against the parsed graph; unsupported claims are thrown out, and a deterministic fallback works with no API key.
- Share it — Mermaid export, ?analysis= links, and a 14-second architecture video rendered entirely in the browser.
Why it's different
Static analysis gives you the truth; AI gives you the words — and the words never overwrite the truth. That principle runs through everything: detected-vs-inferred confidence badges, impact explicitly marked potential only, honest warnings instead of crashes on truncated trees and rate limits, private tokens that stay in memory, and a Brag video you can download and share.
Stack: React + Vite + TypeScript + Tailwind + React Flow + Monaco; Node + Express + TypeScript + GitHub REST API + TypeScript Compiler API + Gemini; one shared graph schema; Vercel + Render.
Challenges we ran into
- GitHub silently hides most of a large repository.
GitHub caps a recursive tree response at roughly 100k entries / 7 MB, and entries come back alphabetically — so everything after the cut-off point just disappears. A naive implementation would "successfully" analyze a huge repo while missing entire directories. We detect the truncation boundary from the last returned path, re-read only the uncovered directories, and recursively expand any subtree that's itself truncated. A hard budget of 250 tree requests keeps recovery to tens of calls, not thousands. - Rate limits are a real ceiling.
The unauthenticated API allows only 60 requests/hour. We moved public file downloads to raw.githubusercontent.com so only metadata and tree calls touch the REST API, batched fetches with bounded concurrency, and added retries with exponential backoff for throttled downloads. Hard caps on file size, total bytes, and file count keep the worst case predictable — and partial failures become visible warnings instead of a broken analysis. - AI that invents architecture you can't trust.
The easy approach lets the model name files and connections freely — and it confidently invents paths and arrows that don't exist. We flipped the relationship: static analysis produces the truth, and Gemini only receives an evidence pack of real paths, edges, routes, and models. A validation pass rejects every node path and arrow not backed by the parsed graph. If output fails validation or Gemini is unavailable, we fall back to a deterministic diagram built from categories and import edges. - Gemini fails under load — and fails expensively.
Testing surfaced intermittent 503s and 429s, and long timeouts made the UI feel hung. We tightened the timeout from 90s to 45s, added one backoff retry for transient errors, requested strict JSON with a fixed schema, and kept the deterministic fallback as a guaranteed exit path. The demo no longer dies because an upstream service had a bad moment. - Showing honest progress.
Analysis is one long request, so there's no real percentage to report — and fake progress bars are a lie we didn't want to ship. The button copy advances through the actual phases ("Fetching source files…", "Parsing AST…", "Drawing the flowchart…") driven by timers with a spinner. It communicates state without pretending to measure something we can't. - Private tokens that never leak.
Private support means handling a credential safely. The user-scoped, fine-grained token is sent only in an Authorization header, kept in memory for the request, then cleared. It never enters a URL, localStorage, a log, or an error message. Private analysis IDs are bearer capabilities and never appear in a shareable ?analysis= link. - Extraction without a full Python parser.
We support Python but didn't want a heavyweight Python AST toolchain. We wrote a line-based parser for imports, classes, and functions — and are explicit that it is not a full Python AST. Scoping the claim honestly beat pretending the coverage was complete. - Modern and legacy module systems.
Real repos mix ES imports, require(), dynamic import(), and re-exports. Recognizing only import statements loses half the graph. We extended the AST visitor to handle CommonJS calls, dynamic imports, and re-exports, then resolve relative specifiers to actual files. - Video rendering is constrained by the browser.
We wanted a shareable video with no rendering server. MediaRecorder format support varies, and canvas capture is real-time — the 14-second reel really takes 14 seconds. We negotiate the best supported format (MP4, then WebM), show live progress, support cancellation via AbortSignal, clean up object URLs, and render every frame from the same validated diagram the user explored. Nothing is uploaded. - Keeping two workspaces in agreement.
With a React client and Express server, a renamed field can silently break the other side. shared/graph.types.ts became the single source of truth (types only, no runtime code), backed by a typecheck script across both workspaces. One shared vocabulary is what lets the diagram, source viewer, and impact panel agree on what they're showing.
Technologies used