# trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_ architecture

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

- Interactive diagram: https://gitdiagram.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_
- Repository: https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_

## Overview

ElectroCare is a repair-service platform for booking device repairs and managing them through handover. Customers can request service, track tickets and warranties, and use AI-assisted diagnosis; technicians handle assigned work, checklists and quotes; administrators manage assignments, users and service data. The main runtime is a browser application calling an Express API backed by MySQL. The excerpts show frontend API requests and backend database operations, but do not show the full route wiring or AI provider integration; those links are marked unverified where needed.

Main entry points: [`ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js) (Web application), [`ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js) (Express API), [`ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs) (Frontend server), [`ElectroCare_GitHub/ElectroCare/co-so-du-lieu/tao-co-so-du-lieu.sql`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/co-so-du-lieu/tao-co-so-du-lieu.sql) (Repair database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer experience"]
  node_web_app["Web application<br/>[ung-dung.js]"]
  node_repair_booking["Repair booking<br/>[ung-dung.js]"]
  node_ticket_tracking["Ticket tracking<br/>[ung-dung.js]"]
  node_warranty_lookup["Warranty lookup<br/>[ung-dung.js]"]
  node_ai_diagnosis["AI diagnosis<br/>[ung-dung.js]"]
  node_catalogs["Parts and stores<br/>[ung-dung.js]"]
end

subgraph group_operations["Repair operations"]
  node_staff_workflow["Technician workflow<br/>[may-chu.js]"]
  node_quotes_checklists["Quotes and checks<br/>[may-chu.js]"]
  node_admin_management["Admin management<br/>[may-chu.js]"]
end

subgraph group_platform["Application platform"]
  node_api_service["Express API<br/>[may-chu.js]"]
  node_frontend_host["Frontend server"]
end

subgraph group_data["Data and integrations"]
  node_repair_data[("Repair database")]
  node_ai_provider["AI provider"]
end

node_customer_actor(("Customer"))
node_staff_actor(("Technician"))
node_admin_actor(("Administrator"))

node_customer_actor -.->|"uses"| node_web_app
node_staff_actor -.->|"uses"| node_web_app
node_admin_actor -.->|"uses"| node_web_app
node_web_app -->|"renders"| node_repair_booking
node_web_app -->|"renders"| node_ticket_tracking
node_web_app -->|"renders"| node_warranty_lookup
node_web_app -->|"renders"| node_ai_diagnosis
node_web_app -->|"loads"| node_catalogs
node_repair_booking -.->|"submits"| node_api_service
node_ticket_tracking -.->|"queries"| node_api_service
node_warranty_lookup -.->|"queries"| node_api_service
node_ai_diagnosis -.->|"requests"| node_api_service
node_catalogs -.->|"queries"| node_api_service
node_staff_workflow -.->|"served by"| node_api_service
node_quotes_checklists -.->|"served by"| node_api_service
node_admin_management -.->|"served by"| node_api_service
node_api_service -->|"reads and writes"| node_repair_data
node_ai_diagnosis -.->|"may consult"| node_ai_provider
node_frontend_host -->|"serves files"| node_web_app

click node_web_app "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_repair_booking "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_ticket_tracking "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_warranty_lookup "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_ai_diagnosis "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_catalogs "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js"
click node_staff_workflow "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js"
click node_quotes_checklists "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js"
click node_admin_management "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js"
click node_api_service "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js"
click node_frontend_host "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs"
click node_repair_data "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/co-so-du-lieu/tao-co-so-du-lieu.sql"

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_web_app,node_repair_booking,node_ticket_tracking,node_warranty_lookup,node_ai_diagnosis,node_catalogs toneBlue
class node_staff_workflow,node_quotes_checklists,node_admin_management toneAmber
class node_api_service,node_frontend_host toneMint
class node_repair_data,node_ai_provider toneRose
class node_customer_actor,node_staff_actor,node_admin_actor toneIndigo
```

## Components

### Customer experience

- [Web application](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`
- [Repair booking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`
- [Ticket tracking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`
- [Warranty lookup](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`
- [AI diagnosis](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`
- [Parts and stores](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js): `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`

### Repair operations

- [Technician workflow](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js): `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`
- [Quotes and checks](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js): `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`
- [Admin management](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js): `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`

### Application platform

- [Express API](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js): `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`
- [Frontend server](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs): `ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs`

### Data and integrations

- [Repair database](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu2_/blob/main/ElectroCare_GitHub/ElectroCare/co-so-du-lieu/tao-co-so-du-lieu.sql): `ElectroCare_GitHub/ElectroCare/co-so-du-lieu/tao-co-so-du-lieu.sql`
- **AI provider**

### Other components

- **Customer**
- **Technician**
- **Administrator**

## Connections

- Customer → Web application: uses
- Technician → Web application: uses
- Administrator → Web application: uses
- Web application → Repair booking: renders (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`)
- Web application → Ticket tracking: renders (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`)
- Web application → Warranty lookup: renders (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`)
- Web application → AI diagnosis: renders (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`)
- Web application → Parts and stores: loads (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/ung-dung.js`)
- Repair booking → Express API: submits
- Ticket tracking → Express API: queries
- Warranty lookup → Express API: queries
- AI diagnosis → Express API: requests
- Parts and stores → Express API: queries
- Technician workflow → Express API: served by (evidence: `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`)
- Quotes and checks → Express API: served by (evidence: `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`)
- Admin management → Express API: served by (evidence: `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`)
- Express API → Repair database: reads and writes (evidence: `ElectroCare_GitHub/ElectroCare/may-chu/may-chu.js`)
- AI diagnosis → AI provider: may consult
- Frontend server → Web application: serves files (evidence: `ElectroCare_GitHub/ElectroCare/giao-dien/phuc-vu-giao-dien.mjs`)
