How shakilurrehman21/repolens works
RepoLens is a GitHub repository intelligence SaaS. A signed-in user imports a repository, starts a scan, and views scored findings and file-level reviews; the API starts the pipeline, which fetches repository data, runs AI analyses, aggregates scores, and persists results. Separate branches provide interactive file analysis, pull-request reviews and webhook automation, dashboards, exports, and administration. The README documents these capabilities; where route or UI implementations were not sampled, paths and wiring below reflect only the file tree and documented behavior.
Main entry points: (dashboard) Dashboard views · index.ts Application database · pipeline.ts Scan orchestrator · pr-reviews Manual PR reviews
Components 22
User interface
- Dashboard views
app/(dashboard) - Sign-in and account
Repository and scans
- User profile API
app/api/user/route.ts - Repository import
app/api/github/import-url/route.ts - Repository listing
app/api/repos/route.ts - GitHub repository list
app/api/github/repos/route.ts - Start scan API
app/api/scans/start/route.ts - Scan history and results
app/api/scans
AI analysis
- Interactive file analysis
app/api/analyze/file/route.ts - Scan orchestrator
lib/ai/pipeline.ts - Analysis stages and prompts
lib/ai/prompts.ts - Structured AI client
lib/ai/gemini-client.ts - Weighted scoring
lib/ai/scoring.ts
Pull request reviews
- Manual PR reviews
app/api/pr-reviews - GitHub PR webhook
app/api/webhooks/github/route.ts
Data and reporting
- Reports and sharing
app/api/export - Administration
app/api/admin - Application database
db/index.ts
Other components
- User
- GitHub API
- Clerk identity and OAuth
- Google Gemini
Connections 40
- User → Sign-in and account: signs in
- User → Dashboard views: uses
- Dashboard views → User profile API: loads profile
- User profile API → Clerk identity and OAuth: gets OAuth token
- User profile API → Application database: reads and writes
- Dashboard views → GitHub repository list: browses GitHub repos
- GitHub repository list → Application database: reads token
- GitHub repository list → GitHub API: lists repositories
- Dashboard views → Repository import: imports repository
- Repository import → GitHub API: fetches repository
- Repository import → Application database: stores repository
- Dashboard views → Repository listing: loads saved repositories
- Repository listing → Application database: reads repositories
- Dashboard views → Start scan API: starts scan
- Start scan API → Application database: checks and creates scan
- Start scan API → Scan orchestrator: dispatches analysis
- Scan orchestrator → GitHub API: fetches tree and files
- Scan orchestrator → Analysis stages and prompts: builds stage prompts
- Scan orchestrator → Structured AI client: requests structured analyses
- Structured AI client → Google Gemini: generates JSON
- Scan orchestrator → Weighted scoring: calculates overall score
- Scan orchestrator → Application database: stores progress and results
- Dashboard views → Scan history and results: loads scan results
- Scan history and results → Application database: reads scans and reviews
- Dashboard views → Interactive file analysis: requests file review
- Interactive file analysis → GitHub API: fetches file content
- Interactive file analysis → Structured AI client: requests line analysis
- Dashboard views → Manual PR reviews: requests PR review
- Manual PR reviews → GitHub API: fetches PR diff
- Manual PR reviews → Structured AI client: analyzes diff
- Manual PR reviews → Application database: stores review
- Manual PR reviews → GitHub API: posts optional comment
- GitHub API → GitHub PR webhook: sends PR event
- GitHub PR webhook → Application database: looks up and stores review
- GitHub PR webhook → GitHub API: fetches diff and comments
- GitHub PR webhook → Structured AI client: analyzes diff
- Dashboard views → Reports and sharing: requests report or share link
- Reports and sharing → Application database: reads scan results
- User → Administration: uses admin dashboard
- Administration → Application database: reads and updates records