# CodeLayers > Zero-knowledge code visualization platform. View any codebase as an interactive > 3D dependency graph on Apple Vision Pro, iPad, iPhone, and the web. Client-side > encryption ensures your code never reaches our servers in plaintext. Built-in AI > agent integration lets you chat with Claude, Gemini, or Codex while navigating > your architecture spatially. CodeLayers consists of three components: 1. **CLI** (Rust) — Parses codebases with tree-sitter (10 languages), builds dependency graphs with PageRank and centrality metrics, encrypts everything client-side with AES-256-GCM, and syncs to the backend. Includes a built-in MCP server for AI agents to control the 3D visualization. 2. **Backend** (Rust/Axum) — Stores only encrypted blobs. Handles authentication (Apple Sign In + BIP39 mnemonic), WebSocket real-time sync, and AI session persistence. True zero-knowledge — the server cannot decrypt your code. 3. **Viewers** — Apple Vision Pro (spatial 3D with RealityKit), iPad/iPhone (SwiftUI), and web (Three.js/React Three Fiber). All decryption happens on-device. ## Product Pages - [Web Viewer](https://app.codelayers.ai): Browser-based 3D code visualization with zero-knowledge encryption - [Explore Open Source](https://codelayers.ai/explore): Interactive 3D dependency graphs for popular open-source projects — React, Kubernetes, Django, and more - [App Store](https://apps.apple.com/app/codelayers/id6756067177): CodeLayers for Apple Vision Pro, iPad, and iPhone - [Landing Page](https://codelayers.ai): Product overview, features, and pricing ## Key Features - **3D Dependency Graphs**: Files rendered as nodes in 3D space with edges showing imports, function calls, and type references. Solar system, city, tree, and neural visualization modes. - **Zero-Knowledge Encryption**: AES-256-GCM encryption with keys derived from a 12-word BIP39 mnemonic via PBKDF2 (100k iterations). The encryption key never leaves your device. - **10-Language Parsing**: Rust, TypeScript/JavaScript, Python, Java, Go, C++, C#, Ruby, PHP, Swift — all via tree-sitter with AST-level accuracy. - **AI Agent Integration**: Run Claude Code, Gemini CLI, or Codex alongside the visualization. The AI can highlight files, focus nodes, show dependencies, and switch visualization modes via MCP tools. - **Blast Radius Analysis**: See the downstream impact of changing any file or function before you edit it. - **PR Visualization**: View pull request diffs as 3D architectural maps to understand structural impact. - **Real-Time Sync**: File changes detected on your machine appear in the 3D viewer within milliseconds via WebSocket. ## CLI Quick Start ```bash # Install brew install codelayers # Authenticate with a 12-word mnemonic codelayers login # Sync a repository (one-time) codelayers sync /path/to/repo # Watch mode with live updates + AI agent codelayers watch /path/to/repo --agent claude # Pair with Vision Pro (one-time, 6-digit code) codelayers pair ``` ## MCP Server for AI Agents CodeLayers ships an MCP server (built into `--agent claude` mode) that gives AI coding agents spatial awareness of the codebase: - `highlight_files` — Highlight files in the 3D graph by path, with color and label - `focus_file` — Zoom the camera to a specific file - `show_dependencies` — Visualize import relationships as 3D connection lines - `get_blast_radius` — Analyze downstream impact of changes to files or functions - `set_visualization_mode` — Switch between solar_system, city, tree, and neural views - `clear_highlights` — Reset visualization state ## Architecture - **Commit-Based Sync**: Immutable graph snapshots per git commit (gzip compressed, then AES-256-GCM encrypted) - **Backend-First Sync**: All data flows through backend WebSocket. P2P is only used for initial device pairing (mDNS + ECDH key exchange). - **Chunked Upload**: Large graphs (5k+ nodes) use a chunked upload protocol for reliability - **Graph Metrics**: Every node has PageRank, betweenness centrality, and topological depth computed at parse time ## Technology | Component | Stack | |-----------|-------| | CLI | Rust, tree-sitter, tokio, SQLite, ring/RustCrypto | | Backend | Rust, Axum, PostgreSQL (sqlx), JWT | | Vision Pro | Swift, SwiftUI, RealityKit, CryptoKit | | Web | Next.js, React Three Fiber, Three.js, Zustand | | Shared | Rust crate with models, API types, P2P message types | ## Supported Languages Rust, TypeScript, JavaScript, Python, Java, Go, C++, C#, Ruby, PHP, Swift ## Optional - [GitHub Repository](https://github.com/nicholasgasior/codelayers): Source code and issue tracker - [llms-full.txt](https://app.codelayers.ai/llms-full.txt): Extended documentation for RAG and indexing pipelines