How madhaveshwar/repolens works
RepoLens AI connects GitHub repositories to an analysis and review workflow: users select a repository, initiate scans or PR reviews, and inspect findings, scores, trends, and reports in the web app. The backend combines API routes, asynchronous tasks, repository analysis, AI-assisted review, static scanners, and persisted results. The README documents broad capabilities such as test generation, autofixes, and exports; those branches are represented where the tree supports them, but their detailed wiring is not shown in the excerpts.
Main entry points: tasks.py Background tasks · fast_scan_pipeline.py Repository scan pipeline · App.tsx Web app · reviewer.py AI PR reviewer
Components 22
Web application
- Web app
frontend/src/App.tsx - Repository views
frontend/src/pages/RepositoryDetail.tsx - PR review view
frontend/src/pages/PRReview.tsx - API client
frontend/src/lib/api.ts - Repository state
frontend/src/store/repositoryStore.ts - Analysis state
frontend/src/store/analysisStore.ts
API and workflow
- FastAPI routes
backend/app/routers - Background tasks
backend/app/tasks/tasks.py - Progress updates
backend/app/websockets/websocket_manager.py
Analysis and review
- Repository scan pipeline
backend/app/services/fast_scan_pipeline.py - AI PR reviewer
backend/app/services/reviewer.py - LLM client
backend/app/services/llm_client.py - Security scanning
backend/app/services/static_security_scanner.py - Quality and debt
backend/app/services - Test generation
backend/app/services
Persistence and reporting
- Application database
backend/app/database/database.py - Analysis records
backend/app/models/models.py - Report generation
backend/app/services/report_generator.py
External integrations
- GitHub access
backend/app/services/github_service.py - GitHub
- LLM providers
Other components
- Engineer
Connections 27
- Engineer → Web app: uses
- Web app → Repository views: routes to
frontend/src/App.tsx - Web app → PR review view: routes to
frontend/src/App.tsx - Repository views → Repository state: updates
frontend/src/pages/RepositoryDetail.tsx - Repository views → API client: requests
frontend/src/pages/RepositoryDetail.tsx - PR review view → API client: requests
frontend/src/pages/PRReview.tsx - Repository state → API client: requests
frontend/src/store/repositoryStore.ts - API client → FastAPI routes: calls
- FastAPI routes → Background tasks: queues scans
backend/app/routers/webhooks.py - Background tasks → Application database: persists results
backend/app/tasks/tasks.py - Background tasks → GitHub access: uses
backend/app/tasks/tasks.py - Repository scan pipeline → GitHub access: fetches repository
backend/app/services/fast_scan_pipeline.py - Repository scan pipeline → Security scanning: runs scan
backend/app/services/fast_scan_pipeline.py - Repository scan pipeline → Quality and debt: runs analyses
backend/app/services/fast_scan_pipeline.py - Repository scan pipeline → LLM client: requests analysis
backend/app/services/fast_scan_pipeline.py - AI PR reviewer → LLM client: requests review
backend/app/services/reviewer.py - AI PR reviewer → Security scanning: uses scan
backend/app/services/reviewer.py - Background tasks → AI PR reviewer: runs review
backend/app/tasks/tasks.py - GitHub access → GitHub: reads and updates
- LLM client → LLM providers: calls provider
- Application database → Analysis records: stores
backend/app/models/models.py - Background tasks → Report generation: generates reports
backend/app/tasks/tasks.py - Report generation → Engineer: exports findings
- Web app → Progress updates: receives progress
- Progress updates → Engineer: streams progress
- Test generation → LLM client: generates tests
backend/app/services/fast_scan_pipeline.py - AI PR reviewer → GitHub access: posts PR comments