# matheusenalt/soldesk architecture

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

- Interactive diagram: https://gitdiagram.com/matheusenalt/soldesk
- Repository: https://github.com/matheusenalt/soldesk

## Overview

SolDesk is a web-based technical-support workspace. Staff use the React workspace to manage clients, records, continuous attendances, tickets, tasks, and internal knowledge; they can attach private media and consult reports. The API also provides a system catalog, calendar views, and version-specific human transcription validation. Core persistence is tenant-scoped, with PostgreSQL/RLS documented. The graph combines shown imports and calls with README-documented capabilities; several route implementations and integrations were not sampled, so their internal wiring is not inferred.

Main entry points: [`backend/app/main.py`](https://github.com/matheusenalt/soldesk/blob/main/backend/app/main.py) (HTTP routes), [`web/src/workspace-api.ts`](https://github.com/matheusenalt/soldesk/blob/main/web/src/workspace-api.ts) (Web API client), [`backend/app/work.py`](https://github.com/matheusenalt/soldesk/blob/main/backend/app/work.py) (Records and tickets), [`web/src/Workspace.tsx`](https://github.com/matheusenalt/soldesk/blob/main/web/src/Workspace.tsx) (Workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workspace"]
  node_workspace["Workspace<br/>[Workspace.tsx]"]
  node_workarea["Work area<br/>[WorkArea.tsx]"]
  node_knowledgeui["Knowledge UI<br/>[KnowledgeArea.tsx]"]
  node_reportsui["Reports UI<br/>[ReportArea.tsx]"]
  node_mediaui["Media panels<br/>[MediaPanels.tsx]"]
  node_webapi["Web API client<br/>[workspace-api.ts]"]
end

subgraph group_api["Support API"]
  node_api["HTTP routes<br/>[main.py]"]
  node_identity["Identity and access<br/>[access.py]"]
  node_mobile["Mobile API<br/>[mobile_routes.py]"]
end

subgraph group_domain["Support domains"]
  node_records["Records and tickets<br/>[work.py]"]
  node_attendance["Continuous attendance"]
  node_ticketflow["Ticket workflow<br/>[ticket_workflow.py]"]
  node_tasks["Tasks<br/>[task_routes.py]"]
  node_calendar["Calendar<br/>[calendar_routes.py]"]
  node_systems["System catalog<br/>[system_routes.py]"]
  node_knowledge["Reviewed knowledge<br/>[knowledge.py]"]
  node_validation["Content validation"]
  node_reports["Reports<br/>[reports.py]"]
  node_media["Private media<br/>[media.py]"]
  node_transcription["Transcription<br/>[transcription.py]"]
end

subgraph group_infra["Persistence and media"]
  node_businessdata[("Tenant records<br/>[models.py]")]
  node_db[("PostgreSQL<br/>[database.py]")]
  node_storage[("Private storage<br/>[storage.py]")]
end

node_staff(("Support staff"))

node_staff -->|"uses"| node_workspace
node_workspace -->|"renders"| node_workarea
node_workspace -->|"requests"| node_webapi
node_workarea -->|"requests"| node_webapi
node_knowledgeui -->|"requests"| node_webapi
node_reportsui -->|"requests"| node_webapi
node_mediaui -->|"requests"| node_webapi
node_webapi -->|"calls API"| node_api
node_api -.->|"checks access"| node_identity
node_identity -->|"reads tenant data"| node_businessdata
node_api -.->|"routes records"| node_records
node_records -->|"reads and writes"| node_businessdata
node_api -.->|"routes attendance"| node_attendance
node_api -.->|"routes tickets"| node_ticketflow
node_api -.->|"routes tasks"| node_tasks
node_api -.->|"routes calendar"| node_calendar
node_api -.->|"routes catalog"| node_systems
node_api -.->|"routes knowledge"| node_knowledge
node_api -.->|"routes reports"| node_reports
node_api -.->|"supports validation"| node_validation
node_api -.->|"routes media"| node_media
node_records -->|"organizes text"| node_transcription
node_records -->|"syncs source"| node_knowledge
node_media -.->|"stores media"| node_storage
node_media -.->|"transcribes audio"| node_transcription
node_api -.->|"offers mobile API"| node_mobile
node_businessdata -->|"persists in"| node_db
node_staff -->|"reviews knowledge"| node_knowledgeui
node_staff -->|"views reports"| node_reportsui
node_staff -->|"records audio"| node_mediaui

click node_workspace "https://github.com/matheusenalt/soldesk/blob/main/web/src/Workspace.tsx"
click node_workarea "https://github.com/matheusenalt/soldesk/blob/main/web/src/WorkArea.tsx"
click node_knowledgeui "https://github.com/matheusenalt/soldesk/blob/main/web/src/KnowledgeArea.tsx"
click node_reportsui "https://github.com/matheusenalt/soldesk/blob/main/web/src/ReportArea.tsx"
click node_mediaui "https://github.com/matheusenalt/soldesk/blob/main/web/src/MediaPanels.tsx"
click node_webapi "https://github.com/matheusenalt/soldesk/blob/main/web/src/workspace-api.ts"
click node_api "https://github.com/matheusenalt/soldesk/blob/main/backend/app/main.py"
click node_identity "https://github.com/matheusenalt/soldesk/blob/main/backend/app/access.py"
click node_businessdata "https://github.com/matheusenalt/soldesk/blob/main/backend/app/models.py"
click node_records "https://github.com/matheusenalt/soldesk/blob/main/backend/app/work.py"
click node_attendance "https://github.com/matheusenalt/soldesk/blob/main/backend/app/attendance_routes.py"
click node_ticketflow "https://github.com/matheusenalt/soldesk/blob/main/backend/app/ticket_workflow.py"
click node_tasks "https://github.com/matheusenalt/soldesk/blob/main/backend/app/task_routes.py"
click node_calendar "https://github.com/matheusenalt/soldesk/blob/main/backend/app/calendar_routes.py"
click node_systems "https://github.com/matheusenalt/soldesk/blob/main/backend/app/system_routes.py"
click node_knowledge "https://github.com/matheusenalt/soldesk/blob/main/backend/app/knowledge.py"
click node_validation "https://github.com/matheusenalt/soldesk/blob/main/backend/app/content_validation.py"
click node_reports "https://github.com/matheusenalt/soldesk/blob/main/backend/app/reports.py"
click node_media "https://github.com/matheusenalt/soldesk/blob/main/backend/app/media.py"
click node_transcription "https://github.com/matheusenalt/soldesk/blob/main/backend/app/transcription.py"
click node_mobile "https://github.com/matheusenalt/soldesk/blob/main/backend/app/mobile_routes.py"
click node_db "https://github.com/matheusenalt/soldesk/blob/main/backend/app/database.py"
click node_storage "https://github.com/matheusenalt/soldesk/blob/main/backend/app/storage.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_workspace,node_workarea,node_knowledgeui,node_reportsui,node_mediaui,node_webapi toneBlue
class node_api,node_identity,node_mobile toneAmber
class node_records,node_attendance,node_ticketflow,node_tasks,node_calendar,node_systems,node_knowledge,node_validation,node_reports,node_media,node_transcription toneMint
class node_businessdata,node_db,node_storage toneRose
class node_staff toneIndigo
```

## Components

### Web workspace

- [Workspace](https://github.com/matheusenalt/soldesk/blob/main/web/src/Workspace.tsx): `web/src/Workspace.tsx`
- [Work area](https://github.com/matheusenalt/soldesk/blob/main/web/src/WorkArea.tsx): `web/src/WorkArea.tsx`
- [Knowledge UI](https://github.com/matheusenalt/soldesk/blob/main/web/src/KnowledgeArea.tsx): `web/src/KnowledgeArea.tsx`
- [Reports UI](https://github.com/matheusenalt/soldesk/blob/main/web/src/ReportArea.tsx): `web/src/ReportArea.tsx`
- [Media panels](https://github.com/matheusenalt/soldesk/blob/main/web/src/MediaPanels.tsx): `web/src/MediaPanels.tsx`
- [Web API client](https://github.com/matheusenalt/soldesk/blob/main/web/src/workspace-api.ts): `web/src/workspace-api.ts`

### Support API

- [HTTP routes](https://github.com/matheusenalt/soldesk/blob/main/backend/app/main.py): `backend/app/main.py`
- [Identity and access](https://github.com/matheusenalt/soldesk/blob/main/backend/app/access.py): `backend/app/access.py`
- [Mobile API](https://github.com/matheusenalt/soldesk/blob/main/backend/app/mobile_routes.py): `backend/app/mobile_routes.py`

### Support domains

- [Records and tickets](https://github.com/matheusenalt/soldesk/blob/main/backend/app/work.py): `backend/app/work.py`
- [Continuous attendance](https://github.com/matheusenalt/soldesk/blob/main/backend/app/attendance_routes.py): `backend/app/attendance_routes.py`
- [Ticket workflow](https://github.com/matheusenalt/soldesk/blob/main/backend/app/ticket_workflow.py): `backend/app/ticket_workflow.py`
- [Tasks](https://github.com/matheusenalt/soldesk/blob/main/backend/app/task_routes.py): `backend/app/task_routes.py`
- [Calendar](https://github.com/matheusenalt/soldesk/blob/main/backend/app/calendar_routes.py): `backend/app/calendar_routes.py`
- [System catalog](https://github.com/matheusenalt/soldesk/blob/main/backend/app/system_routes.py): `backend/app/system_routes.py`
- [Reviewed knowledge](https://github.com/matheusenalt/soldesk/blob/main/backend/app/knowledge.py): `backend/app/knowledge.py`
- [Content validation](https://github.com/matheusenalt/soldesk/blob/main/backend/app/content_validation.py): `backend/app/content_validation.py`
- [Reports](https://github.com/matheusenalt/soldesk/blob/main/backend/app/reports.py): `backend/app/reports.py`
- [Private media](https://github.com/matheusenalt/soldesk/blob/main/backend/app/media.py): `backend/app/media.py`
- [Transcription](https://github.com/matheusenalt/soldesk/blob/main/backend/app/transcription.py): `backend/app/transcription.py`

### Persistence and media

- [Tenant records](https://github.com/matheusenalt/soldesk/blob/main/backend/app/models.py): `backend/app/models.py`
- [PostgreSQL](https://github.com/matheusenalt/soldesk/blob/main/backend/app/database.py): `backend/app/database.py`
- [Private storage](https://github.com/matheusenalt/soldesk/blob/main/backend/app/storage.py): `backend/app/storage.py`

### Other components

- **Support staff**

## Connections

- Support staff → Workspace: uses (evidence: `README.md`)
- Workspace → Work area: renders (evidence: `web/src/Workspace.tsx`)
- Workspace → Web API client: requests (evidence: `web/src/Workspace.tsx`)
- Work area → Web API client: requests (evidence: `web/src/WorkArea.tsx`)
- Knowledge UI → Web API client: requests (evidence: `web/src/KnowledgeArea.tsx`)
- Reports UI → Web API client: requests (evidence: `web/src/ReportArea.tsx`)
- Media panels → Web API client: requests (evidence: `web/src/MediaPanels.tsx`)
- Web API client → HTTP routes: calls API (evidence: `web/src/workspace-api.ts`)
- HTTP routes → Identity and access: checks access
- Identity and access → Tenant records: reads tenant data (evidence: `backend/app/access.py`)
- HTTP routes → Records and tickets: routes records
- Records and tickets → Tenant records: reads and writes (evidence: `backend/app/work.py`)
- HTTP routes → Continuous attendance: routes attendance
- HTTP routes → Ticket workflow: routes tickets
- HTTP routes → Tasks: routes tasks
- HTTP routes → Calendar: routes calendar
- HTTP routes → System catalog: routes catalog
- HTTP routes → Reviewed knowledge: routes knowledge
- HTTP routes → Reports: routes reports
- HTTP routes → Content validation: supports validation
- HTTP routes → Private media: routes media
- Records and tickets → Transcription: organizes text (evidence: `backend/app/work.py`)
- Records and tickets → Reviewed knowledge: syncs source (evidence: `backend/app/work.py`)
- Private media → Private storage: stores media
- Private media → Transcription: transcribes audio
- HTTP routes → Mobile API: offers mobile API
- Tenant records → PostgreSQL: persists in (evidence: `backend/app/models.py`)
- Support staff → Knowledge UI: reviews knowledge (evidence: `README.md`)
- Support staff → Reports UI: views reports (evidence: `README.md`)
- Support staff → Media panels: records audio (evidence: `README.md`)
