Skip to content

Latest commit

 

History

History
133 lines (101 loc) · 3.5 KB

File metadata and controls

133 lines (101 loc) · 3.5 KB

RepoFriend

RepoFriend is an AI-powered GitHub repository analysis platform built around Retrieval-Augmented Generation (RAG). It indexes repository code, stores vector embeddings in Qdrant, and lets users ask grounded questions about a codebase with file-level references.

It is designed as a full-stack project with a Next.js frontend, a FastAPI backend, Firebase Authentication, PostgreSQL, Qdrant, and Gemini for answer generation.

What RepoFriend Does

  • Authenticates users with Google or GitHub through Firebase Authentication
  • Lets users browse GitHub repositories or paste a repository URL manually
  • Indexes repositories for semantic retrieval
  • Supports incremental reindexing when files change
  • Answers natural language questions about a repository using RAG
  • Returns grounded answers with file paths and function-level references
  • Supports multi-repository chat workspaces and saved conversations
  • Generates repository summaries with architecture overview, key modules, entry points, and important files
  • Reviews pull requests and commits from repository insights
  • Shows indexing progress while a repository is being processed

Current Free-Tier Guardrails

Because the project is tuned for free-tier infrastructure:

  • Each account can index up to 2 repositories per UTC day
  • Only 1 repository can be actively indexing at a time per user

Tech Stack

Frontend

  • Next.js (App Router)
  • TypeScript
  • Tailwind CSS
  • React Query
  • Firebase Authentication

Backend

  • FastAPI
  • Python 3.11+
  • SQLAlchemy + AsyncPG
  • Firebase Admin SDK

Data and AI

  • PostgreSQL (Supabase)
  • Qdrant Cloud
  • FastEmbed embeddings
  • Gemini API for answer generation

Project Structure

RepoFriend/
├── backend/
│   ├── app/
│   │   ├── auth/
│   │   ├── db/
│   │   ├── models/
│   │   ├── routes/
│   │   ├── services/
│   │   └── utils/
│   └── requirements.txt
├── frontend/
│   ├── app/
│   ├── components/
│   ├── hooks/
│   ├── lib/
│   ├── styles/
│   └── types/
└── .python-version

Core Features

Repository Ingestion

  • Clones a GitHub repository temporarily
  • Filters out irrelevant or oversized files
  • Chunks code into logical sections
  • Generates embeddings and stores them in Qdrant
  • Stores repository metadata in PostgreSQL

Query Pipeline

  • Embeds the user question
  • Retrieves relevant chunks from Qdrant
  • Builds strict grounded context
  • Sends the context to Gemini for final answer generation
  • Returns structured answers with source references

GitHub-Aware Workflows

  • Branch-aware indexing
  • Incremental sync on changed files
  • GitHub webhook sync support
  • Pull request review
  • Commit review

Workspace Features

  • Saved conversations
  • Multi-repo chat
  • Repository summaries
  • Indexing progress tracking

How To Clone

git clone https://github.com/pydevkrishna/RepoFriend.git
cd RepoFriend

Demo Flow

  1. Sign in with Google or GitHub
  2. Open the dashboard
  3. Select or paste a GitHub repository
  4. Index the repository
  5. Wait for indexing to complete
  6. Open chat or repository insights
  7. Ask questions, review diffs, or inspect commits

Why This Project Exists

RepoFriend was built as a production-style resume project that demonstrates:

  • full-stack engineering
  • authentication and protected APIs
  • RAG pipeline design
  • vector search integration
  • async backend architecture
  • real-world repository analysis workflows