Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContextDump

Every developer has wasted hours explaining their own codebase. ContextDump already knows it.

ContextDump is an AI-powered codebase intelligence tool. Connect any public GitHub repo, and ask natural language questions about your code. The agent finds the exact files, cites line numbers, and explains everything — instantly. Show Image

Features

Semantic code search — finds relevant code across your entire repo

Autonomous agent — decides which tool to use based on your question

Source citations — every answer links back to exact file + line numbers

Chat history — conversations saved per repo

Smart chunking — splits by functions and classes, not character count

Fast inference — powered by Groq (300-1000+ tokens/sec)

Free embeddings — runs HuggingFace model locally, no OpenAI key needed

Voice input — ask questions by speaking, answers are spoken back via TTS

Local STT/TTS — Whisper runs on-device, edge-tts uses free Microsoft neural voices

Demo

Feature Description
Dashboard Chat
Add any public GitHub repository Ask questions and get cited answers
Real-time Ingestion Agent picks the right tool automatically
View files, chunks, and languages Sources show exact file + line number

Architecture

image

Tech Stack

Layer Technology
Frontend React 18 + Tailwind CSS + Vite
Backend Node.js + Express
Database MongoDB + Mongoose
Vector Store FAISS
Embeddings HuggingFace all-MiniLM-L6-v2
LLM + Agent Groq API — llama-3.3-70b-versatile
Auth JWT
Speech-to-Text faster-whisper (OpenAI Whisper, runs locally)
Text-to-Speech edge-tts (Microsoft Neural voices, free)
Voice Microservice Python FastAPI

Project Structure

image

Getting Started

Prerequisites:

Node.js 18+

MongoDB running locally

Groq API key

1. Clone the repo:

git clone https://github.com/LaibaBatoool/contextdump.git

cd contextdump

2. Setup Backend:

cd backend

npm install

cp .env.example .env

Fill in .env:

envPORT=5000

MONGO_URI=mongodb://localhost:27017/contextdump

JWT_SECRET=your_secret_key_here

JWT_EXPIRES_IN=7d

GROQ_API_KEY=your_groq_api_key_here

3. Create data directories:

mkdir -p data/vectorstores data/repos

4. Start the backend:

npm run dev

⚠️ First run downloads the HuggingFace embedding model (~90MB). This only happens once.

5. Setup Frontend:

cd ../frontend

npm install

npm run dev

6. Open the app

http://localhost:5173

Voice Setup (optional)

The voice feature requires a separate Python microservice for Whisper STT.

Prerequisites: Python 3.10+

  1. cd whisper-service
  2. python -m venv venv && venv\Scripts\activate
  3. pip install fastapi uvicorn faster-whisper python-multipart edge-tts
  4. uvicorn main:app --port 8001

⚠️ First run downloads the Whisper base model (~150MB). This only happens once.

Once running, the mic button in the chat UI will be active.

API Reference

Auth: POST /api/auth/register { name, email, password }

POST /api/auth/login { email, password }

GET /api/auth/me

Repos:

POST /api/repos { githubUrl }

GET /api/repos

GET /api/repos/:id

DELETE /api/repos/:id

Chat:

POST /api/chat/:repoId { content }

GET /api/chat/:repoId

DELETE /api/chat/:repoId

POST /api/chat/:repoId/voice multipart/form-data: audio file

Why Smart Chunking?

Most RAG tutorials chunk by character count (every 500 chars). That's bad for code — it splits functions in half and loses context. ContextDump chunks by code structure:

// Bad — naive chunking

"...const handleLogin = async (req, res" // cut off mid-function

// Good — structure-aware chunking

"// File: controllers/auth.js (lines 12-45) const handleLogin = async (req, res) => { const { email, password } = req.body; ..." // complete function

This means:

Semantically complete chunks

Accurate line number citations

Much better retrieval quality

How the Agent Works

The agent has 4 tools it chooses from automatically:

Tool When it's used
search_codebase General questions about how something works
get_file Questions about a specific file
explain_function Questions about a named function or class
generate_docs Requests to document a module

Built by

Laiba Batool — CS student at PIEAS

https://github.com/LaibaBatoool

https://www.linkedin.com/in/laiba-batool-70b3292b8/

About

AI agent that lets you query any GitHub codebase by text or voice. Powered by FAISS, Groq, Whisper, and edge-tts. Free to run.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages