How anushakommu123/github-code-rag works
GitHub Code RAG lets a user select and index a GitHub repository, then ask questions grounded in its source code. The backend fetches and filters files, chunks and validates them, embeds them, and persists versioned repository data; question answering retrieves and reranks chunks, generates a grounded response with citations, and maintains conversation history. The frontend provides repository, summary, and chat views. The README is empty, so capabilities and connections here are limited to the tree and shown source/index evidence.
Main entry points: qa_service.py Grounded QA · pipeline_service.py File processing · routes.py API routes · indexing_service.py Versioned indexing
Components 24
Web application
- Routes and views
frontend/src/App.tsx - Repository selection
frontend/src/pages/HomePage.tsx - Repository summary
frontend/src/pages/RepositorySummaryPage.tsx - Repository chat
frontend/src/pages/ChatPage.tsx - Repository session
frontend/src/state/RepositoryContext.tsx
API boundary
- HTTP client
frontend/src/api/client.ts - API routes
backend/app/api/routes.py
Repository indexing
- GitHub repository access
backend/app/services/github_service.py - Versioned indexing
backend/app/services/indexing_service.py - File processing
backend/app/services/pipeline_service.py - Chunk generation
backend/app/services/chunking_service.py - Chunk validation
backend/app/services/chunk_validation_service.py - Text embeddings
backend/app/services/embedding_service.py
Question answering
- Vector search
backend/app/services/search_service.py - Chunk reranking
backend/app/services/reranking_service.py - Grounded QA
backend/app/services/qa_service.py - Context formatting
backend/app/services/context_service.py - Citation validation
backend/app/services/citation_service.py - Conversation history
backend/app/services/conversation_service.py - Gemini generation
backend/app/services/llm_service.py
Persistence
- Repository database
backend/app/services/persistence_service.py
Other components
- Repository user
- GitHub API
- Gemini API
Connections 32
- Repository user → Repository selection: selects repository
- Routes and views → Repository selection: routes to
frontend/src/App.tsx - Routes and views → Repository summary: routes to
frontend/src/App.tsx - Routes and views → Repository chat: routes to
frontend/src/App.tsx - Repository selection → HTTP client: indexes repository
frontend/src/pages/HomePage.tsx - Repository chat → HTTP client: asks questions
frontend/src/pages/ChatPage.tsx - Repository selection → Repository session: saves session
frontend/src/pages/HomePage.tsx - Repository chat → Repository session: reads session
frontend/src/pages/ChatPage.tsx - HTTP client → API routes: sends HTTP requests
frontend/src/api/client.ts - API routes → Versioned indexing: indexes repository
backend/app/api/routes.py - API routes → Grounded QA: answers question
backend/app/api/routes.py - API routes → GitHub repository access: fetches repository data
backend/app/api/routes.py - GitHub repository access → GitHub API: calls API
backend/app/services/github_service.py - Versioned indexing → GitHub repository access: fetches files
backend/app/services/indexing_service.py - Versioned indexing → File processing: processes files
backend/app/services/indexing_service.py - Versioned indexing → Repository database: persists index
backend/app/services/indexing_service.py - File processing → GitHub repository access: fetches contents
backend/app/services/pipeline_service.py - File processing → Chunk generation: chunks files
backend/app/services/pipeline_service.py - File processing → Chunk validation: validates chunks
backend/app/services/pipeline_service.py - File processing → Text embeddings: embeds chunks
backend/app/services/pipeline_service.py - Grounded QA → Repository database: loads repository and chunks
backend/app/services/qa_service.py - Grounded QA → Conversation history: loads and saves history
backend/app/services/qa_service.py - Grounded QA → Text embeddings: embeds question
backend/app/services/qa_service.py - Grounded QA → Chunk reranking: reranks candidates
backend/app/services/qa_service.py - Grounded QA → Context formatting: builds context
backend/app/services/qa_service.py - Grounded QA → Gemini generation: generates answer
backend/app/services/qa_service.py - Grounded QA → Citation validation: validates citations
backend/app/services/qa_service.py - Vector search → Text embeddings: embeds query
backend/app/services/search_service.py - Vector search → Repository database: retrieves candidates
backend/app/services/search_service.py - Vector search → Chunk reranking: reranks candidates
backend/app/services/search_service.py - Gemini generation → Gemini API: requests generation
backend/app/services/llm_service.py - Conversation history → Repository database: stores history
backend/app/services/conversation_service.py