# trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu architecture

> Architecture diagram of the GitHub repository trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). 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_tu
- Repository: https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu

## Overview

ElectroCare is a repair-service web application: customers can explore services, stores and parts, request AI-assisted diagnosis, book repairs, track tickets and approve quotes; staff and administrators manage repair work. The sampled browser code calls the API, and the backend excerpts show booking, ticket, staff and AI routes. The frontend server serves the browser app. Other documented or unsampled capabilities are represented only where the repository tree and excerpts support them; the README was present but provided no content.

Main entry points: [`ElectroCare-GitHub/may-chu/may-chu.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js) (Repair API), [`ElectroCare-GitHub/co-so-du-lieu/tao-co-so-du-lieu.sql`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/co-so-du-lieu/tao-co-so-du-lieu.sql) (MySQL database), [`ElectroCare-GitHub/giao-dien/ung-dung.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/ung-dung.js) (Browser application), [`ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs) (Static web server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer web app"]
  node_webserver["Static web server"]
  node_webui["Browser application<br/>[ung-dung.js]"]
  node_homepage["Web page<br/>[trang-chu.html]"]
end

subgraph group_api["Repair API"]
  node_repairapi["Repair API<br/>[may-chu.js]"]
  node_database[("MySQL database")]
end

subgraph group_work["Repair operations"]
  node_catalog["Services, stores, parts<br/>[may-chu.js]"]
  node_booking["Repair booking<br/>[may-chu.js]"]
  node_ticket["Ticket tracking<br/>[may-chu.js]"]
  node_staffops["Staff work queue<br/>[may-chu.js]"]
  node_quotes["Repair quotes<br/>[may-chu.js]"]
  node_diagnosis["AI diagnosis<br/>[may-chu.js]"]
end

node_customer(("Customer"))
node_staff(("Staff and admin"))
node_gemini["Google Gemini"]

node_customer -->|"opens app"| node_webserver
node_webserver -->|"serves page"| node_homepage
node_homepage -.->|"loads script"| node_webui
node_webui -->|"calls API"| node_repairapi
node_staff -.->|"uses app"| node_webui
node_repairapi -->|"routes requests"| node_catalog
node_repairapi -->|"creates bookings"| node_booking
node_repairapi -->|"loads ticket"| node_ticket
node_repairapi -->|"serves queue"| node_staffops
node_repairapi -->|"approves quote"| node_quotes
node_repairapi -->|"handles diagnosis"| node_diagnosis
node_catalog -->|"queries catalog"| node_database
node_booking -->|"writes booking"| node_database
node_ticket -->|"reads ticket"| node_database
node_staffops -->|"reads assignments"| node_database
node_quotes -->|"updates approval"| node_database
node_diagnosis -->|"requests diagnosis"| node_gemini

click node_webserver "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs"
click node_webui "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/ung-dung.js"
click node_homepage "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/trang-chu.html"
click node_repairapi "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_catalog "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_booking "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_ticket "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_staffops "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_quotes "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_diagnosis "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js"
click node_database "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/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_webserver,node_webui,node_homepage toneBlue
class node_repairapi,node_database toneAmber
class node_catalog,node_booking,node_ticket,node_staffops,node_quotes,node_diagnosis toneMint
class node_customer,node_staff,node_gemini toneIndigo
```

## Components

### Customer web app

- [Static web server](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs): `ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs`
- [Browser application](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/ung-dung.js): `ElectroCare-GitHub/giao-dien/ung-dung.js`
- [Web page](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/giao-dien/trang-chu.html): `ElectroCare-GitHub/giao-dien/trang-chu.html`

### Repair API

- [Repair API](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [MySQL database](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/co-so-du-lieu/tao-co-so-du-lieu.sql): `ElectroCare-GitHub/co-so-du-lieu/tao-co-so-du-lieu.sql`

### Repair operations

- [Services, stores, parts](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [Repair booking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [Ticket tracking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [Staff work queue](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [Repair quotes](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`
- [AI diagnosis](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_de_tai_sua_chua_do_dien_tu/blob/main/ElectroCare-GitHub/may-chu/may-chu.js): `ElectroCare-GitHub/may-chu/may-chu.js`

### Other components

- **Customer**
- **Staff and admin**
- **Google Gemini**

## Connections

- Customer → Static web server: opens app (evidence: `ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs`)
- Static web server → Web page: serves page (evidence: `ElectroCare-GitHub/giao-dien/phuc-vu-giao-dien.mjs`)
- Web page → Browser application: loads script
- Browser application → Repair API: calls API (evidence: `ElectroCare-GitHub/giao-dien/ung-dung.js`)
- Staff and admin → Browser application: uses app
- Repair API → Services, stores, parts: routes requests (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair API → Repair booking: creates bookings (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair API → Ticket tracking: loads ticket (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair API → Staff work queue: serves queue (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair API → Repair quotes: approves quote (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair API → AI diagnosis: handles diagnosis (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Services, stores, parts → MySQL database: queries catalog (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair booking → MySQL database: writes booking (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Ticket tracking → MySQL database: reads ticket (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Staff work queue → MySQL database: reads assignments (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- Repair quotes → MySQL database: updates approval (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
- AI diagnosis → Google Gemini: requests diagnosis (evidence: `ElectroCare-GitHub/may-chu/may-chu.js`)
