DevScope
A privacy-first, local AI developer assistant that indexes local repositories for semantic search and codebase comprehension using Ollama.
Technologies Used
Project Overview
DevScope is a robust, privacy-first developer assistant engineered to run entirely locally, guaranteeing zero data exfiltration of proprietary code. It ingests local repositories, processes files into manageable contextual chunks, and leverages local LLMs via Ollama to generate vector embeddings. Developers can seamlessly search through complex architectures, visualize module dependencies through dynamic graphs, and converse with an AI agent to unravel intricate logic in real-time. By bridging the gap between raw source code and natural language queries, DevScope fundamentally accelerates codebase onboarding and robust refactoring efforts.
Key Features
Privacy-first local code indexing using custom asynchronous chunking and hashing
Semantic codebase search and retrieval powered by local LLM vector embeddings
Interactive, auto-laid-out module dependency graphs utilizing React Flow and Dagre
Integrated developer chat interface for natural language querying of complex architecture
Blazing-fast, embedded vector retrieval layered on top of a local LibSQL/SQLite database
High-Level Architecture
The system is constructed around a Next.js App Router architecture and an integrated Next.js API layer that marshals background processing. During ingestion, a dedicated Node.js service chunks source code down to precise functional boundaries, piping strings to a local Ollama daemon for Llama-based embedding generation. These state vectors and positional metadata are reliably persisted in an embedded SQLite database negotiated via the LibSQL client. The frontend orchestrates interactive visualizations using React Flow, consuming the local SQLite indices to dynamically render relationship maps alongside an embedded Xterm.js console.
Challenges & Learnings
A significant architectural hurdle was efficiently scaling the local indexing process across monolithic repositories without blocking the Node.js event loop or suffocating the local LLM daemon with unmanaged concurrency. This was systematically mitigated by implementing an asynchronous, batched processing pipeline governed by a resilient task queue. Furthermore, visualizing dense file relationships required offloading computationally heavy node positioning to the Dagre layout algorithm, ensuring the React Flow canvas remained highly performant and the UI responsive.