Skip to content

AI-powered platform that transforms GitHub repositories into interactive documentation you can see and hear. Get automated analysis, tech stack visualizations, and AI-generated podcasts explaining any codebase. Perfect for onboarding and code exploration.

License

Notifications You must be signed in to change notification settings

Hacktown-BSB/Nexo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

67 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Nexo: Turn Code into Stories You Can See and Hear

Transform cold, static code into a living, breathing story you can see and hear.

Nexo Logo

Made with React Powered by Gemini Voice by ElevenLabs

Demo โ€ข Features โ€ข Tech Stack โ€ข Installation โ€ข Usage


๐Ÿ“– Table of Contents


๐Ÿ’ก Inspiration

Every developer has faced the "Wall of Code" nightmare: joining a massive legacy project with zero documentation and thousands of interconnected functions. Hours turn into days as you trace function calls, decipher cryptic variable names, and try to understand the mental model of developers who left years ago.

We realized that while we have powerful tools to write code, we lack intuitive tools to experience it.

Traditional documentation is:

  • ๐Ÿ“ Often outdated or non-existent
  • ๐Ÿฅฑ Boring to read and hard to maintain
  • ๐Ÿงฉ Disconnected from the actual code structure
  • ๐Ÿšซ Inaccessible for visual or auditory learners

We built Nexo to turn cold, static text into a living, breathing story that you can both see and hearโ€”a revolutionary approach to code onboarding that reduces weeks of confusion into minutes of clarity.


โ“ What it Does

Nexo is an AI-powered code documentation and visualization platform that transforms any codebase into an interactive, multi-modal learning experience.

The Nexo Experience:

  1. ๐Ÿ”— Paste a Repository URL
    Simply provide a GitHub/GitLab link to any project.

  2. ๐Ÿง  AI Analysis
    Our Gemini-powered engine analyzes the code structure, dependencies, and logic flow.

  3. ๐Ÿ“Š Visual Flow Generation
    See your codebase as an interactive dependency graph with modules, functions, and their relationships.

  4. ๐ŸŽ™๏ธ Audio Narration
    Listen to AI-generated "Code Podcasts" that explain each file's purpose, logic, and integration pointsโ€”perfect for commuting, exercising, or simply giving your eyes a rest.

  5. ๐Ÿ—„๏ธ Instant Access
    Once analyzed, the documentation is cached and available instantly for your entire team.


โœจ Features

๐ŸŽฏ Core Features

  • ๐Ÿ” Smart Analysis
    Deep code understanding powered by Gemini API, extracting functions, classes, and their relationships.

  • ๐ŸŽง Code Podcasts
    AI-narrated explanations of code logic in natural, human languageโ€”learn on the go.

  • ๐Ÿ“ฑ Responsive Design
    Works seamlessly on desktop, tablet, and mobile devices.

๐ŸŽจ Developer Experience

  • ๐Ÿš€ Zero Configuration
    No SDKs to install, no config files to writeโ€”just paste and analyze.

  • ๐Ÿ” Secure & Private
    Your code is processed securely and never stored permanently without permission.

  • ๐Ÿ‘ฅ Team Collaboration
    Share generated documentation links with your entire team instantly.

  • ๐Ÿ“ˆ Usage Analytics
    Track which parts of your codebase need better documentation based on view counts.


๐Ÿ› ๏ธ How We Built It

Nexo is a sophisticated orchestration of cutting-edge AI, cloud infrastructure, and modern web technologies:

๐Ÿง  Intelligence Layer

The Gemini API acts as our senior architect, performing deep static analysis to:

  • Extract function signatures, classes, and imports
  • Map dependencies and call graphs
  • Generate human-readable summaries of code logic
  • Structure data into JSON-friendly formats for visualization

๐ŸŽ™๏ธ Audio Synthesis Layer

ElevenLabs transforms technical analysis into natural narration:

  • Converts code summaries into conversational scripts
  • Generates high-quality, human-like voice audio
  • Creates segmented "chapters" for different modules
  • Optimizes audio compression for web delivery

๐Ÿ—„๏ธ Data Layer

  • MongoDB Atlas: Stores graph metadata, audio links, and analysis results
  • Caching Strategy: Once analyzed, subsequent loads are near-instantaneous
  • Scalable Schema: Optimized for quick lookups and graph traversal queries

