# trungpham07012004/24ct1-pham_phuoc_trung_laptop_care architecture

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

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

## Overview

ElectroCare is a web app for booking and managing electronic-device repairs. Customers can find services, submit a repair request, follow its status, review and approve a quote, and access warranty information; staff and admins have role-specific accounts and operational views. The frontend is a single application module, while the backend’s sampled routes and database access are concentrated in one server file. The README is empty, and unsampled backend routes and schema details cannot be verified here.

Main entry points: [`ElectroCare_GitHub_Ready/backend/server.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/backend/server.js) (Repair API), [`ElectroCare_GitHub_Ready/frontend/app.js`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js) (Web application), [`ElectroCare_GitHub_Ready/database/electrocare.sql`](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/database/electrocare.sql) (MySQL database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer experience"]
  node_webapp["Web application<br/>[app.js]"]
  node_service_catalog["Service catalog<br/>[app.js]"]
  node_warranty["Warranty<br/>[app.js]"]
  node_stores["Store information<br/>[app.js]"]
  node_ai_diagnosis["AI diagnosis<br/>[app.js]"]
end

subgraph group_operations["Repair operations"]
  node_booking["Repair booking<br/>[app.js]"]
  node_tracking["Repair tracking<br/>[app.js]"]
  node_quote_approval["Quote approval<br/>[app.js]"]
end

subgraph group_platform["Application platform"]
  node_auth["Role-based accounts<br/>[server.js]"]
  node_repair_api["Repair API<br/>[server.js]"]
  node_mysql[("MySQL database<br/>[electrocare.sql]")]
end

node_customer(("Customer"))
node_staff(("Staff and admin"))

node_customer -->|"uses"| node_webapp
node_staff -->|"uses"| node_webapp
node_webapp -->|"calls API"| node_repair_api
node_repair_api -->|"queries"| node_mysql
node_auth -->|"reads and writes"| node_mysql
node_repair_api -->|"checks access"| node_auth

click node_webapp "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_service_catalog "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_booking "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_tracking "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_quote_approval "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_warranty "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_stores "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_ai_diagnosis "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js"
click node_auth "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/backend/server.js"
click node_repair_api "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/backend/server.js"
click node_mysql "https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/database/electrocare.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_webapp,node_service_catalog,node_warranty,node_stores,node_ai_diagnosis toneBlue
class node_booking,node_tracking,node_quote_approval toneAmber
class node_auth,node_repair_api,node_mysql toneMint
class node_customer,node_staff toneIndigo
```

## Components

### Customer experience

- [Web application](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [Service catalog](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [Warranty](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [Store information](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [AI diagnosis](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`

### Repair operations

- [Repair booking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [Repair tracking](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`
- [Quote approval](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/frontend/app.js): `ElectroCare_GitHub_Ready/frontend/app.js`

### Application platform

- [Role-based accounts](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/backend/server.js): `ElectroCare_GitHub_Ready/backend/server.js`
- [Repair API](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/backend/server.js): `ElectroCare_GitHub_Ready/backend/server.js`
- [MySQL database](https://github.com/trungpham07012004/24ct1-pham_phuoc_trung_laptop_care/blob/main/ElectroCare_GitHub_Ready/database/electrocare.sql): `ElectroCare_GitHub_Ready/database/electrocare.sql`

### Other components

- **Customer**
- **Staff and admin**

## Connections

- Customer → Web application: uses (evidence: `ElectroCare_GitHub_Ready/frontend/app.js`)
- Staff and admin → Web application: uses (evidence: `ElectroCare_GitHub_Ready/frontend/app.js`)
- Web application → Repair API: calls API (evidence: `ElectroCare_GitHub_Ready/frontend/app.js`)
- Repair API → MySQL database: queries (evidence: `ElectroCare_GitHub_Ready/backend/server.js`)
- Role-based accounts → MySQL database: reads and writes (evidence: `ElectroCare_GitHub_Ready/backend/server.js`)
- Repair API → Role-based accounts: checks access (evidence: `ElectroCare_GitHub_Ready/backend/server.js`)
