INSPECTOR is a production-grade AI Code Review Agent. Paste any code snippet, run one intelligent scan, and get structured extraction for security vulnerabilities, performance bottlenecks, code quality issues, best practice violations, and improvement suggestions β all rendered in a premium "Dark Hacker" dashboard with real-time progress and actionable fixes.
- Overview
- Application Preview
- Features
- Architecture
- Tech Stack
- Project Structure
- Installation
- Usage
- API Reference
- Configuration
- Testing & CI
- Security Notes
- Design Decisions
- License
INSPECTOR focuses on a critical engineering workflow: high-fidelity code reviews. The backend leverages NVIDIA NIM (Llama-3.1-405B) to run five simultaneous analysis passes, identifying risks and suggesting modern refactors with surgical precision.
Users can:
- Paste code into a professional Monaco Editor and watch live scan stages
- Extract structured findings (
security,performance,quality,best_practices,suggestions) - Review a dynamic Quality Score Gauge and grading system (A-F)
- Copy exact code fixes directly for downstream implementation
- Experience a "Dark Hacker" aesthetic with Matrix rain and scan beam animations
| Feature | Description |
|---|---|
| π Multi-Dimensional Audit | Simultaneous scans for Security, Performance, Quality, and Best Practices |
| π NVIDIA NIM Powered | Leverages Llama-3.1-405B for senior-engineer level reasoning and fixes |
| π΄ Live Progress Stream | WebSocket-driven progress events showing exactly what the AI is analyzing |
| π οΈ Monaco Editor Integration | Full VSCode-grade editing experience with syntax highlighting and line numbers |
| π Dynamic Score Gauge | Real-time quality scoring and grading based on cumulative issue severity |
| π‘ Actionable Code Fixes | Every issue includes a detailed explanation and a ready-to-copy fixed code snippet |
| π¨ Premium Hacker UI | High-end dark theme with Matrix rain and animated scan beam overlays |
| β±οΈ Parallel Execution | All review dimensions are scanned in parallel via asyncio.gather for max speed |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β React Inspector UI β
β β
β Monaco Editor βββΊ Scan Controls βββΊ Issue Dashboard (Cards) β
β β β β β
β βββββββ POST /review + WS /ws βββββββ β
β β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend β
β β
β Middleware: CORS + Request-ID Logging + Scoped WS Management β
β β
β /review ββΊ review_agent.py ββΊ asyncio.gather() β
β ββΊ security_scan β
β ββΊ performance_scan β
β ββΊ quality_scan β
β ββΊ nvidia_service.py β
β β
β /ws ββΊ client-scoped progress events (UUID routed) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Backend | FastAPI, Pydantic, Uvicorn, Python 3.11+ |
| AI Provider | NVIDIA NIM (Llama-3.1-405B) |
| Editor Engine | Monaco Editor (@monaco-editor/react) |
| Frontend | React 18, Vite, Framer Motion, Axios |
| Transport | REST + WebSocket |
| Styling | Vanilla CSS (JetBrains Mono) |
inspector-agent/
β
βββ backend/
β βββ main.py # FastAPI routes + scoped WS + middleware
β βββ review_agent.py # Parallelized AI scan orchestration
β βββ nvidia_service.py # NVIDIA NIM (OpenAI-compatible) integration
β βββ code_analyzer.py # Language detection + metrics logic
β βββ requirements.txt
β βββ .env.example
β
βββ frontend/
β βββ src/
β β βββ components/ # Monaco Editor, Gauge, Cards, Matrix Rain
β β βββ pages/
β β β βββ ReviewPage.jsx # Main Split Dashboard Layout
β β βββ hooks/
β β β βββ useReview.js # UUID-scoped WS + API state management
β β βββ styles/
β β β βββ globals.css # Premium Hacker styling tokens
β β βββ App.jsx
β βββ package.json
β βββ vite.config.js
β
βββ .github/workflows/deploy.yml # GitHub Pages deployment automation
βββ LICENSE
βββ README.md
git clone https://github.com/crastatelvin/inspector-agent.git
cd inspector-agentcd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env
# Configure NVIDIA_API_KEY in .env
python main.pycd frontend
npm install
npm run dev- Open the dashboard and paste your target code into the Monaco Editor
- Watch the scan progress in real time via the status console
- Review extracted findings across tabs:
SUMMARYCRITICAL/HIGH/MEDIUMSECURITY/PERF/QUALITY
- Expand any issue card to view the PROPOSED FIX
- Click the copy icon to apply the fix to your source code
Quick health check:
curl -X GET http://localhost:8000/| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Service health and version info |
POST |
/review/{client_id} |
Initiate parallelized code audit |
WS |
/ws/{client_id} |
Client-scoped progress event stream |
backend/.env:
NVIDIA_API_KEY=nvapi-...frontend/src/hooks/useReview.js:
const BASE_URL = 'http://localhost:8000';
const WS_BASE_URL = 'ws://localhost:8000/ws';Backend:
cd backend
# Run functional tests for the parser and AI logic
python -m pytestFrontend:
cd frontend
# Verify build integrity
npm run build- Scoped WebSockets: Progress updates are isolated per UUID
client_idto prevent cross-session log leaking. - Environment Isolation: API keys are restricted to the backend and never exposed to the client.
- Input Validation: Backend enforces code size limits and validates language patterns before AI submission.
- Parallelised Scans: Using
asyncio.gatherfor five simultaneous passes ensures deep-surgical detail without the latency of sequential calls. - Monaco Engine: Professional syntax highlighting and line numbers are essential for the "Senior Engineer" UX.
- UUID Routing: Ensures real-time logs are accurately delivered to the initiating user in a multi-user environment.
This project is licensed under the MIT License.
β If INSPECTOR helped you ship cleaner code, star the repo.




