Skip to content

laura-lz/blueprint

Repository files navigation

Blueprint Logo

NexHacks

AI-Powered Codebase Intelligence & Risk Analysis Platform

Instantly understand, visualize, and secure any codebase with the power of Gemini AI

VS Code Extension Gemini AI React Flow TypeScript MIT License


🎯 The Problem

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

πŸ’‘ Our Solution

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

✨ Key Features

πŸ—ΊοΈ Interactive Codebase Visualization

  • 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

πŸ€– Multi-Level AI Summaries

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  πŸ“ 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

πŸ›‘οΈ Intelligent Risk Analysis

Automatically detects and categorizes:

Risk Type Examples
πŸ”’ Security SQL injection, XSS, hardcoded secrets, SSRF
⚑ Performance Memory leaks, N+1 queries, blocking I/O
⚠️ Error Handling 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.

🐻 Token Compression (TTC Integration)

  • 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

πŸ”„ Self-Improving RLHF Loop

  • πŸ‘/πŸ‘Ž feedback on any generated summary
  • Prompts automatically rotate to better-performing versions
  • Persistent feedback state across sessions

πŸ—οΈ Architecture

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

Data Flow

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
Loading

πŸš€ Quick Start

Installation

# 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

Configuration

  1. Open VS Code Settings
  2. Search for "Nexhacks"
  3. Add your API keys:
    • Gemini API Key - Get yours at Google AI Studio
    • TTC API Key (optional) - For token compression

Usage

  1. Open any codebase in VS Code
  2. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  3. Run: Open Visualizer
  4. Explore your codebase visually!

πŸ› οΈ Technology Stack

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

πŸ“ˆ What Makes This Hackathon-Worthy

  1. Real Problem, Real Solution - Addresses the #1 developer productivity pain point
  2. Production-Ready Architecture - Clean separation, extensible design, proper error handling
  3. Cutting-Edge AI Integration - Gemini 3 Flash + TTC compression for optimal performance
  4. Self-Improving System - RLHF-inspired feedback loop for continuous improvement
  5. Beautiful UX - Interactive canvas with real-time updates
  6. Multi-Level Analysis - From architecture overview down to individual functions
  7. Security-First - Built-in risk analysis catches vulnerabilities before production

πŸ‘₯ Team

Built with ❀️ for NexHacks 2026


πŸ“„ License

MIT License - see LICENSE for details

About

nexhacks 2026 project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors