How code-xr-project/code-xr works
Code-XR is a monorepo for a VS Code extension, its Python analysis backend, and an in-development Electron IDE. In the extension’s principal workflow, a user launches an analysis; the extension prepares files and starts a local server, while the backend analyzes source and produces data for an XR or LivePanel experience. The product also includes dependency and Git-history analysis, collaboration, and remote access. The IDE provides a separate editor workbench and analysis experience. Edges reflect only relationships shown in excerpts or explicitly documented; unsampled subsystems are represented at their existing directory paths, with uncertain links omitted.
Main entry points: main.py Backend Dispatch · launchPipeline.ts Analysis Launchers · main.ts Renderer Entry · remoteAccessManager.ts Remote Access
Components 21
VS Code Extension
- Analysis Launchers
apps/vscode-extension/src/core/analysis/launchers/launchPipeline.ts - Analysis Sessions
apps/vscode-extension/src/core/analysis/session - Server Launch
apps/vscode-extension/src/core/analysis/session-servers/serverLaunchOrchestrator.ts - Live Reanalysis
apps/vscode-extension/src/core/analysis/watchers - Extension Host
apps/vscode-extension/src/core/host/codeXRHost.ts
Analysis Backend
- Backend Dispatch
backend/src/main.py - File Metrics
backend/src/utils/file_analysis_engine.py - Dependency Analysis
backend/src/utils/dependency_analysis_engine.py - XR Analysis
backend/src/XR - LivePanel Analysis
backend/src/livePanels - DOM Analysis
backend/src/html
Standalone IDE
- Analysis UI
apps/ide/src/renderer/analysisRunView.ts - IDE Workbench
apps/ide/src/renderer/workbench.ts - Editor and Outline
apps/ide/src/renderer/editor/editorGroup.ts - Renderer Entry
apps/ide/src/renderer/main.ts - Renderer API
apps/ide/src/shared/api.ts - IDE Analysis Service
apps/ide/src/main/analysis/analysisService.ts
Sharing and History
- Git History
apps/ide/src/main/git/gitService.ts - Collaboration
apps/vscode-extension/src/core/collaboration/collaborationProfileManager.ts - Remote Access
apps/vscode-extension/src/core/remote-access/remoteAccessManager.ts
Other components
- Developer
Connections 19
- Developer → Analysis Launchers: launches analysis
apps/vscode-extension/src/core/analysis/launchers/launchPipeline.ts - Analysis Launchers → Analysis Sessions: uses session
apps/vscode-extension/src/core/analysis/launchers/launchPipeline.ts - Analysis Launchers → Server Launch: starts server
apps/vscode-extension/src/core/analysis/launchers/launchPipeline.ts - Analysis Launchers → Live Reanalysis: starts watcher
apps/vscode-extension/src/core/analysis/launchers/launchPipeline.ts - Backend Dispatch → Dependency Analysis: dispatches to
backend/src/main.py - Backend Dispatch → XR Analysis: dispatches to
backend/src/main.py - Backend Dispatch → LivePanel Analysis: dispatches to
backend/src/main.py - Backend Dispatch → DOM Analysis: dispatches to
backend/src/main.py - Dependency Analysis → File Metrics: uses metrics
backend/src/utils/dependency_analysis_engine.py - Renderer Entry → IDE Workbench: renders
apps/ide/src/renderer/main.ts - Renderer Entry → Analysis UI: initializes
apps/ide/src/renderer/main.ts - Renderer Entry → Renderer API: calls API
apps/ide/src/renderer/main.ts - Editor and Outline → Renderer API: uses types
apps/ide/src/renderer/editor/outlineController.ts - Editor and Outline → Analysis UI: uses analysis results
- IDE Analysis Service → Renderer API: implements API
apps/ide/src/main/analysis/analysisService.ts - Git History → Developer: provides Git history
- Remote Access → Collaboration: uses profiles
apps/vscode-extension/src/core/remote-access/remoteAccessManager.ts - Remote Access → Extension Host: notifies and prompts
apps/vscode-extension/src/core/remote-access/remoteAccessManager.ts - Developer → Remote Access: shares session