An AI-assisted code review tool that analyzes pasted code and returns structured, line-level feedback — severity, category, explanation, and a concrete fix — the way a senior engineer would comment on a pull request.
Manual code review is slow and inconsistent, especially for solo developers and students without a team to review their PRs. review.ai gives instant, structured feedback on correctness, style, performance, and readability issues, so developers can catch problems before they ever reach a real reviewer.
flowchart LR
A[User pastes code] --> B[Frontend: React UI]
B -->|POST prompt| C[LLM API]
C -->|JSON: score, findings| B
C -.timeout/error.-> D[Heuristic Fallback Engine]
D --> B
B --> E[Rendered findings\nline markers + severity cards]
Flow:
var, ==, unhandled promises) produces a fallback review so the UI always responds| Layer | Technology |
|---|---|
| Frontend | React (hooks-based, single component) |
| Styling | Tailwind CSS |
| AI | LLM API (Claude/OpenAI-compatible /v1/messages schema) |
| Fallback logic | Rule-based static analysis (regex heuristics) |
review-ai/
├── code-review-assistant.jsx # Main React component (editor + findings UI)
├── README.md # This file
This component is self-contained — drop it into any React app with Tailwind configured:
npm install react
# copy code-review-assistant.jsx into your src/ directory
# import and render <CodeReviewAssistant />
To connect a production LLM backend, replace the reviewWithClaude function’s endpoint with your own API route (recommended: proxy the request through a backend so your API key is never exposed client-side).
Built an AI-powered code review tool that analyzes source code and generates structured, line-level feedback using an LLM, with a rule-based fallback engine ensuring 100% uptime for the review flow.
Designed a JSON-schema-constrained LLM prompting strategy to reliably extract structured findings (severity, category, fix suggestions) from unstructured code review output.
Built as a learning project exploring LLM-assisted developer tooling.