Akhil Raj / RepoLens

Software Engineer

All projects

RepoLens

A file map, a short guide, and answers that cite exact lines, for any public GitHub repository.

View on GitHub

Overview

RepoLens reads a public GitHub repository at one commit and helps you understand it. It stores the snapshot, maps how TypeScript and JavaScript files depend on each other, and answers questions with citations that open the exact lines they came from.

The repository's code is never executed.

The problem

Getting oriented in an unfamiliar codebase is slow: find the entry points, work out what each folder is for, trace the imports. AI assistants can speed this up, but their answers are hard to trust when you cannot see which code they were based on.

What I built

Four views over the same snapshot. The screenshots show RepoLens exploring vercel/swr.

Overview. Stack, entry points, core modules, and folder roles, read from the files and the import graph. Core modules are ranked with PageRank over the dependency graph, so the files most of the code relies on come first.

vercel/swr overview: stack, entry points, and core modules

Guide. A short written tour of the commit: what the project is, where to start reading, and how it is organized, with links back to every file it used.

Map: 16 folders, 262 files, and 258 imports drawn as clusters and links

Image 1 of 2

Map: 16 folders, 262 files, and 258 imports drawn as clusters and links

Map. Folders as clusters of files, with the imports between them drawn as links that get wider as the dependency grows. Click a folder to see its largest files and the folders it talks to.

Guide: a written tour of the repository with the files each section draws on

Ask. Questions answered from retrieved source. "How this answer was built" shows the keyword hits, the vector hits, and the fused ranking, and every citation opens the lines it points to.

Key decisions

Search works without a language model. Keyword search plus local code embeddings in PostgreSQL with pgvector find the evidence. A chat model is optional, and when one is configured every paragraph still has to cite that evidence.

Nothing leaves the machine by default. Embeddings run locally (jina-embeddings-v2-base-code). A hosted chat model only receives retrieved excerpts, and only if you configure one. Keys stay on the server.

Measured, not guessed. Retrieval is scored against golden-question datasets, and the architecture and threat model are written down alongside the code.

Stack

Next.js, TypeScript, FastAPI, Python, PostgreSQL with pgvector, local code embeddings, optional cross-encoder reranking, Ollama or any OpenAI-compatible chat model, Docker Compose.

View on GitHub