How nancy-kataria/codebase-intelligence works
Codebase Intelligence lets a developer submit a GitHub repository, index its code, review an AI-generated overview, and ask repository-grounded questions. The main path runs from the browser’s configuration and processing screens through ingestion, then into summary and chat retrieval; chat streams its answer back to the interface. The README documents language-aware chunking, GitHub access checks, embeddings, and Pinecone storage. Ingestion internals are represented at the route level because its source was read but not excerpted; cleanup automation is omitted as operational infrastructure.
Main entry points: chat/route.ts Chat endpoint · summarize/route.ts Summary endpoint · ingest/route.ts Ingestion endpoint · page.tsx Web application
Components 19
Developer experience
- Web application
app/page.tsx - Repository setup
components/ConfigurationDashboard.tsx - Ingestion progress
components/ProcessingState.tsx - Intelligence hub
components/IntelligenceHub.tsx - Project overview
components/ProjectSummaryCard.tsx - Chat interface
components/ChatInterface.tsx - Markdown rendering
components/markdown-responses.tsx
Analysis APIs
- Summary endpoint
app/api/summarize/route.ts - Chat endpoint
app/api/chat/route.ts - Request validation
lib/schema.ts - Domain types
lib/types.ts
Repository indexing
- Ingestion endpoint
app/api/ingest/route.ts - Language-aware chunking
app/api/ingest/route.ts
AI and retrieval
- OpenAI embeddings
- Pinecone client
lib/pinecone.ts - Pinecone index
Other components
- Developer
- GitHub API
- OpenAI GPT-4o
Connections 26
- Developer → Web application: uses
README.md - Web application → Repository setup: renders setup
app/page.tsx - Repository setup → Web application: submits repository
app/page.tsx - Web application → Ingestion progress: shows progress
app/page.tsx - Ingestion progress → Ingestion endpoint: posts repository
components/ProcessingState.tsx - Ingestion endpoint → Request validation: validates request
README.md - Ingestion endpoint → GitHub API: checks and loads
README.md - Ingestion endpoint → Language-aware chunking: splits source files
README.md - Language-aware chunking → OpenAI embeddings: embeds code chunks
README.md - Ingestion endpoint → Pinecone client: stores vectors
README.md - Pinecone client → Pinecone index: accesses index
lib/pinecone.ts - Ingestion progress → Summary endpoint: requests overview
components/ProcessingState.tsx - Web application → Intelligence hub: shows results
app/page.tsx - Intelligence hub → Project overview: renders overview
components/IntelligenceHub.tsx - Intelligence hub → Chat interface: renders chat
components/IntelligenceHub.tsx - Chat interface → Markdown rendering: renders responses
components/ChatInterface.tsx - Chat interface → Chat endpoint: posts question
components/ChatInterface.tsx - Summary endpoint → Request validation: validates request
app/api/summarize/route.ts - Chat endpoint → Request validation: validates request
app/api/chat/route.ts - Summary endpoint → OpenAI embeddings: embeds overview query
app/api/summarize/route.ts - Summary endpoint → Pinecone client: queries top 100
app/api/summarize/route.ts - Summary endpoint → OpenAI GPT-4o: generates analysis
app/api/summarize/route.ts - Chat endpoint → OpenAI embeddings: embeds question
app/api/chat/route.ts - Chat endpoint → Pinecone client: queries top 10
app/api/chat/route.ts - Chat endpoint → OpenAI GPT-4o: streams grounded answer
app/api/chat/route.ts - Chat endpoint → Chat interface: returns answer stream
README.md