How varni1512/compileverse works
CompileVerse is a browser IDE for editing and running C++, Java, and Python, with test cases, complexity analysis, and an AI coding tutor. The main workflow runs from the IDE through execution state in useCodeExecution, to the Express API and sandbox, and back to the output panel. A separate tutor workflow uses useAiChat, server-side AI review, and RAG retrieval; voice interaction and admin analytics are additional capabilities. Some subsystems are documented but unsampled, so their internal wiring is shown only where the README or sampled code supports it.
Main entry points: App.jsx IDE Workspace · index.js Express API · langchainRag.js RAG Agent · useCodeExecution.js Execution State
Components 23
IDE Client
- IDE Workspace
frontend/src/App.jsx - Code Editor
frontend/src/components/editor/CodeEditor.jsx - Editor Toolbar
frontend/src/components/editor/EditorToolbar.jsx - Input Panel
frontend/src/components/panels/InputPanel.jsx - Output Panel
frontend/src/components/panels/OutputPanel.jsx - Test Import
frontend/src/components/modals/BulkAddModal.jsx - Execution State
frontend/src/hooks/useCodeExecution.js - Chat State
frontend/src/hooks/useAiChat.js - Voice Assistant
frontend/src/hooks/useVoiceAi.js - Tutor Chat
frontend/src/components/chat/AiTutorChat.jsx - Analytics Dashboard
frontend/src/components/dashboard/AnalyticsDashboard.jsx
API and Controls
- Express API
backend/index.js - AI Rate Limits
backend/aiLimiter.js
Code Execution
- Sandbox Runner
backend/executeCode.js - Language Runtimes
AI Tutor
- AI Review
backend/aiCodeReview.js - RAG Agent
backend/langchainRag.js - Curated Knowledge
backend/ragKnowledgeBase.js
Usage Analytics
- Usage Analytics
backend/analytics.js
Other components
- Developer
- Groq LLM
- MongoDB
- Browser Speech APIs
Connections 32
- Developer → IDE Workspace: uses IDE
- IDE Workspace → Code Editor: renders
- IDE Workspace → Editor Toolbar: renders
- IDE Workspace → Input Panel: renders
- IDE Workspace → Output Panel: renders
- IDE Workspace → Test Import: opens import
- IDE Workspace → Execution State: invokes
- IDE Workspace → Chat State: invokes
- IDE Workspace → Analytics Dashboard: shows dashboard
- Code Editor → IDE Workspace: edits code
- Editor Toolbar → IDE Workspace: sets language
- Input Panel → IDE Workspace: sets input
- Test Import → IDE Workspace: imports cases
- Execution State → Express API: POST run, tests, analyze
- Express API → Sandbox Runner: executes code
- Sandbox Runner → Language Runtimes: runs in sandbox
- Express API → AI Review: requests analysis
- Express API → AI Rate Limits: checks AI quota
- Chat State → Express API: POST review, fetch limits
- AI Review → RAG Agent: uses RAG chat
- AI Review → Groq LLM: requests completion
- RAG Agent → Curated Knowledge: indexes documents
- RAG Agent → Groq LLM: invokes model
- RAG Agent → Sandbox Runner: agent executes code
- Tutor Chat → Voice Assistant: uses voice controls
- Voice Assistant → Browser Speech APIs: recognizes and speaks
- Analytics Dashboard → Express API: requests statistics
- Express API → Usage Analytics: records usage
- Usage Analytics → MongoDB: stores metrics
- AI Rate Limits → MongoDB: stores quota state
- Execution State → Output Panel: provides results
- Chat State → Output Panel: provides tutor state