Getting Started
CodeLens is an AI-powered tool that reads a GitHub issue and produces a step-by-step contribution roadmap — including the exact files to change and a working code diff.
Quick start
- 1Sign up — create a free account with email, GitHub, or Google OAuth.
- 2Paste a GitHub issue URL — any public issue from any repository.
- 3Get your roadmap — AI analyzes the issue and returns a full plan in ~30 seconds.
- 4Follow the steps — each step includes file paths, code changes, and explanations.
- 5Open your PR — use the generated diff as a starting point.
good first issue or help wanted — they tend to have clearer scope and better descriptions, which gives the AI more to work with.How It Works
The analysis runs through a four-step AI pipeline. Each step builds on the previous one so the final output is grounded in real code — not generic boilerplate.
Issue analysis
Gemini Pro reads the full issue body, labels, and linked PRs to understand the problem type (bug, feature, refactor), affected area, and complexity.
File detection
The repo file tree is fetched via Octokit. Keyword mapping ranks files by relevance, filtering out config and focusing on source files (.ts, .py, .java, etc.).
Code context fetching
The top 2–3 files are fetched from GitHub (up to 3 500 chars each). Real function names and class structures are passed to the AI — no hallucinated code.
Solution generation
A complete roadmap is generated: difficulty score, estimated fix time, technical explanation, relevant files, 4-step plan with before/after diffs, and a confidence score.
Features
OAuth Setup
Google OAuth
- 1Go to Google Cloud Console.
- 2Create a project, then navigate to APIs & Services → Credentials.
- 3Click Create Credentials → OAuth 2.0 Client ID.
- 4Set the authorized redirect URI to
http://localhost:5000/api/v1/auth/google/callback. - 5Copy the Client ID and Secret into your
.env.
GOOGLE_CLIENT_ID=your_google_client_id_here GOOGLE_CLIENT_SECRET=your_google_client_secret_here
GitHub OAuth
- 1Go to GitHub Developer Settings.
- 2Click OAuth Apps → New OAuth App.
- 3Set the callback URL to
http://localhost:5000/api/v1/auth/github/callback. - 4Copy the Client ID and Secret into your
.env.
GITHUB_CLIENT_ID=your_github_client_id_here GITHUB_CLIENT_SECRET=your_github_client_secret_here
API Reference
All endpoints require a Bearer JWT token in the Authorization header. Tokens are issued on login and expire after 7 days.
/api/v1/analyzeAnalyze a GitHub issue and generate a contribution roadmap.
curl -X POST http://localhost:5000/api/v1/analyze \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com/owner/repo/issues/123"}'{
"success": true,
"data": {
"analysisId": "uuid",
"issueTitle": "...",
"repoName": "owner/repo",
"difficulty": "Medium",
"estimatedFixTime": "2-4 hours",
"explanation": "Technical root cause...",
"roadmapSteps": [...],
"diffs": [...],
"confidenceScore": 75
}
}/api/v1/analysesList all analyses for the authenticated user.
curl http://localhost:5000/api/v1/analyses \ -H "Authorization: Bearer <your_jwt_token>"
/api/v1/analyses/:idGet a specific analysis by ID.
curl http://localhost:5000/api/v1/analyses/<analysis_id> \ -H "Authorization: Bearer <your_jwt_token>"
Security
.env file. Rotate JWT_SECRET and SESSION_SECRET regularly. All OAuth secrets should be stored as environment variables in production.