Skip to content
Case study · 02

RepoLens AI

Understand an unfamiliar codebase in minutes, not days.

Role
Full-stack developer
Stack
React · Tree-sitter · Graphviz · Gemini
Status
Live
repo-lens-zeta.vercel.app
The dashboard: repository stats, commit activity and an AI-written insight. · Designed screen, sample data
01 — The problem

New codebase, no map.

When developers join an existing project, they spend a lot of time just getting oriented: opening files one by one, tracing dependencies, and working out how the pieces fit together.

RepoLens AI is for developers, students and engineering teams facing an unfamiliar or complex codebase. It brings repository analysis, architecture visualisation, AI-assisted code understanding and documentation generation into one place, so people become productive faster.

02 — What I built

Everything a team needs to read a codebase faster.

Paste a public GitHub URL and RepoLens returns one report, written for developers, recruiters and teams alike. It is organised around four questions a newcomer asks first.

Architecture intelligence

How the system fits together, as a readable technical narrative.

  • Folders, entry points, services and components mapped
  • Routing, modules and data flow summarised for quick review
  • Architecture diagrams generated with Graphviz

Setup clarity

How to get it running, without digging through the repo.

  • Install steps and runtime requirements
  • Package manifests and framework signals turned into practical insight
  • Onboarding guidance drawn from the repository itself

Quality review

How healthy the code is, at a glance.

  • Maintainability signals and a concise health score
  • Security suggestions and dependency notes
  • A readability score and a list of actionable suggestions

Project structure

Where to look first.

  • A focused repository tree, with the important files and directories grouped
  • An interactive map from the entry point down through folders and files
  • A recruiter view: the project's value, purpose and technical scope without the noise
03 — How it works

From a URL to a structured report.

The whole experience is three steps, and the report can be exported and shared.

  1. Paste a public repository. RepoLens validates the GitHub URL and prepares the analysis.
  2. Build a repository snapshot. The backend fetches the metadata, the directory structure and the high-signal files.
  3. Generate structured insight. Gemini returns a typed report, which the dashboard renders as scores, sections and the repository map.
04 — Architecture

A pipeline, one stage at a time.

Reading files one at a time can't reveal a whole architecture, so RepoLens turns a repository into a structured representation first. Each stage has one job: import the repo, analyse its file structure, parse the source with Tree-sitter, draw the architecture with Graphviz, and only then hand that structure to the LLM to explain.

05 — Key decisions

Three choices that shaped it.

i.

Deterministic tools for facts

Tree-sitter extracts the real structure of the code, and Graphviz draws it. The diagrams come from parsing, not from a model's guess.

ii.

The LLM explains, it doesn't discover

The model receives a snapshot that has already been extracted and returns a typed report (scores, sections, suggestions), so the dashboard renders fields it can rely on instead of parsing free text.

iii.

OpenAI-compatible by design

Building against an OpenAI-compatible API means the provider can be swapped by configuration, with local inference through Ollama as a future option.

05 — The hardest part

Turning a whole repository into one structured picture an interface and an LLM could both use.

Many files and interconnected components meant reading files one by one wasn't enough. I split the work into a pipeline where every stage has a single, clear responsibility:

  1. Import the repository and analyse its file structure
  2. Parse the source code with Tree-sitter to recover components and relationships
  3. Visualise the architecture with Graphviz, then pass the structure to the LLM for explanations
06 — What I learned

What it taught me.

Structure beats skimming

understanding a large codebase needs structured analysis, not reading files one by one.

Tools and LLMs do different jobs

Tree-sitter and Graphviz extract and show structure; the LLM explains it in natural language.

Modularity pays off

keeping import, architecture recovery, AI chat, documentation and code quality separate makes the app easier to maintain and extend.

Next case study
FitTrack
A mobile workout tracker, built with React Native and Expo.