# mengmengcode/vocat architecture

> Architecture diagram of the GitHub repository mengmengcode/vocat, 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/mengmengcode/vocat
- Repository: https://github.com/mengmengcode/vocat

## Overview

VoCat is a web control panel and engineering toolkit for cellular modems. An operator signs in, uses the React interface to request device, radio, SMS, eSIM, or network operations, and receives live status and persisted results from the Go service. The backend also supports WiFi Calling, proxy routing, scheduled tasks, notifications, extensions, and operational controls. The README documents these capabilities; source excerpts establish selected frontend calls and routing, while several backend connections below are documented behavior rather than inspected call sites.

Main entry points: [`internal/server/server.go`](https://github.com/mengmengcode/vocat/blob/master/internal/server/server.go) (HTTP API), [`web/src/App.tsx`](https://github.com/mengmengcode/vocat/blob/master/web/src/App.tsx) (Application routes), [`web/src/api.ts`](https://github.com/mengmengcode/vocat/blob/master/web/src/api.ts) (API client), [`internal/server/device_api.go`](https://github.com/mengmengcode/vocat/blob/master/internal/server/device_api.go) (Device operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_app["Application routes<br/>[App.tsx]"]
  node_authui["Auth state<br/>[auth.tsx]"]
  node_api["API client<br/>[api.ts]"]
  node_deviceui["Device console<br/>[DevicesPage.tsx]"]
  node_esimui["eSIM controls<br/>[DeviceEsimTab.tsx]"]
  node_tasksui["Task console"]
  node_smsui["SMS console<br/>[SmsPage.tsx]"]
  node_settingsui["Settings console<br/>[SettingsPage.tsx]"]
end

subgraph group_service["Service and device"]
  node_server["HTTP API<br/>[server.go]"]
  node_deviceapi["Device operations<br/>[device_api.go]"]
  node_device["Modem management<br/>[manager.go]"]
  node_modem["Modem discovery<br/>[discovery.go]"]
  node_esim["eSIM management<br/>[esim.go]"]
  node_tasks["Scheduled tasks<br/>[automatic_tasks.go]"]
end

subgraph group_communications["Communications"]
  node_sms["SMS service<br/>[sms_api.go]"]
  node_vowifi["WiFi Calling<br/>[orchestrator.go]"]
  node_proxy["Proxy routing<br/>[manager.go]"]
end

subgraph group_state["State and operations"]
  node_store[("SQLite state<br/>[store.go]")]
  node_auth["Authentication<br/>[service.go]"]
  node_extensions["Extensions<br/>[manager.go]"]
  node_logs["Logs and audit<br/>[hub.go]"]
  node_notifications["Notifications"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_app
node_app -->|"provides auth"| node_authui
node_app -->|"routes to"| node_deviceui
node_app -->|"routes to"| node_tasksui
node_app -->|"routes to"| node_smsui
node_app -->|"routes to"| node_settingsui
node_deviceui -->|"requests data"| node_api
node_tasksui -->|"manages tasks"| node_api
node_smsui -.->|"requests SMS"| node_api
node_settingsui -.->|"updates settings"| node_api
node_esimui -.->|"requests profiles"| node_api
node_api -->|"calls API"| node_server
node_server -.->|"authenticates"| node_auth
node_server -.->|"routes operations"| node_deviceapi
node_deviceapi -.->|"controls modem"| node_device
node_device -.->|"discovers hardware"| node_modem
node_deviceapi -.->|"manages profiles"| node_esim
node_server -.->|"runs schedules"| node_tasks
node_tasks -.->|"persists tasks"| node_store
node_server -.->|"handles messaging"| node_sms
node_sms -.->|"forwards inbound"| node_notifications
node_device -.->|"supports calling"| node_vowifi
node_server -.->|"configures routing"| node_proxy
node_server -.->|"persists state"| node_store
node_server -.->|"manages extensions"| node_extensions
node_server -.->|"emits operational logs"| node_logs

click node_app "https://github.com/mengmengcode/vocat/blob/master/web/src/App.tsx"
click node_authui "https://github.com/mengmengcode/vocat/blob/master/web/src/store/auth.tsx"
click node_api "https://github.com/mengmengcode/vocat/blob/master/web/src/api.ts"
click node_deviceui "https://github.com/mengmengcode/vocat/blob/master/web/src/pages/DevicesPage.tsx"
click node_esimui "https://github.com/mengmengcode/vocat/blob/master/web/src/components/devices/DeviceEsimTab.tsx"
click node_tasksui "https://github.com/mengmengcode/vocat/blob/master/web/src/pages/AutomaticTasksPage.tsx"
click node_smsui "https://github.com/mengmengcode/vocat/blob/master/web/src/pages/SmsPage.tsx"
click node_settingsui "https://github.com/mengmengcode/vocat/blob/master/web/src/pages/SettingsPage.tsx"
click node_server "https://github.com/mengmengcode/vocat/blob/master/internal/server/server.go"
click node_deviceapi "https://github.com/mengmengcode/vocat/blob/master/internal/server/device_api.go"
click node_device "https://github.com/mengmengcode/vocat/blob/master/internal/device/manager.go"
click node_modem "https://github.com/mengmengcode/vocat/blob/master/internal/modem/discovery.go"
click node_esim "https://github.com/mengmengcode/vocat/blob/master/internal/device/esim.go"
click node_tasks "https://github.com/mengmengcode/vocat/blob/master/internal/server/automatic_tasks.go"
click node_sms "https://github.com/mengmengcode/vocat/blob/master/internal/server/sms_api.go"
click node_vowifi "https://github.com/mengmengcode/vocat/blob/master/internal/vowifi/orchestrator.go"
click node_proxy "https://github.com/mengmengcode/vocat/blob/master/internal/exportproxy/manager.go"
click node_store "https://github.com/mengmengcode/vocat/blob/master/internal/store/store.go"
click node_auth "https://github.com/mengmengcode/vocat/blob/master/internal/auth/service.go"
click node_extensions "https://github.com/mengmengcode/vocat/blob/master/internal/extensions/manager.go"
click node_logs "https://github.com/mengmengcode/vocat/blob/master/internal/loghub/hub.go"
click node_notifications "https://github.com/mengmengcode/vocat/blob/master/internal/server/sms_notifications.go"

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_authui,node_api,node_deviceui,node_esimui,node_tasksui,node_smsui,node_settingsui toneBlue
class node_server,node_deviceapi,node_device,node_modem,node_esim,node_tasks toneAmber
class node_sms,node_vowifi,node_proxy toneMint
class node_store,node_auth,node_extensions,node_logs,node_notifications toneRose
class node_operator toneIndigo
```

## Components

### Web interface

- [Application routes](https://github.com/mengmengcode/vocat/blob/master/web/src/App.tsx): `web/src/App.tsx`
- [Auth state](https://github.com/mengmengcode/vocat/blob/master/web/src/store/auth.tsx): `web/src/store/auth.tsx`
- [API client](https://github.com/mengmengcode/vocat/blob/master/web/src/api.ts): `web/src/api.ts`
- [Device console](https://github.com/mengmengcode/vocat/blob/master/web/src/pages/DevicesPage.tsx): `web/src/pages/DevicesPage.tsx`
- [eSIM controls](https://github.com/mengmengcode/vocat/blob/master/web/src/components/devices/DeviceEsimTab.tsx): `web/src/components/devices/DeviceEsimTab.tsx`
- [Task console](https://github.com/mengmengcode/vocat/blob/master/web/src/pages/AutomaticTasksPage.tsx): `web/src/pages/AutomaticTasksPage.tsx`
- [SMS console](https://github.com/mengmengcode/vocat/blob/master/web/src/pages/SmsPage.tsx): `web/src/pages/SmsPage.tsx`
- [Settings console](https://github.com/mengmengcode/vocat/blob/master/web/src/pages/SettingsPage.tsx): `web/src/pages/SettingsPage.tsx`

### Service and device

- [HTTP API](https://github.com/mengmengcode/vocat/blob/master/internal/server/server.go): `internal/server/server.go`
- [Device operations](https://github.com/mengmengcode/vocat/blob/master/internal/server/device_api.go): `internal/server/device_api.go`
- [Modem management](https://github.com/mengmengcode/vocat/blob/master/internal/device/manager.go): `internal/device/manager.go`
- [Modem discovery](https://github.com/mengmengcode/vocat/blob/master/internal/modem/discovery.go): `internal/modem/discovery.go`
- [eSIM management](https://github.com/mengmengcode/vocat/blob/master/internal/device/esim.go): `internal/device/esim.go`
- [Scheduled tasks](https://github.com/mengmengcode/vocat/blob/master/internal/server/automatic_tasks.go): `internal/server/automatic_tasks.go`

### Communications

- [SMS service](https://github.com/mengmengcode/vocat/blob/master/internal/server/sms_api.go): `internal/server/sms_api.go`
- [WiFi Calling](https://github.com/mengmengcode/vocat/blob/master/internal/vowifi/orchestrator.go): `internal/vowifi/orchestrator.go`
- [Proxy routing](https://github.com/mengmengcode/vocat/blob/master/internal/exportproxy/manager.go): `internal/exportproxy/manager.go`

### State and operations

- [SQLite state](https://github.com/mengmengcode/vocat/blob/master/internal/store/store.go): `internal/store/store.go`
- [Authentication](https://github.com/mengmengcode/vocat/blob/master/internal/auth/service.go): `internal/auth/service.go`
- [Extensions](https://github.com/mengmengcode/vocat/blob/master/internal/extensions/manager.go): `internal/extensions/manager.go`
- [Logs and audit](https://github.com/mengmengcode/vocat/blob/master/internal/loghub/hub.go): `internal/loghub/hub.go`
- [Notifications](https://github.com/mengmengcode/vocat/blob/master/internal/server/sms_notifications.go): `internal/server/sms_notifications.go`

### Other components

- **Operator**

## Connections

- Operator → Application routes: uses (evidence: `README.md`)
- Application routes → Auth state: provides auth (evidence: `web/src/App.tsx`)
- Application routes → Device console: routes to (evidence: `web/src/App.tsx`)
- Application routes → Task console: routes to (evidence: `web/src/App.tsx`)
- Application routes → SMS console: routes to (evidence: `web/src/App.tsx`)
- Application routes → Settings console: routes to (evidence: `web/src/App.tsx`)
- Device console → API client: requests data (evidence: `web/src/pages/DevicesPage.tsx`)
- Task console → API client: manages tasks (evidence: `web/src/pages/AutomaticTasksPage.tsx`)
- SMS console → API client: requests SMS
- Settings console → API client: updates settings
- eSIM controls → API client: requests profiles
- API client → HTTP API: calls API (evidence: `README.md`)
- HTTP API → Authentication: authenticates
- HTTP API → Device operations: routes operations
- Device operations → Modem management: controls modem
- Modem management → Modem discovery: discovers hardware
- Device operations → eSIM management: manages profiles
- HTTP API → Scheduled tasks: runs schedules
- Scheduled tasks → SQLite state: persists tasks
- HTTP API → SMS service: handles messaging
- SMS service → Notifications: forwards inbound (evidence: `README.md`)
- Modem management → WiFi Calling: supports calling (evidence: `README.md`)
- HTTP API → Proxy routing: configures routing (evidence: `README.md`)
- HTTP API → SQLite state: persists state (evidence: `README.md`)
- HTTP API → Extensions: manages extensions (evidence: `README.md`)
- HTTP API → Logs and audit: emits operational logs (evidence: `README.md`)
