# duyu09/mkty-system architecture

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

- Interactive diagram: https://gitdiagram.com/duyu09/mkty-system
- Repository: https://github.com/duyu09/mkty-system

## Overview

MKTY is a smart healthcare and diagnostic-assistance platform. Users register or sign in, then use medical Q&A, multimodal diagnosis, records, forums, knowledge resources, and task lists; administrators manage users and platform content through a separate frontend. The documented architecture separates Vue frontends, Flask business logic, MySQL persistence, and AI services connected asynchronously through RabbitMQ. The source excerpts show selected routes, SQL-backed handlers, and admin API calls; several product features and AI-service connections are documented in the README but their complete implementations were not sampled.

Main entry points: [`frontend/src/router/index.js`](https://github.com/duyu09/mkty-system/blob/main/frontend/src/router/index.js) (App Routing), [`frontend/src/api/api.js`](https://github.com/duyu09/mkty-system/blob/main/frontend/src/api/api.js) (HTTP API Client), [`backend/run.py`](https://github.com/duyu09/mkty-system/blob/main/backend/run.py) (Business API), [`frontend/src/components/modules/Register.vue`](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/Register.vue) (Account & Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user_app["Patient Application"]
  node_app_routes["App Routing<br/>[index.js]"]
  node_auth_profile["Account &amp; Profile<br/>[Register.vue]"]
  node_diagnosis["Multimodal Diagnosis"]
  node_medical_qa["Medical Q&amp;A<br/>[PsyChat.vue]"]
  node_discussion["AI Discussion<br/>[PsyChatDM.vue]"]
  node_records["Medical Records"]
  node_community["Forums<br/>[ForumInner.vue]"]
  node_knowledge["Knowledge Resources<br/>[Knowledge.vue]"]
  node_checklist["Diagnostic Checklist<br/>[ImportantList.vue]"]
  node_api["HTTP API Client<br/>[api.js]"]
end

subgraph group_backend["Backend Services"]
  node_flask["Business API<br/>[run.py]"]
  node_helpers["Backend Utilities<br/>[util.py]"]
  node_mysql[("MySQL")]
  node_queue["RabbitMQ"]
end

subgraph group_ai["AI Services"]
  node_multimodal_worker["Image Diagnosis Worker<br/>[tsbb_model.py]"]
  node_chat_worker["Language Model Workers<br/>[large_model.py]"]
  node_modest_worker["Modest Model Worker<br/>[modest_model.py]"]
  node_timeseries["Time Series Analysis<br/>[time_series.py]"]
end

subgraph group_admin["Administration"]
  node_admin_routes["Admin Routing<br/>[index.js]"]
  node_admin_views["Admin Management Views"]
  node_admin_api["Admin API<br/>[app.py]"]
end

node_patient(("Patient"))
node_admin_actor(("Administrator"))

node_patient -->|"uses"| node_app_routes
node_app_routes -->|"routes to"| node_auth_profile
node_app_routes -->|"routes to"| node_diagnosis
node_app_routes -->|"routes to"| node_medical_qa
node_app_routes -->|"routes to"| node_discussion
node_app_routes -->|"routes to"| node_records
node_app_routes -->|"routes to"| node_community
node_app_routes -->|"routes to"| node_knowledge
node_app_routes -->|"routes to"| node_checklist
node_auth_profile -.->|"requests via"| node_api
node_diagnosis -.->|"requests via"| node_api
node_medical_qa -.->|"requests via"| node_api
node_discussion -.->|"requests via"| node_api
node_records -.->|"requests via"| node_api
node_community -.->|"requests via"| node_api
node_knowledge -.->|"requests via"| node_api
node_checklist -.->|"requests via"| node_api
node_api -.->|"HTTP requests"| node_flask
node_flask -->|"uses utilities"| node_helpers
node_flask -->|"queries"| node_mysql
node_flask -.->|"dispatches AI tasks"| node_queue
node_queue -.->|"delivers tasks"| node_multimodal_worker
node_queue -.->|"delivers tasks"| node_chat_worker
node_flask -.->|"uses analysis"| node_timeseries
node_admin_actor -->|"uses"| node_admin_routes
node_admin_routes -->|"routes to"| node_admin_views
node_admin_views -->|"HTTP requests"| node_admin_api
node_admin_api -.->|"manages data"| node_mysql
node_flask -.->|"uses model"| node_modest_worker

click node_app_routes "https://github.com/duyu09/mkty-system/blob/main/frontend/src/router/index.js"
click node_auth_profile "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/Register.vue"
click node_diagnosis "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/MultimodalDiagnosis.vue"
click node_medical_qa "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/PsyChat.vue"
click node_discussion "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/PsyChatDM.vue"
click node_records "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/MedicalRecordInner.vue"
click node_community "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/ForumInner.vue"
click node_knowledge "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/Knowledge.vue"
click node_checklist "https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/ImportantList.vue"
click node_api "https://github.com/duyu09/mkty-system/blob/main/frontend/src/api/api.js"
click node_flask "https://github.com/duyu09/mkty-system/blob/main/backend/run.py"
click node_helpers "https://github.com/duyu09/mkty-system/blob/main/backend/util.py"
click node_multimodal_worker "https://github.com/duyu09/mkty-system/blob/main/backend/tsbb_model.py"
click node_chat_worker "https://github.com/duyu09/mkty-system/blob/main/backend/large_model.py"
click node_modest_worker "https://github.com/duyu09/mkty-system/blob/main/backend/modest_model.py"
click node_timeseries "https://github.com/duyu09/mkty-system/blob/main/backend/time_series.py"
click node_admin_routes "https://github.com/duyu09/mkty-system/blob/main/admin_frontend/src/router/index.js"
click node_admin_views "https://github.com/duyu09/mkty-system/tree/main/admin_frontend/src/views"
click node_admin_api "https://github.com/duyu09/mkty-system/blob/main/admin_backend/app.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_app_routes,node_auth_profile,node_diagnosis,node_medical_qa,node_discussion,node_records,node_community,node_knowledge,node_checklist,node_api toneBlue
class node_flask,node_helpers,node_mysql,node_queue toneAmber
class node_multimodal_worker,node_chat_worker,node_modest_worker,node_timeseries toneMint
class node_admin_routes,node_admin_views,node_admin_api toneRose
class node_patient,node_admin_actor toneIndigo
```

## Components

### Patient Application

- [App Routing](https://github.com/duyu09/mkty-system/blob/main/frontend/src/router/index.js): `frontend/src/router/index.js`
- [Account & Profile](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/Register.vue): `frontend/src/components/modules/Register.vue`
- [Multimodal Diagnosis](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/MultimodalDiagnosis.vue): `frontend/src/components/modules/MultimodalDiagnosis.vue`
- [Medical Q&A](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/PsyChat.vue): `frontend/src/components/modules/PsyChat.vue`
- [AI Discussion](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/PsyChatDM.vue): `frontend/src/components/modules/PsyChatDM.vue`
- [Medical Records](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/MedicalRecordInner.vue): `frontend/src/components/modules/MedicalRecordInner.vue`
- [Forums](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/ForumInner.vue): `frontend/src/components/modules/ForumInner.vue`
- [Knowledge Resources](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/Knowledge.vue): `frontend/src/components/modules/Knowledge.vue`
- [Diagnostic Checklist](https://github.com/duyu09/mkty-system/blob/main/frontend/src/components/modules/ImportantList.vue): `frontend/src/components/modules/ImportantList.vue`
- [HTTP API Client](https://github.com/duyu09/mkty-system/blob/main/frontend/src/api/api.js): `frontend/src/api/api.js`

### Backend Services

- [Business API](https://github.com/duyu09/mkty-system/blob/main/backend/run.py): `backend/run.py`
- [Backend Utilities](https://github.com/duyu09/mkty-system/blob/main/backend/util.py): `backend/util.py`
- **MySQL**
- **RabbitMQ**

### AI Services

- [Image Diagnosis Worker](https://github.com/duyu09/mkty-system/blob/main/backend/tsbb_model.py): `backend/tsbb_model.py`
- [Language Model Workers](https://github.com/duyu09/mkty-system/blob/main/backend/large_model.py): `backend/large_model.py`
- [Modest Model Worker](https://github.com/duyu09/mkty-system/blob/main/backend/modest_model.py): `backend/modest_model.py`
- [Time Series Analysis](https://github.com/duyu09/mkty-system/blob/main/backend/time_series.py): `backend/time_series.py`

### Administration

- [Admin Routing](https://github.com/duyu09/mkty-system/blob/main/admin_frontend/src/router/index.js): `admin_frontend/src/router/index.js`
- [Admin Management Views](https://github.com/duyu09/mkty-system/tree/main/admin_frontend/src/views): `admin_frontend/src/views`
- [Admin API](https://github.com/duyu09/mkty-system/blob/main/admin_backend/app.py): `admin_backend/app.py`

### Other components

- **Patient**
- **Administrator**

## Connections

- Patient → App Routing: uses (evidence: `frontend/src/router/index.js`)
- App Routing → Account & Profile: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Multimodal Diagnosis: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Medical Q&A: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → AI Discussion: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Medical Records: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Forums: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Knowledge Resources: routes to (evidence: `frontend/src/router/index.js`)
- App Routing → Diagnostic Checklist: routes to (evidence: `frontend/src/router/index.js`)
- Account & Profile → HTTP API Client: requests via
- Multimodal Diagnosis → HTTP API Client: requests via
- Medical Q&A → HTTP API Client: requests via
- AI Discussion → HTTP API Client: requests via
- Medical Records → HTTP API Client: requests via
- Forums → HTTP API Client: requests via
- Knowledge Resources → HTTP API Client: requests via
- Diagnostic Checklist → HTTP API Client: requests via
- HTTP API Client → Business API: HTTP requests (evidence: `README.md`)
- Business API → Backend Utilities: uses utilities (evidence: `backend/run.py`)
- Business API → MySQL: queries (evidence: `backend/run.py`)
- Business API → RabbitMQ: dispatches AI tasks (evidence: `README.md`)
- RabbitMQ → Image Diagnosis Worker: delivers tasks (evidence: `README.md`)
- RabbitMQ → Language Model Workers: delivers tasks (evidence: `README.md`)
- Business API → Time Series Analysis: uses analysis
- Administrator → Admin Routing: uses (evidence: `admin_frontend/src/router/index.js`)
- Admin Routing → Admin Management Views: routes to (evidence: `admin_frontend/src/router/index.js`)
- Admin Management Views → Admin API: HTTP requests (evidence: `admin_frontend/src/views/Forum.vue`)
- Admin API → MySQL: manages data (evidence: `README.md`)
- Business API → Modest Model Worker: uses model (evidence: `README.md`)
