AI-Powered Codebase Intelligence & Risk Analysis Platform
Instantly understand, visualize, and secure any codebase with the power of Gemini AI
Developers spend ~35% of their time just trying to understand existing code. When joining a new project or reviewing unfamiliar code:
- π Documentation is often outdated or missing
- π Understanding component relationships requires jumping between files
β οΈ Security vulnerabilities and code risks go unnoticed- β° Onboarding takes weeks instead of hours
NexHacks is a VS Code extension that provides instant AI-powered understanding of any codebase through:
| Feature | Description |
|---|---|
| Interactive Visualization | ReactFlow-powered canvas showing file relationships and dependencies |
| AI Summaries | Gemini-powered intelligent summaries at file, function, and directory levels |
| Risk Analysis | Automated security and code quality scanning with actionable recommendations |
| Deep Analysis | Block-level code structure analysis with real-time updates |
| RLHF Feedback Loop | Self-improving prompts based on user feedback |
- Node-based graph showing files and their dependencies
- Click to explore - open any file directly from the canvas
- Real-time relationship mapping with edge visualization
- Zoom, pan, and navigate large codebases effortlessly
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Project Overview (Architecture-level summary) β
β βββ π Directory Summaries (Module-level understanding) β
β βββ π File Summaries (Component-level details) β
β βββ π§ Block Summaries (Function-level docs) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Upper-level summaries: Quick understanding from metadata
- Deep analysis: Line-by-line block summaries with structure mapping
- Progressive loading: See the graph instantly, summaries load in background
Automatically detects and categorizes:
| Risk Type | Examples |
|---|---|
| π Security | SQL injection, XSS, hardcoded secrets, SSRF |
| β‘ Performance | Memory leaks, N+1 queries, blocking I/O |
| Unhandled exceptions, missing validations | |
| π Concurrency | Race conditions, deadlocks, shared state |
| π Type Safety | Unsafe casts, potential null errors |
| π§ API Misuse | Deprecated patterns, missing cleanup |
Each function receives a risk level (π’ Low β π‘ Medium β π High β π΄ Critical) with actionable recommendations.
- Bear-1 model from The Token Company reduces prompt sizes by up to 60%
- Significantly reduces API costs while maintaining quality
- Automatic fallback if compression unavailable
- π/π feedback on any generated summary
- Prompts automatically rotate to better-performing versions
- Persistent feedback state across sessions
nexhacks/
βββ src/ # VS Code Extension
β βββ extension.ts # Extension entry (commands, webview)
β βββ core/ # Core Analysis Engine
β βββ gemini.ts # Gemini AI client + TTC compression
β βββ parser.ts # Babel AST parser for JS/TS
β βββ scanner.ts # File system scanner
β βββ analyzer.ts # Dependency graph builder
β βββ risk-agent.ts # Security & quality analyzer
β βββ feedback-manager.ts # RLHF feedback loop
β βββ prompts.ts # Versioned prompt templates
βββ webview-ui/ # React + ReactFlow Canvas
β βββ src/
β βββ App.tsx # Main visualization component
β βββ components/ # UI components (Radix UI)
βββ cli/ # CLI interface (bonus!)
βββ samples/ # Sample projects for testing
graph LR
A[VS Code] -->|Scan| B[Scanner]
B -->|AST| C[Parser]
C -->|Metadata| D[Analyzer]
D -->|Capsules| E[Gemini AI]
E -->|Summaries| F[Webview]
F -->|Feedback| G[RLHF Manager]
G -->|Better Prompts| E
# Clone the repository
git clone https://github.com/your-team/nexhacks.git
cd nexhacks
# Install dependencies
pnpm install
# Build the webview UI
pnpm run build:webview
# Compile the extension
pnpm run compile- Open VS Code Settings
- Search for "Nexhacks"
- Add your API keys:
- Gemini API Key - Get yours at Google AI Studio
- TTC API Key (optional) - For token compression
- Open any codebase in VS Code
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run:
Open Visualizer - Explore your codebase visually!
| Layer | Technologies |
|---|---|
| Extension | VS Code Extension API, TypeScript |
| AI | Google Gemini 3 Flash, TTC Bear-1 |
| Parser | Babel (AST parsing for JS/TS/JSX/TSX) |
| Visualization | React, ReactFlow, D3-force |
| UI Components | Radix UI, Tailwind CSS |
| Build | Vite, pnpm workspaces |
- Real Problem, Real Solution - Addresses the #1 developer productivity pain point
- Production-Ready Architecture - Clean separation, extensible design, proper error handling
- Cutting-Edge AI Integration - Gemini 3 Flash + TTC compression for optimal performance
- Self-Improving System - RLHF-inspired feedback loop for continuous improvement
- Beautiful UX - Interactive canvas with real-time updates
- Multi-Level Analysis - From architecture overview down to individual functions
- Security-First - Built-in risk analysis catches vulnerabilities before production
Built with β€οΈ for NexHacks 2026
MIT License - see LICENSE for details
