# dvi-dgsw-26/dvi-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/dvi-dgsw-26/dvi-frontend
- Repository: https://github.com/dvi-dgsw-26/dvi-frontend

## Overview

This is a role-based factory quality-control web app: users authenticate, enter role-specific inspection and quality workflows, and review operational status and reports. The route table establishes the main user-to-page flow; the monitor additionally combines REST snapshots with a live event stream. The graph preserves major product areas visible in the source index and route excerpt. Several feature implementations and their internal API wiring were not sampled, so those relationships are not inferred.

Main entry points: [`src/App.tsx`](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/App.tsx) (App router), [`src/features/monitor/api/useMonitorStream.ts`](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/monitor/api/useMonitorStream.ts) (Monitor stream), [`src/features/auth/AuthContext.tsx`](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/auth/AuthContext.tsx) (Authentication), [`src/lib/http.ts`](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/http.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_app["App router<br/>[App.tsx]"]
  node_layout["Layout<br/>[Layout.tsx]"]
  node_notifications["Notifications"]
end

subgraph group_identity["Identity and access"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_authstorage[("Session storage<br/>[tokenStorage.ts]")]
end

subgraph group_quality["Inspection and quality"]
  node_inspection["Inspection measure"]
  node_inspectionresult["Inspection result"]
  node_crosscheck["Cross-check workflow"]
  node_incomplete["Incomplete approvals"]
  node_monitor["Live monitor<br/>[MonitorPage.tsx]"]
  node_stream["Monitor stream"]
end

subgraph group_operations["Operations and records"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_production["Production home"]
  node_orders["Inspection orders"]
  node_masterdata["Master data<br/>[ProductsPage.tsx]"]
  node_reports["Inspection reports<br/>[ReportPage.tsx]"]
  node_tryout["Tryout reports"]
end

subgraph group_platform["Shared runtime"]
  node_http["HTTP client<br/>[http.ts]"]
  node_server["API server selection<br/>[apiServer.ts]"]
  node_dictionary["Data translation<br/>[dataDictionary.ts]"]
  node_viewstate["View state<br/>[viewState.ts]"]
end

node_user(("Factory user"))
node_backend[("Quality backend")]

node_user -->|"opens"| node_app
node_app -->|"checks session"| node_auth
node_app -->|"renders routes"| node_layout
node_app -->|"routes to"| node_production
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_inspection
node_app -->|"routes to"| node_inspectionresult
node_app -->|"routes to"| node_crosscheck
node_app -->|"routes to"| node_incomplete
node_app -->|"routes to"| node_monitor
node_app -->|"routes to"| node_orders
node_app -->|"routes to"| node_masterdata
node_app -->|"routes to"| node_reports
node_app -->|"routes to"| node_tryout
node_app -->|"routes to"| node_notifications
node_auth -->|"reads and writes"| node_authstorage
node_auth -->|"clears state"| node_viewstate
node_http -->|"selects base URL"| node_server
node_http -->|"installs translation"| node_dictionary
node_monitor -->|"subscribes"| node_stream
node_stream -->|"fetches stream"| node_backend
node_stream -->|"selects stream URL"| node_server
node_stream -->|"translates events"| node_dictionary

click node_app "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/App.tsx"
click node_layout "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/components/layout/Layout.tsx"
click node_auth "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/auth/AuthContext.tsx"
click node_authstorage "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/auth/api/tokenStorage.ts"
click node_dashboard "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/dashboard/ui/DashboardPage.tsx"
click node_production "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/my-inspection/ui/ProductionHomePage.tsx"
click node_inspection "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection/ui/InspectionMeasurePage.tsx"
click node_inspectionresult "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection/ui/InspectionResultPage.tsx"
click node_crosscheck "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/cross-check/ui/CrossCheckMeasurePage.tsx"
click node_incomplete "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/incomplete/ui/ApprovalManagementPage.tsx"
click node_monitor "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/monitor/ui/MonitorPage.tsx"
click node_stream "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/monitor/api/useMonitorStream.ts"
click node_orders "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection-orders/ui/InspectionOrdersPage.tsx"
click node_masterdata "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/products/ui/ProductsPage.tsx"
click node_reports "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/report/ui/ReportPage.tsx"
click node_tryout "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/tryout-report/ui/TryoutReportListPage.tsx"
click node_notifications "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/notification/ui/NotificationPage.tsx"
click node_http "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/http.ts"
click node_server "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/apiServer.ts"
click node_dictionary "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/dataDictionary.ts"
click node_viewstate "https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/viewState.ts"

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,node_layout,node_notifications,node_user toneBlue
class node_auth,node_authstorage,node_backend toneAmber
class node_inspection,node_inspectionresult,node_crosscheck,node_incomplete,node_monitor,node_stream toneMint
class node_dashboard,node_production,node_orders,node_masterdata,node_reports,node_tryout toneRose
class node_http,node_server,node_dictionary,node_viewstate toneIndigo
```

## Components

### Application shell

- [App router](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/App.tsx): `src/App.tsx`
- [Layout](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/components/layout/Layout.tsx): `src/components/layout/Layout.tsx`
- [Notifications](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/notification/ui/NotificationPage.tsx): `src/features/notification/ui/NotificationPage.tsx`

### Identity and access

- [Authentication](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/auth/AuthContext.tsx): `src/features/auth/AuthContext.tsx`
- [Session storage](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/auth/api/tokenStorage.ts): `src/features/auth/api/tokenStorage.ts`

### Inspection and quality

- [Inspection measure](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection/ui/InspectionMeasurePage.tsx): `src/features/inspection/ui/InspectionMeasurePage.tsx`
- [Inspection result](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection/ui/InspectionResultPage.tsx): `src/features/inspection/ui/InspectionResultPage.tsx`
- [Cross-check workflow](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/cross-check/ui/CrossCheckMeasurePage.tsx): `src/features/cross-check/ui/CrossCheckMeasurePage.tsx`
- [Incomplete approvals](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/incomplete/ui/ApprovalManagementPage.tsx): `src/features/incomplete/ui/ApprovalManagementPage.tsx`
- [Live monitor](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/monitor/ui/MonitorPage.tsx): `src/features/monitor/ui/MonitorPage.tsx`
- [Monitor stream](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/monitor/api/useMonitorStream.ts): `src/features/monitor/api/useMonitorStream.ts`

### Operations and records

- [Dashboard](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/dashboard/ui/DashboardPage.tsx): `src/features/dashboard/ui/DashboardPage.tsx`
- [Production home](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/my-inspection/ui/ProductionHomePage.tsx): `src/features/my-inspection/ui/ProductionHomePage.tsx`
- [Inspection orders](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/inspection-orders/ui/InspectionOrdersPage.tsx): `src/features/inspection-orders/ui/InspectionOrdersPage.tsx`
- [Master data](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/products/ui/ProductsPage.tsx): `src/features/products/ui/ProductsPage.tsx`
- [Inspection reports](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/report/ui/ReportPage.tsx): `src/features/report/ui/ReportPage.tsx`
- [Tryout reports](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/features/tryout-report/ui/TryoutReportListPage.tsx): `src/features/tryout-report/ui/TryoutReportListPage.tsx`

### Shared runtime

- [HTTP client](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/http.ts): `src/lib/http.ts`
- [API server selection](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/apiServer.ts): `src/lib/apiServer.ts`
- [Data translation](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/dataDictionary.ts): `src/lib/dataDictionary.ts`
- [View state](https://github.com/dvi-dgsw-26/dvi-frontend/blob/main/src/lib/viewState.ts): `src/lib/viewState.ts`

### Other components

- **Factory user**
- **Quality backend**

## Connections

- Factory user → App router: opens
- App router → Authentication: checks session (evidence: `src/App.tsx`)
- App router → Layout: renders routes (evidence: `src/App.tsx`)
- App router → Production home: routes to (evidence: `src/App.tsx`)
- App router → Dashboard: routes to (evidence: `src/App.tsx`)
- App router → Inspection measure: routes to (evidence: `src/App.tsx`)
- App router → Inspection result: routes to (evidence: `src/App.tsx`)
- App router → Cross-check workflow: routes to (evidence: `src/App.tsx`)
- App router → Incomplete approvals: routes to (evidence: `src/App.tsx`)
- App router → Live monitor: routes to (evidence: `src/App.tsx`)
- App router → Inspection orders: routes to (evidence: `src/App.tsx`)
- App router → Master data: routes to (evidence: `src/App.tsx`)
- App router → Inspection reports: routes to (evidence: `src/App.tsx`)
- App router → Tryout reports: routes to (evidence: `src/App.tsx`)
- App router → Notifications: routes to (evidence: `src/App.tsx`)
- Authentication → Session storage: reads and writes (evidence: `src/features/auth/AuthContext.tsx`)
- Authentication → View state: clears state (evidence: `src/features/auth/AuthContext.tsx`)
- HTTP client → API server selection: selects base URL (evidence: `src/lib/http.ts`)
- HTTP client → Data translation: installs translation (evidence: `src/lib/http.ts`)
- Live monitor → Monitor stream: subscribes (evidence: `src/features/monitor/ui/MonitorPage.tsx`)
- Monitor stream → Quality backend: fetches stream (evidence: `src/features/monitor/api/useMonitorStream.ts`)
- Monitor stream → API server selection: selects stream URL (evidence: `src/features/monitor/api/useMonitorStream.ts`)
- Monitor stream → Data translation: translates events (evidence: `src/features/monitor/api/useMonitorStream.ts`)
