# voxcodeai3/voxcodeai architecture

> Architecture diagram of the GitHub repository voxcodeai3/voxcodeai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/voxcodeai3/voxcodeai
- Repository: https://github.com/voxcodeai3/voxcodeai

## Overview

VoxCode is an AI-assisted learning and coding platform. Learners use its web app to choose a learning path, assess their skills, study with AI teaching and quizzes, practice in a code workspace, and track progress; the backend exposes these capabilities through authenticated APIs backed by MongoDB. The tree also shows interview practice, voice interaction, and project/version management. The README is empty, so feature coverage comes from the tree and source index; several route and frontend integrations are not sampled, and their internal links are omitted where unverified.

Main entry points: [`backend/controllers/aiController.js`](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/aiController.js) (AI tutor handling), [`backend/services/teachingService.js`](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/teachingService.js) (Teaching service), [`frontend/src/App.jsx`](https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/App.jsx) (App and routes), [`backend/services/ai/contextBuilder.js`](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/ai/contextBuilder.js) (Context builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Learner web app"]
  node_app["App and routes<br/>[App.jsx]"]
  node_learnui["Learning experience<br/>[LearnPage.jsx]"]
  node_voice["Voice interaction<br/>[VoiceContext.jsx]"]
  node_api["API client<br/>[api.js]"]
end

subgraph group_learning["Learning journeys"]
  node_learningroutes["Learning endpoints<br/>[learningRoutes.js]"]
  node_assessmentroutes["Assessment endpoints"]
  node_assessment["Assessment handling"]
  node_curriculum[("Curriculum structure<br/>[LearningPath.js]")]
  node_stages[("Stages and topics<br/>[Stage.js]")]
end

subgraph group_ai["AI and coaching"]
  node_memory[("Learner memory<br/>[LearningMemory.js]")]
  node_aiendpoint["AI tutor handling<br/>[aiController.js]"]
  node_context["Context builder<br/>[contextBuilder.js]"]
  node_aiservice["AI generation<br/>[aiService.js]"]
  node_models["Model failover<br/>[modelManager.js]"]
  node_teaching["Teaching service<br/>[teachingService.js]"]
  node_conversation[("Conversation data<br/>[Conversation.js]")]
end

subgraph group_practice["Practice and projects"]
  node_interview["Interview practice"]
  node_project["Project workspace"]
  node_projectstore[("Project data<br/>[Project.js]")]
  node_pathcheck["File path validation<br/>[pathValidator.js]"]
  node_backend_interview_service["Interview service"]
end

subgraph group_platform["Platform services"]
  node_server["API server<br/>[server.js]"]
  node_auth["Authentication<br/>[authMiddleware.js]"]
  node_authroutes["Auth endpoints<br/>[authRoutes.js]"]
  node_backend_user[("User account<br/>[User.js]")]
  node_backend_analytics_service["Analytics service"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"routes to"| node_learnui
node_app -->|"configures"| node_api
node_app -->|"provides"| node_voice
node_api -.->|"sends requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_learningroutes
node_server -->|"mounts"| node_assessmentroutes
node_assessmentroutes -->|"guards"| node_auth
node_assessmentroutes -->|"dispatches to"| node_assessment
node_auth -->|"loads account"| node_backend_user
node_aiendpoint -->|"calls"| node_aiservice
node_aiendpoint -->|"selects model"| node_models
node_aiendpoint -->|"builds context"| node_context
node_aiendpoint -->|"reads and updates"| node_memory
node_aiendpoint -->|"uses"| node_conversation
node_aiservice -->|"uses pool"| node_models
node_context -->|"reads"| node_memory
node_context -->|"reads"| node_curriculum
node_context -->|"reads"| node_stages
node_teaching -->|"calls"| node_aiservice
node_teaching -->|"uses"| node_memory
node_teaching -->|"uses"| node_curriculum
node_teaching -->|"uses"| node_stages
node_interview -->|"calls"| node_backend_interview_service
node_interview -->|"records analytics"| node_backend_analytics_service
node_project -->|"reads and writes"| node_projectstore
node_project -->|"validates paths"| node_pathcheck

click node_app "https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/App.jsx"
click node_learnui "https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/components/learn/ai-first/LearnPage.jsx"
click node_voice "https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/context/VoiceContext.jsx"
click node_api "https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/server.js"
click node_auth "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/middleware/authMiddleware.js"
click node_authroutes "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/authRoutes.js"
click node_learningroutes "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/learningRoutes.js"
click node_assessmentroutes "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/assessmentRoutes.js"
click node_assessment "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/assessmentController.js"
click node_curriculum "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/LearningPath.js"
click node_stages "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Stage.js"
click node_memory "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/LearningMemory.js"
click node_aiendpoint "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/aiController.js"
click node_context "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/ai/contextBuilder.js"
click node_aiservice "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/aiService.js"
click node_models "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/modelManager.js"
click node_teaching "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/teachingService.js"
click node_interview "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/interviewController.js"
click node_project "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/projectController.js"
click node_projectstore "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Project.js"
click node_pathcheck "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/utils/pathValidator.js"
click node_conversation "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Conversation.js"
click node_backend_user "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/User.js"
click node_backend_interview_service "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/interviewService.js"
click node_backend_analytics_service "https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/analyticsService.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_learnui,node_voice,node_api toneBlue
class node_learningroutes,node_assessmentroutes,node_assessment,node_curriculum,node_stages toneAmber
class node_memory,node_aiendpoint,node_context,node_aiservice,node_models,node_teaching,node_conversation toneMint
class node_interview,node_project,node_projectstore,node_pathcheck,node_backend_interview_service toneRose
class node_server,node_auth,node_authroutes,node_backend_user,node_backend_analytics_service,node_learner toneIndigo
```

## Components

### Learner web app

- [App and routes](https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Learning experience](https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/components/learn/ai-first/LearnPage.jsx): `frontend/src/components/learn/ai-first/LearnPage.jsx`
- [Voice interaction](https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/context/VoiceContext.jsx): `frontend/src/context/VoiceContext.jsx`
- [API client](https://github.com/voxcodeai3/voxcodeai/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Learning journeys

- [Learning endpoints](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/learningRoutes.js): `backend/routes/learningRoutes.js`
- [Assessment endpoints](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/assessmentRoutes.js): `backend/routes/assessmentRoutes.js`
- [Assessment handling](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/assessmentController.js): `backend/controllers/assessmentController.js`
- [Curriculum structure](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/LearningPath.js): `backend/models/LearningPath.js`
- [Stages and topics](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Stage.js): `backend/models/Stage.js`

### AI and coaching

- [Learner memory](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/LearningMemory.js): `backend/models/LearningMemory.js`
- [AI tutor handling](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/aiController.js): `backend/controllers/aiController.js`
- [Context builder](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/ai/contextBuilder.js): `backend/services/ai/contextBuilder.js`
- [AI generation](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/aiService.js): `backend/services/aiService.js`
- [Model failover](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/modelManager.js): `backend/services/modelManager.js`
- [Teaching service](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/teachingService.js): `backend/services/teachingService.js`
- [Conversation data](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Conversation.js): `backend/models/Conversation.js`

### Practice and projects

- [Interview practice](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/interviewController.js): `backend/controllers/interviewController.js`
- [Project workspace](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/controllers/projectController.js): `backend/controllers/projectController.js`
- [Project data](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/Project.js): `backend/models/Project.js`
- [File path validation](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/utils/pathValidator.js): `backend/utils/pathValidator.js`
- [Interview service](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/interviewService.js): `backend/services/interviewService.js`

### Platform services

- [API server](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/server.js): `backend/server.js`
- [Authentication](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Auth endpoints](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [User account](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/models/User.js): `backend/models/User.js`
- [Analytics service](https://github.com/voxcodeai3/voxcodeai/blob/main/backend/services/analyticsService.js): `backend/services/analyticsService.js`

### Other components

- **Learner**

## Connections

- Learner → App and routes: uses (evidence: `frontend/src/App.jsx`)
- App and routes → Learning experience: routes to (evidence: `frontend/src/App.jsx`)
- App and routes → API client: configures (evidence: `frontend/src/App.jsx`)
- App and routes → Voice interaction: provides (evidence: `frontend/src/App.jsx`)
- API client → API server: sends requests
- API server → Auth endpoints: mounts (evidence: `backend/server.js`)
- API server → Learning endpoints: mounts (evidence: `backend/server.js`)
- API server → Assessment endpoints: mounts (evidence: `backend/server.js`)
- Assessment endpoints → Authentication: guards (evidence: `backend/routes/assessmentRoutes.js`)
- Assessment endpoints → Assessment handling: dispatches to (evidence: `backend/routes/assessmentRoutes.js`)
- Authentication → User account: loads account (evidence: `backend/middleware/authMiddleware.js`)
- AI tutor handling → AI generation: calls (evidence: `backend/controllers/aiController.js`)
- AI tutor handling → Model failover: selects model (evidence: `backend/controllers/aiController.js`)
- AI tutor handling → Context builder: builds context (evidence: `backend/controllers/aiController.js`)
- AI tutor handling → Learner memory: reads and updates (evidence: `backend/controllers/aiController.js`)
- AI tutor handling → Conversation data: uses (evidence: `backend/controllers/aiController.js`)
- AI generation → Model failover: uses pool (evidence: `backend/services/aiService.js`)
- Context builder → Learner memory: reads (evidence: `backend/services/ai/contextBuilder.js`)
- Context builder → Curriculum structure: reads (evidence: `backend/services/ai/contextBuilder.js`)
- Context builder → Stages and topics: reads (evidence: `backend/services/ai/contextBuilder.js`)
- Teaching service → AI generation: calls (evidence: `backend/services/teachingService.js`)
- Teaching service → Learner memory: uses (evidence: `backend/services/teachingService.js`)
- Teaching service → Curriculum structure: uses (evidence: `backend/services/teachingService.js`)
- Teaching service → Stages and topics: uses (evidence: `backend/services/teachingService.js`)
- Interview practice → Interview service: calls (evidence: `backend/controllers/interviewController.js`)
- Interview practice → Analytics service: records analytics (evidence: `backend/controllers/interviewController.js`)
- Project workspace → Project data: reads and writes (evidence: `backend/controllers/projectController.js`)
- Project workspace → File path validation: validates paths (evidence: `backend/controllers/projectController.js`)