๐ŸŽจ Frontend Layer

  • React 18 + TypeScript: Type-safe, component-based architecture
  • Vite: Lightning-fast development and optimized production builds
  • D3.js/Cytoscape: Interactive graph visualizations with physics simulations
  • CSS Modules: Scoped styling for maintainable design

๐Ÿ—๏ธ Tech Stack

Frontend

React TypeScript Vite

  • React 18 with Hooks and Context API
  • TypeScript for type safety
  • Vite for blazing-fast builds
  • CSS Modules for scoped styling

Backend

Python FastAPI

  • FastAPI for high-performance REST APIs
  • Pydantic for data validation
  • JWT Authentication for secure user sessions

AI & ML

Gemini ElevenLabs

  • Google Gemini API for code analysis
  • ElevenLabs API for voice synthesis

Infrastructure

Docker MongoDB

  • MongoDB Atlas for database
  • Docker/Podman for containerization

๐ŸŽฏ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         User Browser                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚   React    โ”‚  โ”‚   Graph    โ”‚  โ”‚   Audio Player      โ”‚   โ”‚
โ”‚  โ”‚    App     โ”‚  โ”‚  Renderer  โ”‚  โ”‚  (ElevenLabs)       โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ”‚ HTTPS
                           โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Cloudflare Workers (Edge Layer)                 โ”‚
โ”‚  โ€ข Static Asset Delivery  โ€ข API Proxying  โ€ข Caching         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                                      โ”‚
        โ–ผ                                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  FastAPI Server  โ”‚                  โ”‚  MongoDB Atlas   โ”‚
โ”‚   (Vultr VM)     โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   (Database)     โ”‚
โ”‚                  โ”‚                  โ”‚                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚                  โ”‚  โ€ข Graph Data    โ”‚
โ”‚  โ”‚   Gemini   โ”‚  โ”‚                  โ”‚  โ€ข Audio URLs    โ”‚
โ”‚  โ”‚    API     โ”‚  โ”‚                  โ”‚  โ€ข User Data     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚                  โ”‚  โ€ข Cache Layer   โ”‚
โ”‚                  โ”‚                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ ElevenLabs โ”‚  โ”‚
โ”‚  โ”‚    API     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿšฉ Challenges We Faced

1. ๐Ÿ•ธ๏ธ Graph Complexity

Problem: Large codebases create overwhelming "spaghetti code" visualizations with thousands of interconnected nodes.

Solution:

  • Implemented AI-driven clustering to group related modules
  • Created hierarchical views with drill-down capabilities
  • Added intelligent filtering to show only relevant dependencies
  • Used force-directed layouts with customizable physics

2. ๐Ÿงฉ Context Window Limitations

