How mtecnic/code-atlas works
Code Atlas is an Electron desktop application that analyzes a repository and presents it as an interactive 3D codebase. The principal workflow is opening a folder, scanning and parsing its files, resolving dependencies and Git history, then sending a snapshot to the renderer for city and galaxy exploration. Users can also inspect symbol-level molecules, apply insight and health views, edit files, scrub history, and use AI features. The graph includes documented capabilities whose implementation was not sampled; dashed, uncited links mark relationships not verified in the excerpts.
Main entry points: App.tsx Renderer application · ipc.ts IPC handlers · index.ts Preload API · analyzer.ts Analysis coordinator
Components 33
Repository analysis
- Analysis coordinator
src/main/analyzer/analyzer.ts - Repository scanner
src/main/analyzer/scanner.ts - Tree-sitter worker
src/main/analyzer/parse-worker.ts - Import resolver
src/main/analyzer/import-resolver.ts - Git history
src/main/git/churn.ts - Symbol graph
src/main/analyzer/symbol-graph.ts - Analysis and settings store
src/main/store.ts
Desktop bridge
- Electron host
src/main/index.ts - IPC handlers
src/main/ipc.ts - Preload API
src/preload/index.ts - IPC contract
src/shared/ipc-contract.ts - Shared data model
src/shared/model.ts
3D exploration
- Renderer application
src/renderer/src/App.tsx - Scene manager
src/renderer/src/scene/SceneManager.ts - City and galaxy
src/renderer/src/scene/WorldLayer.ts - Symbol molecule
src/renderer/src/scene/MoleculeLayer.ts - Molecule view state
src/renderer/src/molecule.ts - History playback
src/renderer/src/scene/TimeMachine.ts - Renderer state
src/renderer/src/store.ts - File editor
src/renderer/src/ui/EditorPanel.tsx - File search
src/renderer/src/ui/SearchPalette.tsx
Code insights
- Insight lenses
src/renderer/src/lenses.ts - Architecture health
src/renderer/src/analysis/graph-health.ts - Dependency graph operations
src/renderer/src/graphops.ts
AI assistance
- LLM chat bridge
src/renderer/src/llm.ts - Scene tool registry
src/renderer/src/ai-tools/index.ts - AI agent loop
src/main/llm/agent-loop.ts - LLM chat service
src/main/llm/chat.ts - Endpoint detection
src/main/llm/probe.ts - Semantic summaries
src/main/llm/summaries.ts
Other components
- Developer
- Repository folder
- Configured LLM endpoint
Connections 38
- Developer → Renderer application: opens app
src/renderer/src/App.tsx - Developer → Repository folder: chooses folder
- Renderer application → Preload API: requests analysis
src/renderer/src/App.tsx - Preload API → IPC handlers: invokes channels
- Electron host → IPC handlers: registers handlers
src/main/index.ts - IPC handlers → Analysis coordinator: starts analysis
src/main/ipc.ts - Analysis coordinator → Repository scanner: scans files
src/main/analyzer/analyzer.ts - Analysis coordinator → Tree-sitter worker: dispatches parsing
src/main/analyzer/analyzer.ts - Analysis coordinator → Import resolver: resolves imports
src/main/analyzer/analyzer.ts - Analysis coordinator → Git history: reads history
src/main/analyzer/analyzer.ts - Analysis coordinator → Analysis and settings store: updates analysis state
src/main/analyzer/analyzer.ts - Analysis and settings store → Symbol graph: builds symbol graph
src/main/store.ts - IPC handlers → Analysis and settings store: reads analysis state
src/main/ipc.ts - IPC handlers → Preload API: sends snapshots
- Preload API → Renderer application: delivers snapshot
- Renderer application → Scene manager: creates scene
src/renderer/src/App.tsx - Scene manager → City and galaxy: renders world
src/renderer/src/scene/SceneManager.ts - Scene manager → Symbol molecule: renders symbols
src/renderer/src/scene/SceneManager.ts - Scene manager → History playback: replays history
src/renderer/src/scene/SceneManager.ts - Scene manager → Renderer state: reacts to state
src/renderer/src/scene/SceneManager.ts - Scene manager → Insight lenses: applies lens
src/renderer/src/scene/SceneManager.ts - Molecule view state → Renderer state: updates molecule state
src/renderer/src/molecule.ts - Renderer application → File editor: shows editor
src/renderer/src/App.tsx - Renderer application → File search: shows search
src/renderer/src/App.tsx - Renderer application → Architecture health: shows findings
src/renderer/src/App.tsx - Renderer application → Dependency graph operations: exposes graph actions
src/renderer/src/App.tsx - File editor → Preload API: reads and writes files
src/renderer/src/ui/EditorPanel.tsx - Renderer application → LLM chat bridge: starts chat
src/renderer/src/App.tsx - LLM chat bridge → Scene tool registry: dispatches tool calls
src/renderer/src/llm.ts - LLM chat bridge → Preload API: streams chat requests
src/renderer/src/llm.ts - IPC handlers → LLM chat service: routes chat
src/main/ipc.ts - LLM chat service → AI agent loop: runs agent
src/main/llm/chat.ts - AI agent loop → Preload API: returns tool calls
- IPC handlers → Endpoint detection: probes endpoint
src/main/ipc.ts - IPC handlers → Semantic summaries: builds summaries
src/main/ipc.ts - LLM chat service → Configured LLM endpoint: sends requests
src/main/llm/chat.ts - Endpoint detection → Configured LLM endpoint: detects endpoint
src/main/llm/probe.ts - Semantic summaries → Configured LLM endpoint: generates summaries
src/main/llm/summaries.ts