# vdartacademy3/vdart-comp architecture

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

- Interactive diagram: https://gitdiagram.com/vdartacademy3/vdart-comp
- Repository: https://github.com/vdartacademy3/vdart-comp

## Overview

VCamp combines an always-on desktop wellbeing companion with a workforce-management API and a role-gated HR/employee console. The principal desktop workflow runs from the companion interface through conversation and sentiment services, with attendance synchronization to the backend; HR staff use the console for attendance, team, question, sentiment, and reminder workflows. The README documents these product capabilities, while sampled source and the SOURCE INDEX establish only some internal calls; uncertain links are omitted.

Main entry points: [`backend/app/main.py`](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/main.py) (FastAPI service), [`dashboard/src/App.tsx`](https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/App.tsx) (Console application), [`desktop/src/services/questionEngineService.ts`](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/questionEngineService.ts) (Question engine), [`backend/app/services`](https://github.com/vdartacademy3/vdart-comp/tree/main/backend/app/services) (Attendance and overtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop companion"]
  node_desktop_app["Desktop app<br/>[App.tsx]"]
  node_companion_ui["Companion overlay"]
  node_companion_state["Companion state<br/>[companionStore.ts]"]
  node_desktop_runtime["Desktop runtime state<br/>[desktopStore.ts]"]
  node_animation["Animation control"]
  node_movement["Movement control"]
  node_physics["Movement physics"]
  node_electron["Electron process<br/>[main.cjs]"]
  node_backend_manager["Backend supervisor<br/>[backendManager.cjs]"]
end

subgraph group_wellbeing["Wellbeing services"]
  node_question_engine["Question engine"]
  node_sentiment_engine["Sentiment analysis<br/>[sentimentEngine.ts]"]
end

subgraph group_workforce["Workforce backend"]
  node_api["FastAPI service<br/>[main.py]"]
  node_attendance_ops["Attendance and overtime"]
  node_team_schedule["Team scheduling"]
  node_questions_backend["Question services"]
  node_workforce_store[("Workforce data<br/>[attendance.py]")]
  node_employee_store[("Employee data<br/>[user.py]")]
  node_database[("Database engine<br/>[database.py]")]
end

subgraph group_console["HR and employee console"]
  node_dashboard_app["Console application<br/>[App.tsx]"]
  node_attendance_ui["Attendance console"]
  node_question_ui["Question management"]
  node_console_api["Console API client<br/>[apiClient.ts]"]
end

node_employee(("Employee"))
node_hr_user(("HR staff"))
node_dashboard_user(("Console user"))

node_employee -->|"uses"| node_desktop_app
node_desktop_app -->|"renders"| node_companion_ui
node_companion_state -->|"controls"| node_animation
node_movement -->|"drives"| node_animation
node_movement -->|"uses"| node_physics
node_desktop_runtime -->|"provides state"| node_physics
node_electron -->|"starts"| node_backend_manager
node_backend_manager -->|"launches"| node_api
node_employee -->|"responds"| node_question_engine
node_question_engine -->|"analyzes locally"| node_sentiment_engine
node_question_engine -->|"submits response"| node_api
node_employee -->|"syncs attendance"| node_api
node_hr_user -->|"uses"| node_dashboard_app
node_dashboard_app -->|"renders"| node_attendance_ui
node_dashboard_app -->|"renders"| node_question_ui
node_dashboard_user -->|"uses"| node_dashboard_app
node_attendance_ui -.->|"requests data"| node_console_api
node_question_ui -.->|"requests data"| node_console_api
node_console_api -->|"sends HTTP requests"| node_api
node_api -->|"routes requests"| node_attendance_ops
node_api -->|"routes requests"| node_questions_backend
node_attendance_ops -->|"uses schedules"| node_team_schedule
node_attendance_ops -->|"reads and writes"| node_workforce_store
node_team_schedule -->|"reads and writes"| node_workforce_store
node_questions_backend -->|"uses employee data"| node_employee_store
node_workforce_store -->|"uses ORM base"| node_database
node_employee_store -->|"uses ORM base"| node_database

click node_desktop_app "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/App.tsx"
click node_companion_ui "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/components/CompanionOverlay.tsx"
click node_companion_state "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/stores/companionStore.ts"
click node_desktop_runtime "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/stores/desktopStore.ts"
click node_animation "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/animationController.ts"
click node_movement "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/companionMovementController.ts"
click node_physics "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/companionPhysicsEngine.ts"
click node_electron "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/electron/main.cjs"
click node_backend_manager "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/electron/backendManager.cjs"
click node_question_engine "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/questionEngineService.ts"
click node_sentiment_engine "https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/sentiment/inference/sentimentEngine.ts"
click node_dashboard_app "https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/App.tsx"
click node_attendance_ui "https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/components/HRAttendanceModule.tsx"
click node_question_ui "https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/components/QuestionManagementModule.tsx"
click node_console_api "https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/services/apiClient.ts"
click node_api "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/main.py"
click node_attendance_ops "https://github.com/vdartacademy3/vdart-comp/tree/main/backend/app/services"
click node_team_schedule "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/services/team_schedule_service.py"
click node_questions_backend "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/services/question_service.py"
click node_workforce_store "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/models/attendance.py"
click node_employee_store "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/models/user.py"
click node_database "https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/database.py"

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_desktop_app,node_companion_ui,node_companion_state,node_desktop_runtime,node_animation,node_movement,node_physics,node_electron,node_backend_manager,node_dashboard_user toneBlue
class node_question_engine,node_sentiment_engine toneAmber
class node_api,node_attendance_ops,node_team_schedule,node_questions_backend,node_workforce_store,node_employee_store,node_database toneMint
class node_dashboard_app,node_attendance_ui,node_question_ui,node_console_api toneRose
class node_employee,node_hr_user toneIndigo
```

## Components

### Desktop companion

- [Desktop app](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/App.tsx): `desktop/src/App.tsx`
- [Companion overlay](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/components/CompanionOverlay.tsx): `desktop/src/components/CompanionOverlay.tsx`
- [Companion state](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/stores/companionStore.ts): `desktop/src/stores/companionStore.ts`
- [Desktop runtime state](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/stores/desktopStore.ts): `desktop/src/stores/desktopStore.ts`
- [Animation control](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/animationController.ts): `desktop/src/services/animationController.ts`
- [Movement control](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/companionMovementController.ts): `desktop/src/services/companionMovementController.ts`
- [Movement physics](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/companionPhysicsEngine.ts): `desktop/src/services/companionPhysicsEngine.ts`
- [Electron process](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/electron/main.cjs): `desktop/electron/main.cjs`
- [Backend supervisor](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/electron/backendManager.cjs): `desktop/electron/backendManager.cjs`

### Wellbeing services

- [Question engine](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/questionEngineService.ts): `desktop/src/services/questionEngineService.ts`
- [Sentiment analysis](https://github.com/vdartacademy3/vdart-comp/blob/main/desktop/src/services/sentiment/inference/sentimentEngine.ts): `desktop/src/services/sentiment/inference/sentimentEngine.ts`

### Workforce backend

- [FastAPI service](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/main.py): `backend/app/main.py`
- [Attendance and overtime](https://github.com/vdartacademy3/vdart-comp/tree/main/backend/app/services): `backend/app/services`
- [Team scheduling](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/services/team_schedule_service.py): `backend/app/services/team_schedule_service.py`
- [Question services](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/services/question_service.py): `backend/app/services/question_service.py`
- [Workforce data](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/models/attendance.py): `backend/app/models/attendance.py`
- [Employee data](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/models/user.py): `backend/app/models/user.py`
- [Database engine](https://github.com/vdartacademy3/vdart-comp/blob/main/backend/app/database.py): `backend/app/database.py`

### HR and employee console

- [Console application](https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/App.tsx): `dashboard/src/App.tsx`
- [Attendance console](https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/components/HRAttendanceModule.tsx): `dashboard/src/components/HRAttendanceModule.tsx`
- [Question management](https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/components/QuestionManagementModule.tsx): `dashboard/src/components/QuestionManagementModule.tsx`
- [Console API client](https://github.com/vdartacademy3/vdart-comp/blob/main/dashboard/src/services/apiClient.ts): `dashboard/src/services/apiClient.ts`

### Other components

- **Employee**
- **HR staff**
- **Console user**

## Connections

- Employee → Desktop app: uses (evidence: `README.md`)
- Desktop app → Companion overlay: renders (evidence: `desktop/src/App.tsx`)
- Companion state → Animation control: controls (evidence: `desktop/src/stores/companionStore.ts`)
- Movement control → Animation control: drives (evidence: `desktop/src/services/companionMovementController.ts`)
- Movement control → Movement physics: uses (evidence: `desktop/src/services/companionMovementController.ts`)
- Desktop runtime state → Movement physics: provides state (evidence: `desktop/src/services/companionPhysicsEngine.ts`)
- Electron process → Backend supervisor: starts (evidence: `desktop/electron/main.cjs`)
- Backend supervisor → FastAPI service: launches (evidence: `README.md`)
- Employee → Question engine: responds (evidence: `README.md`)
- Question engine → Sentiment analysis: analyzes locally (evidence: `desktop/src/services/questionEngineService.ts`)
- Question engine → FastAPI service: submits response (evidence: `desktop/src/services/questionEngineService.ts`)
- Employee → FastAPI service: syncs attendance (evidence: `README.md`)
- HR staff → Console application: uses (evidence: `README.md`)
- Console application → Attendance console: renders (evidence: `dashboard/src/App.tsx`)
- Console application → Question management: renders (evidence: `dashboard/src/App.tsx`)
- Console user → Console application: uses (evidence: `README.md`)
- Attendance console → Console API client: requests data
- Question management → Console API client: requests data
- Console API client → FastAPI service: sends HTTP requests (evidence: `dashboard/src/services/apiClient.ts`)
- FastAPI service → Attendance and overtime: routes requests (evidence: `backend/app/main.py`)
- FastAPI service → Question services: routes requests (evidence: `backend/app/main.py`)
- Attendance and overtime → Team scheduling: uses schedules (evidence: `backend/app/services/hr_attendance_service.py`)
- Attendance and overtime → Workforce data: reads and writes (evidence: `backend/app/services/hr_attendance_service.py`)
- Team scheduling → Workforce data: reads and writes (evidence: `backend/app/services/team_schedule_service.py`)
- Question services → Employee data: uses employee data (evidence: `backend/app/services/question_service.py`)
- Workforce data → Database engine: uses ORM base (evidence: `backend/app/models/attendance.py`)
- Employee data → Database engine: uses ORM base (evidence: `backend/app/models/user.py`)
