How maashu231/codelens-ai works
CodeLens AI indexes GitHub repositories, then supports grounded questions, bug investigation, browsing, architecture exploration, file history, and impact analysis. The principal workflow runs from repository selection through ingestion, parsing/chunking, embeddings, vector storage, retrieval/reranking, context construction, and streamed LLM answers with citations. The graph includes documented features whose source was not sampled, but leaves their internal wiring unspecified. Edges reflect sampled calls, SOURCE INDEX references, or README-described relationships; unsampled implementation details are not inferred.
Main entry points: App.jsx Application shell · main.py FastAPI endpoints · retrieval_service.py Retrieval and reranking · api.js API client
Components 31
Web interface
- Application shell
frontend/src/App.jsx - Indexing controls
frontend/src/hooks/useRepositoryIndexing.js - Question controls
frontend/src/hooks/useCodeLensQuery.js - Bug controls
frontend/src/hooks/useBugInvestigation.js - Repository explorer
frontend/src/components/RepositoryExplorer.jsx - Architecture view
frontend/src/components/ArchitectureOverview.jsx - Code and history viewer
frontend/src/components/CodeViewerModal.jsx - Answer and citations
frontend/src/components/AnswerPanel.jsx - API client
frontend/src/services/api.js
API orchestration
- FastAPI endpoints
backend/main.py - Indexing jobs
backend/indexing_jobs.py
Repository indexing
- Repository access
backend/repository_service.py - File ingestion
backend/ingestion_service.py - File filtering
backend/file_filter.py - Code parsing
backend/code_parser.py - Smart chunking
backend/chunker.py
Code intelligence
- Embedding provider
backend/embedding_provider.py - Vector store
backend/vector_store.py - Retrieval and reranking
backend/retrieval_service.py - Reranker
backend/reranker.py - Answer generation
backend/answer_service.py - Streaming answers
backend/streaming_answer_service.py - Evidence context
backend/context_builder.py - Bug investigation
backend/bug_investigation_service.py - Change impact analysis
backend/impact_service.py - Repository overview
backend/architecture_service.py
External services
- GitHub integration
backend/github_service.py - Groq LLM client
backend/llm_service.py
Other components
- Developer
- Groq API
- GitHub
Connections 47
- Developer → Application shell: uses
README.md - Application shell → Indexing controls: controls indexing
frontend/src/App.jsx - Application shell → Question controls: submits questions
frontend/src/App.jsx - Application shell → Bug controls: starts investigations
frontend/src/App.jsx - Application shell → Repository explorer: renders
frontend/src/App.jsx - Application shell → Architecture view: renders
frontend/src/App.jsx - Application shell → Code and history viewer: renders
frontend/src/App.jsx - Application shell → Answer and citations: renders
frontend/src/App.jsx - Indexing controls → API client: starts and polls
frontend/src/hooks/useRepositoryIndexing.js - Question controls → API client: streams questions
frontend/src/hooks/useCodeLensQuery.js - Bug controls → API client: requests investigation
frontend/src/hooks/useBugInvestigation.js - Repository explorer → API client: loads files
frontend/src/components/RepositoryExplorer.jsx - Architecture view → API client: loads overview
frontend/src/components/ArchitectureOverview.jsx - Code and history viewer → API client: loads file history
frontend/src/components/CodeViewerModal.jsx - API client → FastAPI endpoints: sends requests
README.md - FastAPI endpoints → Indexing jobs: schedules indexing
backend/main.py - Indexing jobs → Retrieval and reranking: indexes repository
- FastAPI endpoints → Repository access: serves repository data
backend/main.py - FastAPI endpoints → Answer generation: routes questions
backend/main.py - FastAPI endpoints → Streaming answers: routes streams
backend/main.py - FastAPI endpoints → Bug investigation: routes investigations
backend/main.py - FastAPI endpoints → Change impact analysis: routes impact analysis
backend/main.py - FastAPI endpoints → Repository overview: builds overview
backend/main.py - Repository access → GitHub integration: fetches repository
backend/repository_service.py - GitHub integration → GitHub: reads repository data
backend/github_service.py - File ingestion → Repository access: loads file contents
backend/ingestion_service.py - Repository access → File filtering: filters paths
backend/repository_service.py - File ingestion → Code parsing: parses code
backend/ingestion_service.py - File ingestion → Smart chunking: creates chunks
backend/ingestion_service.py - Retrieval and reranking → File ingestion: ingests repository
backend/retrieval_service.py - Retrieval and reranking → Embedding provider: embeds query and chunks
backend/retrieval_service.py - Retrieval and reranking → Vector store: searches and updates
backend/retrieval_service.py - Retrieval and reranking → Reranker: reranks candidates
backend/retrieval_service.py - Answer generation → Retrieval and reranking: retrieves evidence
backend/answer_service.py - Answer generation → Evidence context: builds context
backend/answer_service.py - Answer generation → Groq LLM client: generates answer
backend/answer_service.py - Streaming answers → Retrieval and reranking: retrieves evidence
backend/streaming_answer_service.py - Streaming answers → Evidence context: builds context
backend/streaming_answer_service.py - Streaming answers → Groq LLM client: streams answer
- Groq LLM client → Groq API: calls model
backend/llm_service.py - Bug investigation → Answer generation: reuses retrieval
backend/bug_investigation_service.py - Bug investigation → Evidence context: builds evidence
backend/bug_investigation_service.py - Bug investigation → Groq LLM client: requests reasoning
backend/bug_investigation_service.py - Change impact analysis → Repository access: analyzes repository
backend/impact_service.py - Change impact analysis → Code parsing: uses dependency parsing
backend/impact_service.py - Repository overview → Repository access: reads repository
backend/architecture_service.py - Repository overview → Vector store: reads indexed data
backend/architecture_service.py