Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗂️ Repo Whisperer

Your friendly AI assistant for understanding GitHub repositories — just paste a repo URL, select a file, and ask questions!


🌍 Live Deployment: https://repo-whisperer.vercel.app
🫙 Backend: Start the backend Instance

🕒 Note: The backend may take a few seconds to wake up if it's been idle (Render cold start).


Screenshot 2025-06-16 at 10 41 18 PM

🚀 Features

  • 🌐 Paste any public GitHub repo URL to load its file structure.
  • 🗃️ View a TreeView of all repository files.
  • 🧠 Select a file, ask a question — get context-aware answers powered by Cohere embeddings and Gemini/GPT.
  • 📚 Answers are formatted with markdown + code blocks and are easy to read.
  • ⚡ Instant feedback using toast notifications.
  • 📦 Uses semantic chunking, vector similarity, and LLMs.

📸 Example Output

Screenshot 2025-06-16 at 10 43 31 PM

🛠️ Tech Stack

Frontend

  • React + Vite
  • Material UI (MUI)
  • Framer Motion
  • React Markdown for rich formatting
  • React Syntax Highlighter for code blocks
  • React Virtualized Autocomplete for performance
  • Toastify for notifications

Backend

  • FastAPI for serving endpoints
  • Cohere API for vector embedding & chat
  • Gemini API for answer generation
  • Scikit-learn for cosine similarity
  • Requests, dotenv, NumPy, etc.

🧪 How It Works

  1. User enters GitHub repo URL → Frontend sends it to backend (/fetch-files)
  2. Backend:
    • Extracts repo tree using PyGitHub or GitHub API
    • Returns list of files and tree structure
  3. User selects a file & asks a question
  4. Backend:
    • Fetches raw file content from GitHub
    • Splits code into chunks + embeds using Cohere
    • Embeddings saved to data/ folder
    • Finds most relevant chunks using cosine similarity
    • Sends top chunks + user question to Gemini/GPT
    • Returns answer

📂 Folder Structure

Repo-Whisperer/
│
├── frontend/                  # React frontend (UI)
│   └── src/
│       └── App.jsx           # Core component (URL input, QnA interface)
│
├── backend/                  # FastAPI backend
│   ├── main.py               # API routes (/fetch-files, /ask)
│   ├── ingest/
│   │   ├── fetch_repo.py     # GitHub file listing
│   │   └── chunk_and_embed.py # Chunking + embedding logic
│   └── query/
│       └── ask_question.py   # Semantic search + LLM generation
│
├── data/                     # Stores JSON embeddings per file
└── README.md

🧠 Powered By

  • Cohere – for embeddings, conversational model and advanced LLM responses
  • GitHub REST API – for repo access
  • FastAPI – for backend API

💡 Future Enhancements

  • ✅ GitHub Auth (for private repos)
  • 🔍 File-level search
  • 🧪 Explain function/class on hover
  • 🌍 Multi-language support

🙌 Author

Made with ❤️ by Sumedh

Releases

Packages

Contributors

Languages