How arnab-iitkgp/codelens works
CodeLens automates GitHub pull-request review: GitHub events reach the webhook, which queues review or indexing work; background workers fetch repository data, build code intelligence, generate and verify findings, and publish review results. Users connect repositories, inspect reviews and agent traces, manage settings, and handle subscriptions in the dashboard. The graph includes the documented AST/RAG, multi-agent verification, and auto-fix capabilities; unsampled implementation details are represented only where README or source-index evidence supports them.
Main entry points: index.ts Repository indexing · github.ts GitHub API · dashboard Dashboard · route.ts GitHub webhook
Components 24
User experience
- Dashboard
app/dashboard - Reviews and traces
app/dashboard/reviews - Repository management
module/repository
GitHub integration
- GitHub webhook
app/api/webhooks/github/route.ts - GitHub API
module/github/lib/github.ts
Background processing
- Inngest endpoint
app/api/inngest/route.ts - Job client
inngest/client.ts - PR review job
inngest/functions/review.ts - Repository indexing
inngest/functions/index.ts - Auto-fix job
inngest/functions/auto-fix.ts
Review intelligence
- Review engine
module/review/lib/engine.ts - Context investigator
module/review/lib/investigator.ts - Model routing
module/ai/lib/models.ts - RAG and embeddings
module/ai/lib/rag.ts - AST extraction
module/ast/lib/adapters - Graph resolver
module/ast/lib/resolver.ts - Fix agent
module/ai/lib/agent-fixer.ts
Identity and billing
- PostgreSQL
lib/db.ts - Authentication
lib/auth.ts - Subscription services
module/payment/lib/subscription.ts
Other components
- User
- GitHub
- Pinecone
- Polar
Connections 32
- User → Dashboard: uses
README.md - Dashboard → Reviews and traces: opens
README.md - Dashboard → Repository management: manages
README.md - GitHub → GitHub webhook: sends events
app/api/webhooks/github/route.ts - GitHub webhook → Job client: queues review
app/api/webhooks/github/route.ts - GitHub webhook → Job client: queues auto-fix
app/api/webhooks/github/route.ts - GitHub webhook → Repository indexing: requests reindex
app/api/webhooks/github/route.ts - Inngest endpoint → PR review job: registers
app/api/inngest/route.ts - Inngest endpoint → Repository indexing: registers
app/api/inngest/route.ts - Inngest endpoint → Auto-fix job: registers
app/api/inngest/route.ts - PR review job → GitHub API: fetches PR data
inngest/functions/review.ts - PR review job → Review engine: generates review
inngest/functions/review.ts - PR review job → GitHub API: publishes findings
inngest/functions/review.ts - Repository indexing → GitHub API: fetches files
inngest/functions/index.ts - Repository indexing → AST extraction: parses symbols
inngest/functions/index.ts - Repository indexing → Graph resolver: resolves edges
inngest/functions/index.ts - Repository indexing → RAG and embeddings: indexes content
inngest/functions/index.ts - Repository indexing → PostgreSQL: stores graph
inngest/functions/index.ts - Review engine → Context investigator: gathers context
module/review/lib/engine.ts - Review engine → Model routing: generates and verifies
module/review/lib/engine.ts - Context investigator → RAG and embeddings: retrieves context
- RAG and embeddings → Model routing: creates embeddings
module/ai/lib/rag.ts - RAG and embeddings → Pinecone: stores vectors
- Auto-fix job → Fix agent: runs agent
- Fix agent → GitHub API: posts suggestions
README.md - GitHub API → GitHub: reads and writes
module/github/lib/github.ts - User → Authentication: authenticates
README.md - Authentication → PostgreSQL: persists identity
lib/auth.ts - Authentication → Polar: configures billing
lib/auth.ts - Authentication → Subscription services: updates tiers
lib/auth.ts - Dashboard → Subscription services: manages plan
app/dashboard/subscription/page.tsx - Subscription services → Polar: handles subscriptions
README.md