Code MRI

Understand Any GitHub Repository in Seconds

Built with React · FastAPI · Gemini AI · Google Cloud Run

Code MRI — AI-Powered Repository Understanding

This page explains what Code MRI is, why we built it, and how it works.

The goal is simple: help developers understand unfamiliar repositories instantly.


Inspiration

Understanding a new codebase is one of the hardest problems developers face. When joining a new project or exploring an open-source repository, developers often spend hours navigating folders, reading files, and trying to understand the architecture.

We wanted to solve this problem by building a tool that can instantly analyze a GitHub repository and explain its structure using AI.

The idea behind Code MRI is similar to how an MRI scan reveals the internal structure of the human body — our system reveals the internal architecture of a codebase.

Our goal is to help developers quickly visualize, understand, and explore complex repositories without manually reading thousands of lines of code.


Table of Contents

  1. What it does
  2. How we built it
  3. System Architecture
  4. Demo
  5. Challenges we ran into
  6. Accomplishments that we’re proud of
  7. What we learned
  8. What’s next for Code MRI

What it does

Code MRI is an AI-powered repository analyzer that scans GitHub projects and generates insights about the codebase.

Users simply provide a GitHub repository link, and the system:

This dramatically reduces the time required to understand unfamiliar repositories.


How we built it

The system uses a modern full-stack architecture.

Frontend

Backend

AI Layer

Infrastructure

The backend processes repository data and sends structured information to the AI model, which generates explanations designed to help developers quickly understand the system.


System Architecture

Below is a simplified view of how Code MRI analyzes a repository.

Code MRI System Architecture

Pipeline overview

  1. The user submits a GitHub repository URL through the React frontend.

  2. The request is sent to the FastAPI backend running on Cloud Run.

  3. The backend retrieves repository structure using the GitHub API or the crawler fallback.

  4. Repository files and relationships are analyzed to construct a structural model of the project.

  5. Structured repository data is sent to Gemini AI.

  6. Gemini generates explanations that help developers understand the repository architecture.

  7. The system combines deterministic code analysis with AI-generated explanations, allowing developers to quickly understand unfamiliar codebases.


Demo

Code MRI allows developers to analyze a GitHub repository and instantly understand its architecture.

Example Workflow

  1. A user submits a GitHub repository URL in the interface.
  2. The backend analyzes the repository structure.
  3. Code MRI generates an architecture graph and AI explanation of the codebase.

Example Interface

Code MRI Demo

Try It Yourself

Live Application → https://code-mri-hackathon.vercel.app/

Source Code → https://github.com/paragghosh99/code-mri-hackathon


Challenges we ran into

One of the biggest challenges was accurately analyzing repository structures.

Some repositories contain:

Another challenge was handling GitHub API limitations. In some cases the API failed or returned incomplete data.

To address this, we implemented a crawler fallback system so repositories could still be analyzed even when API calls failed.

We also encountered difficulties in visualizing architecture graphs in a way that remained readable for larger repositories.


Accomplishments that we’re proud of

Most importantly, we built a tool that can save developers significant time when exploring unfamiliar repositories.


What we learned

During this project we learned:

We also gained insights into how repositories are structured and how AI can help developers understand them faster.


What’s next for Code MRI

We plan to expand Code MRI with:

Our long-term vision is to build a platform where developers can instantly understand any codebase using AI.


Made with ❤️ by Parag and Pragyendu · Hosted on GitHub Pages