Problem: Codebases often exceed the token limits of AI models (even Gemini's extended context).

Solution:

  • Developed smart chunking logic that preserves semantic relationships
  • Prioritized entry points and high-traffic functions
  • Implemented incremental analysis for large repositories
  • Created a summary-first approach: analyze file structure before diving into details

3. โšก Real-time Audio Synthesis

Problem: ElevenLabs produces high-quality audio but has processing latency that could ruin UX.

Solution:

  • Implemented asynchronous job queues with progress indicators
  • Pre-generated audio for popular repositories
  • Offered text-to-speech fallback for instant (lower quality) narration
  • Cached all generated audio in MongoDB and CDN

๐Ÿง  What We Learned

Building Nexo taught us the transformative power of Multi-Modal Onboarding.

The Science Behind It

We discovered that combining visual metrics with auditory explanations significantly reduces cognitive load compared to reading raw text. The formula we observed:

$$ L_c \approx \frac{T_x}{\text{Visual Flow} \cdot \text{Audio Context}} $$

Where:

  • $L_c$ = Cognitive Load (mental effort required)
  • $T_x$ = Complexity of raw text documentation

Key Insights:

  1. ๐ŸŽจ Visual Learning: 65% of people are visual learnersโ€”graphs leverage spatial memory
  2. ๐ŸŽง Auditory Reinforcement: Hearing explanations while seeing structure creates dual encoding
  3. โšก Reduced Context Switching: No need to jump between filesโ€”see the big picture first
  4. ๐Ÿง  Pattern Recognition: Visual patterns reveal architectural insights text can't convey

Technical Lessons

  • Prompt Engineering is an Art:
    We iterated dozens of times to ensure Gemini outputs strictly valid JSON for real-time rendering.

  • AI Hallucination Mitigation:
    Validate all AI outputs against the actual code structureโ€”never trust blindly.

  • Caching is King:
    A well-designed cache strategy makes a 30-second analysis feel instant on repeat visits.

  • UX > Features:
    We cut 40% of planned features to polish the core experienceโ€”less is more.


๐Ÿš€ Installation

Prerequisites

  • Node.js 18+ and npm/yarn
  • Python 3.11+
  • Docker or Podman
  • MongoDB instance (or MongoDB Atlas account)
  • API Keys:
    • Google Gemini API
    • ElevenLabs API

Clone the Repository

git clone https://github.com/Hacktown-BSB/Nexo.git
cd Nexo

Backend Setup

cd server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Create .env file
cat > .env << EOF
MONGODB_URI=your_mongodb_connection_string
GEMINI_API_KEY=your_gemini_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
JWT_SECRET=your_secret_key
EOF

# Run the server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

cd client

# Install dependencies
npm install

# Create .env file
cat > .env << EOF
VITE_API_URL=http://localhost:8000
EOF

# Run development server
npm run dev

Docker Compose (Recommended)

# From project root
docker-compose up --build

# Or with Podman
podman-compose up --build

The application will be available at:

  • Frontend: http://localhost:5173
  • Backend API: http://localhost:8000
  • API Docs: http://localhost:8000/docs

๐Ÿ”ฎ What's Next

Roadmap

  • ๐Ÿ”Œ IDE Integrations
    VS Code, JetBrains, and Vim plugins for in-editor visualizations

  • ๐Ÿ“ Auto-Generated Docs
    Export to Markdown, HTML, or PDF with embedded graphs

  • ๐Ÿ‘ฅ Collaboration Features
    Annotate graphs, leave comments, track team onboarding progress


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Google Gemini for powerful code analysis capabilities
  • ElevenLabs for natural-sounding voice synthesis
  • MongoDB Atlas for scalable database solutions
  • The open-source community for inspiration and tools

Star โญ this repo if you find it useful!

Made with ๐Ÿง  and ๐ŸŽ™๏ธ by developers, for developers.

Demo โ€ข Features โ€ข Tech Stack โ€ข Installation


๐Ÿ“– Table of Contents


๐Ÿ’ก Inspiration

Every developer has faced the "Wall of Code" nightmare: joining a massive legacy project with zero documentation and thousands of interconnected functions. Hours turn into days as you trace function calls, decipher cryptic variable names, and try to understand the mental model of developers who left years ago.

We realized that while we have powerful tools to write code, we lack intuitive tools to experience it.

Traditional documentation is:

  • ๐Ÿ“ Often outdated or non-existent
  • ๐Ÿฅฑ Boring to read and hard to maintain
  • ๐Ÿงฉ Disconnected from the actual code structure
  • ๐Ÿšซ Inaccessible for visual or auditory learners

We built Nexo to turn cold, static text into a living, breathing story that you can both see and hearโ€”a revolutionary approach to code onboarding that reduces weeks of confusion into minutes of clarity.


โ“ What it Does

Nexo is an AI-powered code documentation and visualization platform that transforms any codebase into an interactive, multi-modal learning experience.

The Nexo Experience:

  1. ๐Ÿ”— Paste a Repository URL
    Simply provide a GitHub/GitLab link to any project.

  2. ๐Ÿง  AI Analysis
    Our Gemini-powered engine analyzes the code structure, dependencies, and logic flow.

  3. ๐Ÿ“Š Visual Flow Generation
    See your codebase as an interactive dependency graph with modules, functions, and their relationships.

  4. ๐ŸŽ™๏ธ Audio Narration
    Listen to AI-generated "Code Podcasts" that explain each file's purpose, logic, and integration pointsโ€”perfect for commuting, exercising, or simply giving your eyes a rest.

  5. ๐Ÿ—„๏ธ Instant Access
    Once analyzed, the documentation is cached and available instantly for your entire team.


โœจ Features

๐ŸŽฏ Core Features

  • ๐Ÿ” Smart Analysis
    Deep code understanding powered by Gemini API, extracting functions, classes, and their relationships.

  • ๐ŸŽง Code Podcasts
    AI-narrated explanations of code logic in natural, human languageโ€”learn on the go.

  • ๐Ÿ“ฑ Responsive Design
    Works seamlessly on desktop, tablet, and mobile devices.

๐ŸŽจ Developer Experience

  • ๐Ÿš€ Zero Configuration
    No SDKs to install, no config files to writeโ€”just paste and analyze.

  • ๐Ÿ” Secure & Private
    Your code is processed securely and never stored permanently without permission.

  • ๐Ÿ‘ฅ Team Collaboration
    Share generated documentation links with your entire team instantly.

  • ๐Ÿ“ˆ Usage Analytics
    Track which parts of your codebase need better documentation based on view counts.


๐Ÿ› ๏ธ How We Built It

Nexo is a sophisticated orchestration of cutting-edge AI, cloud infrastructure, and modern web technologies:

๐Ÿง  Intelligence Layer

The Gemini API acts as our senior architect, performing deep static analysis to:

  • Extract function signatures, classes, and imports
  • Map dependencies and call graphs
  • Generate human-readable summaries of code logic
  • Structure data into JSON-friendly formats for visualization

๐ŸŽ™๏ธ Audio Synthesis Layer

ElevenLabs transforms technical analysis into natural narration:

  • Converts code summaries into conversational scripts
  • Generates high-quality, human-like voice audio
  • Creates segmented "chapters" for different modules
  • Optimizes audio compression for web delivery

๐Ÿ—„๏ธ Data Layer

  • MongoDB Atlas: Stores graph metadata, audio links, and analysis results
  • Caching Strategy: Once analyzed, subsequent loads are near-instantaneous
  • Scalable Schema: Optimized for quick lookups and graph traversal queries

๐ŸŽจ Frontend Layer

  • React 18 + TypeScript: Type-safe, component-based architecture
  • Vite: Lightning-fast development and optimized production builds
  • D3.js/Cytoscape: Interactive graph visualizations with physics simulations
  • CSS Modules: Scoped styling for maintainable design

๐Ÿ—๏ธ Tech Stack

Frontend

React TypeScript Vite

  • React 18 with Hooks and Context API
  • TypeScript for type safety
  • Vite for blazing-fast builds
  • CSS Modules for scoped styling

Backend

Python FastAPI

  • FastAPI for high-performance REST APIs
  • Pydantic for data validation
  • JWT Authentication for secure user sessions

AI & ML

Gemini ElevenLabs

  • Google Gemini API for code analysis
  • ElevenLabs API for voice synthesis

Infrastructure

Docker MongoDB

  • MongoDB Atlas for database
  • Docker/Podman for containerization

๐ŸŽฏ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         User Browser                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚   React    โ”‚  โ”‚   Graph    โ”‚  โ”‚   Audio Player      โ”‚   โ”‚
โ”‚  โ”‚    App     โ”‚  โ”‚  Renderer  โ”‚  โ”‚  (ElevenLabs)       โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ”‚ HTTPS
                           โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Cloudflare Workers (Edge Layer)                 โ”‚
โ”‚  โ€ข Static Asset Delivery  โ€ข API Proxying  โ€ข Caching         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚
                           โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                                      โ”‚
        โ–ผ                                      โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  FastAPI Server  โ”‚                  โ”‚  MongoDB Atlas   โ”‚
โ”‚   (Vultr VM)     โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   (Database)     โ”‚
โ”‚                  โ”‚                  โ”‚                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚                  โ”‚  โ€ข Graph Data    โ”‚
โ”‚  โ”‚   Gemini   โ”‚  โ”‚                  โ”‚  โ€ข Audio URLs    โ”‚
โ”‚  โ”‚    API     โ”‚  โ”‚                  โ”‚  โ€ข User Data     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚                  โ”‚  โ€ข Cache Layer   โ”‚
โ”‚                  โ”‚                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ ElevenLabs โ”‚  โ”‚
โ”‚  โ”‚    API     โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿšฉ Challenges We Faced

1. ๐Ÿ•ธ๏ธ Graph Complexity

Problem: Large codebases create overwhelming "spaghetti code" visualizations with thousands of interconnected nodes.

Solution:

  • Implemented AI-driven clustering to group related modules
  • Created hierarchical views with drill-down capabilities
  • Added intelligent filtering to show only relevant dependencies
  • Used force-directed layouts with customizable physics

2. ๐Ÿงฉ Context Window Limitations

Problem: Codebases often exceed the token limits of AI models (even Gemini's extended context).

Solution:

  • Developed smart chunking logic that preserves semantic relationships
  • Prioritized entry points and high-traffic functions
  • Implemented incremental analysis for large repositories
  • Created a summary-first approach: analyze file structure before diving into details

3. โšก Real-time Audio Synthesis

Problem: ElevenLabs produces high-quality audio but has processing latency that could ruin UX.

Solution:

  • Implemented asynchronous job queues with progress indicators
  • Pre-generated audio for popular repositories
  • Offered text-to-speech fallback for instant (lower quality) narration
  • Cached all generated audio in MongoDB and CDN

๐Ÿง  What We Learned

Building Nexo taught us the transformative power of Multi-Modal Onboarding.

The Science Behind It

We discovered that combining visual metrics with auditory explanations significantly reduces cognitive load compared to reading raw text. The formula we observed:

$$ L_c \approx \frac{T_x}{\text{Visual Flow} \cdot \text{Audio Context}} $$

Where:

  • $L_c$ = Cognitive Load (mental effort required)
  • $T_x$ = Complexity of raw text documentation

Key Insights:

  1. ๐ŸŽจ Visual Learning: 65% of people are visual learnersโ€”graphs leverage spatial memory
  2. ๐ŸŽง Auditory Reinforcement: Hearing explanations while seeing structure creates dual encoding
  3. โšก Reduced Context Switching: No need to jump between filesโ€”see the big picture first
  4. ๐Ÿง  Pattern Recognition: Visual patterns reveal architectural insights text can't convey

Technical Lessons

  • Prompt Engineering is an Art:
    We iterated dozens of times to ensure Gemini outputs strictly valid JSON for real-time rendering.

  • AI Hallucination Mitigation:
    Validate all AI outputs against the actual code structureโ€”never trust blindly.

  • Caching is King:
    A well-designed cache strategy makes a 30-second analysis feel instant on repeat visits.

  • UX > Features:
    We cut 40% of planned features to polish the core experienceโ€”less is more.


๐Ÿš€ Installation

Prerequisites

  • Node.js 18+ and npm/yarn
  • Python 3.11+
  • Docker or Podman
  • MongoDB instance (or MongoDB Atlas account)
  • API Keys:
    • Google Gemini API
    • ElevenLabs API

Clone the Repository

git clone https://github.com/Hacktown-BSB/Nexo.git
cd Nexo

Backend Setup

cd server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Create .env file
cat > .env << EOF
MONGODB_URI=your_mongodb_connection_string
GEMINI_API_KEY=your_gemini_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
JWT_SECRET=your_secret_key
EOF

# Run the server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Frontend Setup

cd client

# Install dependencies
npm install

# Create .env file
cat > .env << EOF
VITE_API_URL=http://localhost:8000
EOF

# Run development server
npm run dev

Docker Compose (Recommended)

# From project root
docker-compose up --build

# Or with Podman
podman-compose up --build

The application will be available at:

  • Frontend: http://localhost:5173
  • Backend API: http://localhost:8000
  • API Docs: http://localhost:8000/docs

๐Ÿ”ฎ What's Next

Roadmap

  • ๐Ÿ”Œ IDE Integrations
    VS Code, JetBrains, and Vim plugins for in-editor visualizations

  • ๐Ÿ“ Auto-Generated Docs
    Export to Markdown, HTML, or PDF with embedded graphs

  • ๐Ÿ‘ฅ Collaboration Features
    Annotate graphs, leave comments, track team onboarding progress


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Google Gemini for powerful code analysis capabilities
  • ElevenLabs for natural-sounding voice synthesis
  • MongoDB Atlas for scalable database solutions
  • The open-source community for inspiration and tools

Star โญ this repo if you find it useful!

Made with ๐Ÿง  and ๐ŸŽ™๏ธ by developers, for developers.

About

AI-powered platform that transforms GitHub repositories into interactive documentation you can see and hear. Get automated analysis, tech stack visualizations, and AI-generated podcasts explaining any codebase. Perfect for onboarding and code exploration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •