Link to GraphLint
GraphLint is an intelligent code review tool powered by static analysis and Gemini. Bring your own GitHub Personal Access Token (PAT) at runtime.
- Static Analysis: AST parsing, control-flow graphs, call graph analysis, code quality and security checks for JS/TS/Python.
- AI Suggestions (Free): On-the-fly embeddings (Gemini) with simple vector ranking in memory to propose concise, actionable suggestions.
- GitHub Integration:
- Analyze PRs for public or private repos using a runtime PAT.
- Optionally publish review comments back to GitHub.
- Optionally apply suggestions to a branch via the API to commit changes.
- Multiple analyze modes: PR, Repo, Compare, Local file input.
- Modern UI: Icon-only, rounded controls, tooltips, and a pixel-inspired theme with light/dark toggle.
- Serverless & Stateless: Everything runs inside Next.js API routes in-memory.
User → /analyze (form) ──▶ API /api/analyze-pr
1) Fetch PR metadata and files via GitHub PAT
2) Static analysis in-memory (no DB)
3) Chunk code → Embed (Gemini) → Rank in memory
4) Generate concise suggestions (Gemini)
5) Return results to UI
User ▶ Publish Review ──▶ API /api/publish
6) Post review/comments to GitHub via PAT
User ▶ Apply Suggestion ──▶ API /api/apply-suggestion
7) Commit suggested change(s) to the chosen branch via PAT
Limits added for free-tier friendliness:
- Max files per PR: 20, max file size: 200KB, capped chunks/findings/suggestions.
- Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
- Static Analysis:
acorn,acorn-walk,ts-morph - LLM/Embeddings: Google Gemini (free tier compatible)
- GitHub: Octokit via Personal Access Token provided at runtime
- Hosting: Vercel (serverless functions)
Copy .env.example → .env.local and set:
GEMINI_API_KEY=your_gemini_api_key
Note: GitHub PAT is entered in the UI at /analyze; it is not stored.
- Install and run
npm install
npm run dev-
Enter:
- Repo:
owner/repo - PR number
- GitHub PAT (with repo scope for private repos; read-only for public is sufficient for analysis; write for publishing review and applying suggestions)
- Click “Analyze” to see findings & AI suggestions. Optionally “Publish Review” to post to GitHub, or "Apply" to commit a suggestion to a branch.
app/analyze/page.tsx– Analyze UI with mode selector (PR/Repo/Compare/Local), suggestions, and actionsapp/api/analyze-pr/route.ts– Fetch, analyze, embed, suggest – all in memoryapp/api/publish/route.ts– Publish comments/review through PATapp/api/apply-suggestion/route.ts– Apply a single suggestion to a branch via GitHublib/github-pat.ts– Lightweight Octokit client using PATlib/analysis/static-analyzer.ts– Core static analysislib/embeddings.ts– Gemini embeddings + cosine similarity helperscomponents/Icons.tsx– Reusable SVG icon setcomponents/ThemeToggle.tsx– Light/dark mode toggle (icon-only)app/layout.tsx– Global layout (navbar with logo, theme support)app/page.tsx– Landing page (logo hero)
Legacy DB-backed pages like app/dashboard/ are deprecated in this free edition. They will throw if used without a database.
The following legacy endpoints/pages have been removed and now return 410 Gone to guide users to the stateless flow:
app/api/pull-requests/[id]/findings/route.ts→ 410 Goneapp/api/pull-requests/[id]/suggestions/route.ts→ 410 Goneapp/api/pull-requests/[id]/generate-suggestions/route.ts→ 410 Goneapp/api/pull-requests/[id]/publish/route.ts→ 410 Goneapp/api/webhooks/github/route.ts→ 410 Gone (webhooks disabled in stateless mode)app/dashboard/page.tsx→ replaced with a deprecation notice
Use /analyze UI and /api/analyze-pr + /api/publish + /api/apply-suggestion (with GitHub PAT) instead.
- AST/CFG/Call Graph: Structural code understanding for findings and metrics
- Embeddings + Ranking: Simple vector ranking in memory (cosine similarity)
- Guardrails: Strict JSON schema and capped operations for predictable costs
- Branding: GraphLint logo shown in navbar and landing page.
- Theme: Light/Dark modes with a pixel-inspired aesthetic and rounded icon buttons.
- Accessibility: Buttons include
aria-labelandtitlewhere applicable.
MIT License - see LICENSE file for details



