This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.
What I Built
Have you ever discovered an interesting GitHub repository, wanted to understand how it works, and then spent hours jumping between files trying to figure out how everything connects?
That's the problem I wanted to tackle with RepoPilot.
RepoPilot is a repository analysis tool that helps developers explore unfamiliar codebases using Python static analysis, interactive function call graphs, and AI-generated insights.
Instead of manually piecing together a repository's structure, developers can submit a public GitHub repository URL and get a structured starting point for understanding the code.
What can RepoPilot do?
- Explore repository structure: Inspect files, extensions, and file sizes.
- Analyze Python code: Extract functions, classes, imports, and function calls using Python's Abstract Syntax Tree (AST).
- Visualize function relationships: Explore connections between functions through an interactive call graph.
- Generate AI-assisted insights: Get a project overview, architectural observations, potential issues, and recommendations.
- Investigate code more efficiently: Bring repository structure, code relationships, and natural-language explanations together in one workspace.
The goal is simple: reduce the repetitive work involved in getting familiar with a project so developers can spend more time understanding the code and less time manually piecing everything together.
Demo
Project repository: RepoPilot on GitHub
The repository README includes screenshots of the landing page, interactive call graph, and AI-assisted analysis report.
Code
Source code: github.com/shujahaadi/RepoPilot
RepoPilot is organized into separate modules for repository analysis, graph construction, API routes, and AI integration.
The main analysis pipeline looks like this:
GitHub Repository URL
|
v
FastAPI Backend
|
v
Repository Cloning
|
v
File Inventory + Python AST Analysis
|
v
Function Relationship Graph
|
v
AI-Assisted Repository Insights
|
v
Interactive React Workspace
The frontend brings these results together so developers can explore repository files, inspect function relationships, and review the generated analysis.
How I Built It
I built RepoPilot using a combination of backend development, static analysis, graph visualization, and AI integration.
Tech Stack
- React and Vite: Frontend application and development tooling.
- React Flow: Interactive function call graph visualization.
- FastAPI: Backend API.
- Python AST: Extracting structural information from Python source code.
- GitPython: Cloning and inspecting Git repositories.
- Google Gemini API: Generating repository overviews and additional insights.
- HTTPX: Making asynchronous HTTP requests to the AI API.
The Analysis Pipeline
The backend starts by cloning a repository and building an inventory of its files. Python files are then analyzed using the ast module to identify functions, classes, imports, and function calls.
The graph builder uses the extracted information to construct function relationships. Some relationships are straightforward to resolve, while ambiguous names and Python's dynamic behavior can make others more difficult.
The AI integration adds a natural-language layer to this structural information. It generates an overview of the project, architectural observations, potential issues, and recommendations based on the available repository context.
I also implemented processing limits to keep analysis manageable for larger repositories.
Challenges and Lessons
One of the more interesting challenges was turning raw function-call information into a useful graph. Detecting that a function calls another function is only part of the problem; identifying the correct target requires resolving names and handling ambiguity.
Another challenge was connecting the backend analysis pipeline to an interactive frontend that presents the results clearly.
Building RepoPilot gave me practical experience with API development, Python AST analysis, modular backend architecture, graph construction, React integration, and hosted AI APIs.
It also reinforced the importance of treating automated findings as starting points for investigation rather than unquestionable conclusions.
Why Does Open Innovation Matter?
Developer tools become more useful when people can inspect them, learn from them, adapt them, and contribute improvements.
By making RepoPilot's source code publicly available on GitHub, I want to give other developers a starting point they can examine, experiment with, and extend.
For a repository analysis tool, transparency matters. Developers should be able to inspect how the analysis pipeline works, understand how function relationships are constructed, and improve the implementation rather than relying entirely on unexplained results.
Open collaboration also creates opportunities to improve call resolution, expand language support, refine graph visualization, and develop better ways to explain how different parts of a codebase interact.
My goal is to make repository exploration more approachable and create a foundation that other developers can build on.
What's Next?
RepoPilot is a starting point for making unfamiliar repositories easier to navigate.
Potential improvements include:
- Better cross-file function resolution.
- Broader programming-language support.
- More detailed explanations connected to source code.
- Further improvements to graph exploration and repository navigation.
Building this project reinforced an important lesson for me: useful developer tools don't have to automate everything. Sometimes, making the first few steps easier is already a meaningful improvement.
If you've ever opened a repository and wondered, "Where do I even start?", that's the problem RepoPilot is trying to solve.
Built with curiosity, code, and a goal of making repository exploration easier.
Top comments (0)