Case study Developer Tools 2026
Repo Analyzer
Repository dependency visualizer with AI summaries.
- Role
- Solo full-stack engineer
- Timeline
- GDSC IIT Roorkee · June–July 2026
- Status
- Live
- Links
- Watch the demo
- 01
Parse
- 02
Analyze
- 03
Explain
- 04
Cache
- 05
Visualize
01Problem
The problem
Jumping into a large, unfamiliar codebase is hard: a file explorer shows you folders, but not how the files actually depend on each other. You can't see the hubs, the tangled cycles, or which modules are quietly doing too much — and nothing explains what any given file is *for*.
A solo project (Repo.Viz) for GDSC IIT Roorkee's Open Summer of Code. Point it at a local Python repo and it maps the real dependency graph, flags architectural smells, and explains modules in plain language.
02Architecture
How it's built
Repo Analyzer parses Python source with the standard-library `ast` module and resolves each import to the actual file in the repo — handling packages, relative imports, and submodules while excluding standard-library and third-party imports, all without executing any code. It renders the result as an interactive React Flow canvas with automatic dagre layout, detects circular clusters with networkx, computes per-file complexity with radon, and uses an LLM to explain each file's role — grounding the prompt in the file's actual import relationships so the summary describes its role in the system.
- 01
Parse
Python `ast` resolves real inter-file imports (no code executed)
- 02
Analyze
networkx finds strongly-connected components; radon computes complexity
- 03
Explain
Groq (Llama 3.3 70B) summarizes each file's role from its dependencies
- 04
Cache
SQLite caches summaries keyed on a SHA-256 hash of file contents
- 05
Visualize
React Flow + dagre render a draggable, focusable dependency graph
Stack
- Frontend
- ReactReact Flowdagrereact-router
- Backend
- PythonFastAPIastnetworkxradon
- Infra
- SQLite (content-hash cache)
- AI
- Groq (Llama 3.3 70B)
03Key decisions
Decisions that shaped it
Groq (Llama 3.3 70B) over Gemini
Switched the AI backend from Gemini to Groq running Llama 3.3 70B.
Gemini was the first choice but ran into API-access issues that blocked reliable development. Groq's Llama 3.3 70B was fast and dependable, and the AI layer was kept provider-agnostic so the backend can be swapped again if needed.
SQLite content-hash cache over time-based caching
Keyed the summary cache on a SHA-256 of file contents.
Content hashing means a summary is reused exactly as long as the file is unchanged and regenerated the moment it changes — you never pay for the same summary twice, and you're never served a stale one.
Static ast analysis over runtime tracing
Resolved dependencies statically with `ast`.
Executing an unfamiliar repo to trace imports is both a security risk and slow. Static analysis is safe, fast, and fully local — nothing about the user's code leaves their machine.
Hard parts
Resolving imports without running code
Statically mapping `import` statements to real files — across packages, relative imports, and submodules — is fiddly, but running the code was off the table for safety and speed. `ast` made it a pure static analysis.
Making large graphs readable
A dependency graph of a real repo is a hairball by default. Dagre's hierarchical layout plus a click-to-focus mode (fading everything but a file's direct dependencies) kept it legible at scale.
Grounding AI summaries in real structure
Generic 'summarize this file' prompts produce vague output. Feeding the file's actual import relationships into the prompt made summaries explain the file's *role in the system*, not just its code.
04Result
What shipped
- Code executed
- None (static ast)
- AI model
- Llama 3.3 70B via Groq
- Cache key
- SHA-256 of contents
- Privacy
- Fully local
Real dependency mapping
Resolves each import to the actual file — packages, relative imports, submodules — excluding stdlib and third-party. No code is executed.
Interactive graph canvas
React Flow gives draggable nodes, zoom/pan, a minimap, and dagre auto-layout. Click a file to focus on just its direct dependencies.
Circular-dependency detection
networkx surfaces strongly-connected clusters of mutually-dependent files and highlights them — a structural problem a file explorer can't show.
Per-file complexity metrics
radon reports lines of code and cyclomatic complexity on every node, so bloated or complex files are obvious at a glance.
AI file & architecture summaries
A 3-sentence, role-aware explanation per file, plus a one-click repo-level architecture review of hubs, coupling, and cycles.
Content-hash caching
Summaries are cached in SQLite keyed on a SHA-256 of file contents, so a file is only re-analyzed when it actually changes.
Lessons
- 01Grounding an LLM in real structured context (import edges) is the difference between a vague summary and a useful one.
- 02Static analysis beats runtime instrumentation when safety and speed matter — and for a dev tool they always do.
- 03A content-hash cache is a tiny amount of code that removes both cost and staleness in one move.
- 04Being provider-agnostic about the LLM turned an API-access dead end (Gemini) into a one-file swap (Groq).