# imad-18/windshield-quality-checker architecture

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

- Interactive diagram: https://gitdiagram.com/imad-18/windshield-quality-checker
- Repository: https://github.com/imad-18/windshield-quality-checker

## Overview

Windshield Quality Checker is a quality-control and traceability application: an operator starts a windshield test, the backend streams measurement readings, evaluates the result, records it, and may print a label. A separate dashboard provides historical results, statistics, and export. The README contains only the product title, so dashboard capabilities are supported by the sampled source rather than README documentation. Some internal modules were not excerpted; links to them rely on the SOURCE INDEX or are omitted where invocation is not shown.

Main entry points: [`backend/app.py`](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/app.py) (Test API), [`windshield-tester/src/app/components/windshield-home/home.component.ts`](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-home/home.component.ts) (Test Screen), [`backend/database.py`](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/database.py) (Database Sessions), [`backend/measurement.py`](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/measurement.py) (Measurement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Operator Interface"]
  node_home["Test Screen<br/>[home.component.ts]"]
  node_app_shell["App Shell<br/>[app.component.ts]"]
  node_routes["App Routes<br/>[app.routes.ts]"]
  node_dashboard_view["Dashboard View"]
  node_dashboard_client["Dashboard Client"]
end

subgraph group_testflow["Test Execution"]
  node_api["Test API<br/>[app.py]"]
  node_measurement["Measurement<br/>[measurement.py]"]
  node_evaluation["Evaluation<br/>[evaluation.py]"]
  node_printer["Label Printer<br/>[printer.py]"]
end

subgraph group_records["Records and Reporting"]
  node_dashboard_api["Dashboard API"]
  node_database["Database Sessions<br/>[database.py]"]
  node_test_model["Test Record Model<br/>[models.py]"]
  node_stored_tests[("Test Records<br/>[models.py]")]
end

subgraph group_services["Device and Preferences"]
  node_configuration["Runtime Settings<br/>[config.py]"]
  node_translation["Translations"]
  node_translate_pipe["Translation Pipe<br/>[translate.pipe.ts]"]
  node_theme["Theme Preferences<br/>[theme.service.ts]"]
end

node_operator(("Operator"))
node_power_supply["Power Supply"]
node_label_device["Label Printer Device"]

node_operator -->|"starts test"| node_home
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_dashboard_view
node_home -->|"streams test"| node_api
node_api -->|"reads readings"| node_measurement
node_api -->|"evaluates readings"| node_evaluation
node_api -->|"stores test"| node_database
node_api -->|"prints label"| node_printer
node_measurement -.->|"reads device"| node_power_supply
node_printer -.->|"prints to"| node_label_device
node_api -->|"registers routes"| node_dashboard_api
node_dashboard_view -->|"requests data"| node_dashboard_client
node_dashboard_client -.->|"calls endpoints"| node_dashboard_api
node_dashboard_api -->|"queries records"| node_database
node_database -->|"creates tables"| node_test_model
node_database -.->|"persists rows"| node_stored_tests
node_test_model -->|"defines schema"| node_stored_tests
node_app_shell -->|"uses preferences"| node_theme
node_app_shell -->|"selects language"| node_translation
node_home -->|"uses preferences"| node_theme
node_home -->|"selects language"| node_translation
node_translate_pipe -->|"translates text"| node_translation
node_measurement -->|"reads settings"| node_configuration
node_evaluation -->|"reads settings"| node_configuration
node_printer -->|"reads settings"| node_configuration

click node_home "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-home/home.component.ts"
click node_app_shell "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/app.component.ts"
click node_routes "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/app.routes.ts"
click node_dashboard_view "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-dashboard/dashboard.component.ts"
click node_dashboard_client "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-dashboard/dashboard.service.ts"
click node_api "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/app.py"
click node_measurement "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/measurement.py"
click node_evaluation "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/evaluation.py"
click node_printer "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/printer.py"
click node_dashboard_api "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/dashboard_router.py"
click node_database "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/database.py"
click node_test_model "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/models.py"
click node_configuration "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/config.py"
click node_translation "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/services/translate.service.ts"
click node_translate_pipe "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/pipes/translate.pipe.ts"
click node_theme "https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/services/theme.service.ts"
click node_stored_tests "https://github.com/imad-18/windshield-quality-checker/blob/main/backend/models.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_home,node_app_shell,node_routes,node_dashboard_view,node_dashboard_client toneBlue
class node_api,node_measurement,node_evaluation,node_printer toneAmber
class node_dashboard_api,node_database,node_test_model,node_stored_tests toneMint
class node_configuration,node_translation,node_translate_pipe,node_theme toneRose
class node_operator,node_power_supply,node_label_device toneIndigo
```

## Components

### Operator Interface

- [Test Screen](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-home/home.component.ts): `windshield-tester/src/app/components/windshield-home/home.component.ts`
- [App Shell](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/app.component.ts): `windshield-tester/src/app/app.component.ts`
- [App Routes](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/app.routes.ts): `windshield-tester/src/app/app.routes.ts`
- [Dashboard View](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-dashboard/dashboard.component.ts): `windshield-tester/src/app/components/windshield-dashboard/dashboard.component.ts`
- [Dashboard Client](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/components/windshield-dashboard/dashboard.service.ts): `windshield-tester/src/app/components/windshield-dashboard/dashboard.service.ts`

### Test Execution

- [Test API](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/app.py): `backend/app.py`
- [Measurement](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/measurement.py): `backend/measurement.py`
- [Evaluation](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/evaluation.py): `backend/evaluation.py`
- [Label Printer](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/printer.py): `backend/printer.py`

### Records and Reporting

- [Dashboard API](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/dashboard_router.py): `backend/dashboard_router.py`
- [Database Sessions](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/database.py): `backend/database.py`
- [Test Record Model](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/models.py): `backend/models.py`
- [Test Records](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/models.py): `backend/models.py`

### Device and Preferences

- [Runtime Settings](https://github.com/imad-18/windshield-quality-checker/blob/main/backend/config.py): `backend/config.py`
- [Translations](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/services/translate.service.ts): `windshield-tester/src/app/services/translate.service.ts`
- [Translation Pipe](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/pipes/translate.pipe.ts): `windshield-tester/src/app/pipes/translate.pipe.ts`
- [Theme Preferences](https://github.com/imad-18/windshield-quality-checker/blob/main/windshield-tester/src/app/services/theme.service.ts): `windshield-tester/src/app/services/theme.service.ts`

### Other components

- **Operator**
- **Power Supply**
- **Label Printer Device**

## Connections

- Operator → Test Screen: starts test (evidence: `windshield-tester/src/app/components/windshield-home/home.component.ts`)
- App Routes → Test Screen: routes to (evidence: `windshield-tester/src/app/app.routes.ts`)
- App Routes → Dashboard View: routes to (evidence: `windshield-tester/src/app/app.routes.ts`)
- Test Screen → Test API: streams test (evidence: `windshield-tester/src/app/components/windshield-home/home.component.ts`)
- Test API → Measurement: reads readings (evidence: `backend/app.py`)
- Test API → Evaluation: evaluates readings (evidence: `backend/app.py`)
- Test API → Database Sessions: stores test (evidence: `backend/app.py`)
- Test API → Label Printer: prints label (evidence: `backend/app.py`)
- Measurement → Power Supply: reads device
- Label Printer → Label Printer Device: prints to
- Test API → Dashboard API: registers routes (evidence: `backend/app.py`)
- Dashboard View → Dashboard Client: requests data (evidence: `windshield-tester/src/app/components/windshield-dashboard/dashboard.component.ts`)
- Dashboard Client → Dashboard API: calls endpoints
- Dashboard API → Database Sessions: queries records (evidence: `backend/dashboard_router.py`)
- Database Sessions → Test Record Model: creates tables (evidence: `backend/database.py`)
- Database Sessions → Test Records: persists rows (evidence: `backend/database.py`)
- Test Record Model → Test Records: defines schema (evidence: `backend/models.py`)
- App Shell → Theme Preferences: uses preferences (evidence: `windshield-tester/src/app/app.component.ts`)
- App Shell → Translations: selects language (evidence: `windshield-tester/src/app/app.component.ts`)
- Test Screen → Theme Preferences: uses preferences (evidence: `windshield-tester/src/app/components/windshield-home/home.component.ts`)
- Test Screen → Translations: selects language (evidence: `windshield-tester/src/app/components/windshield-home/home.component.ts`)
- Translation Pipe → Translations: translates text (evidence: `windshield-tester/src/app/pipes/translate.pipe.ts`)
- Measurement → Runtime Settings: reads settings (evidence: `backend/measurement.py`)
- Evaluation → Runtime Settings: reads settings (evidence: `backend/evaluation.py`)
- Label Printer → Runtime Settings: reads settings (evidence: `backend/printer.py`)
