# topjohnnywu/do-insight-system-v5 architecture

> Architecture diagram of the GitHub repository topjohnnywu/do-insight-system-v5, 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/topjohnnywu/do-insight-system-v5
- Repository: https://github.com/topjohnnywu/do-insight-system-v5

## Overview

DO Insight is a client-side delivery-order analytics and logistics planning suite, with an optional Express server for static hosting and AI proxying. The main workflow is to load spreadsheet or CSV data, analyze or plan the resulting DOs, and review or export operational outputs. The README also documents specialized analytics, packing, and OCR capabilities; several are represented as feature nodes because their source files were not sampled. Edges reflect documented workflows, not inspected call chains.

Main entry points: [`packing-sheet/js/App.js`](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/App.js) (Packing sheet app), [`js/app.js`](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/app.js) (Summary analytics), [`js/do_summary_generator.js`](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_summary_generator.js) (DO summary generator), [`js/truck_planning.js`](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/truck_planning.js) (Truck planning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data and DO analysis"]
  node_file_input["DO file input"]
  node_summary["Summary analytics<br/>[app.js]"]
  node_do_summary["DO summary generator"]
  node_do_details["DO details inspector"]
  node_ocr["OCR scanning"]
end

subgraph group_planning["Load planning"]
  node_truck_planning["Truck planning<br/>[truck_planning.js]"]
  node_manual_planning["Manual truck planning"]
  node_do_load["DO load planner<br/>[do_load_planner.js]"]
  node_loose_load["Loose load planner"]
  node_volume_capacity["Volume and capacity"]
end

subgraph group_insights["Operational insights"]
  node_batch_analytics["Batch analytics<br/>[batch_analytics.js]"]
  node_activity_trend["DO activity trends"]
  node_challenger["Challenger list<br/>[challenger_list.js]"]
  node_shipping_insight["Shipping insights"]
end

subgraph group_packing["Packing sheets"]
  node_packing_app["Packing sheet app<br/>[App.js]"]
  node_packing_form["Packing manifest form"]
  node_lookup_parser["Master lookup parser<br/>[lookupParser.js]"]
  node_excel_export["Packing exports<br/>[excelExport.js]"]
end

subgraph group_platform["Runtime and shared tools"]
  node_parsers["Spreadsheet parsers<br/>[parsers.js]"]
  node_xlsx["XLSX engine<br/>[xlsx.bundle.js]"]
  node_server["Optional web server<br/>[server.js]"]
end

node_user(("Operations user"))
node_report["Operational reports and plans"]

node_user -->|"uploads data"| node_file_input
node_file_input -->|"parses files"| node_parsers
node_parsers -.->|"feeds analysis"| node_summary
node_user -->|"reviews metrics"| node_summary
node_user -->|"cleans DOs"| node_do_summary
node_user -->|"looks up DOs"| node_do_details
node_user -->|"plans trucks"| node_truck_planning
node_user -->|"assigns loads"| node_manual_planning
node_user -->|"plans DO loads"| node_do_load
node_user -->|"packs cartons"| node_loose_load
node_user -->|"simulates capacity"| node_volume_capacity
node_user -->|"analyzes waves"| node_batch_analytics
node_user -->|"reviews trends"| node_activity_trend
node_user -->|"reviews priorities"| node_challenger
node_user -->|"analyzes shipping"| node_shipping_insight
node_user -.->|"creates manifests"| node_packing_app
node_packing_app -->|"renders form"| node_packing_form
node_packing_app -->|"uses lookup"| node_lookup_parser
node_packing_app -->|"exports sheets"| node_excel_export
node_user -->|"scans documents"| node_ocr
node_user -.->|"opens platform"| node_server
node_summary -->|"exports results"| node_report
node_do_summary -->|"exports report"| node_report
node_truck_planning -->|"exports manifest"| node_report
node_manual_planning -->|"exports plan"| node_report
node_do_load -->|"exports sequence"| node_report

click node_parsers "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/parsers.js"
click node_xlsx "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/xlsx.bundle.js"
click node_summary "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/app.js"
click node_do_summary "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_summary_generator.js"
click node_truck_planning "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/truck_planning.js"
click node_manual_planning "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/manual_truck_planning.js"
click node_do_load "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_load_planner.js"
click node_loose_load "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/loose_load_planner.js"
click node_volume_capacity "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/volume_capacity_planner.js"
click node_batch_analytics "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/batch_analytics.js"
click node_activity_trend "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_activity_trend.js"
click node_challenger "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/challenger_list.js"
click node_packing_app "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/App.js"
click node_packing_form "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/components/PackingSheetForm.js"
click node_lookup_parser "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/utils/lookupParser.js"
click node_excel_export "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/utils/excelExport.js"
click node_server "https://github.com/topjohnnywu/do-insight-system-v5/blob/main/server.js"

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_file_input,node_summary,node_do_summary,node_do_details,node_ocr,node_user toneBlue
class node_truck_planning,node_manual_planning,node_do_load,node_loose_load,node_volume_capacity toneAmber
class node_batch_analytics,node_activity_trend,node_challenger,node_shipping_insight toneMint
class node_packing_app,node_packing_form,node_lookup_parser,node_excel_export toneRose
class node_parsers,node_xlsx,node_server,node_report toneIndigo
```

## Components

### Data and DO analysis

- **DO file input**
- [Summary analytics](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/app.js): `js/app.js`
- [DO summary generator](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_summary_generator.js): `js/do_summary_generator.js`
- **DO details inspector**
- **OCR scanning**

### Load planning

- [Truck planning](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/truck_planning.js): `js/truck_planning.js`
- [Manual truck planning](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/manual_truck_planning.js): `js/manual_truck_planning.js`
- [DO load planner](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_load_planner.js): `js/do_load_planner.js`
- [Loose load planner](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/loose_load_planner.js): `js/loose_load_planner.js`
- [Volume and capacity](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/volume_capacity_planner.js): `js/volume_capacity_planner.js`

### Operational insights

- [Batch analytics](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/batch_analytics.js): `js/batch_analytics.js`
- [DO activity trends](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/do_activity_trend.js): `js/do_activity_trend.js`
- [Challenger list](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/challenger_list.js): `js/challenger_list.js`
- **Shipping insights**

### Packing sheets

- [Packing sheet app](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/App.js): `packing-sheet/js/App.js`
- [Packing manifest form](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/components/PackingSheetForm.js): `packing-sheet/js/components/PackingSheetForm.js`
- [Master lookup parser](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/utils/lookupParser.js): `packing-sheet/js/utils/lookupParser.js`
- [Packing exports](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/packing-sheet/js/utils/excelExport.js): `packing-sheet/js/utils/excelExport.js`

### Runtime and shared tools

- [Spreadsheet parsers](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/parsers.js): `js/parsers.js`
- [XLSX engine](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/js/xlsx.bundle.js): `js/xlsx.bundle.js`
- [Optional web server](https://github.com/topjohnnywu/do-insight-system-v5/blob/main/server.js): `server.js`

### Other components

- **Operations user**
- **Operational reports and plans**

## Connections

- Operations user → DO file input: uploads data
- DO file input → Spreadsheet parsers: parses files
- Spreadsheet parsers → Summary analytics: feeds analysis
- Operations user → Summary analytics: reviews metrics
- Operations user → DO summary generator: cleans DOs
- Operations user → DO details inspector: looks up DOs
- Operations user → Truck planning: plans trucks
- Operations user → Manual truck planning: assigns loads
- Operations user → DO load planner: plans DO loads
- Operations user → Loose load planner: packs cartons
- Operations user → Volume and capacity: simulates capacity
- Operations user → Batch analytics: analyzes waves
- Operations user → DO activity trends: reviews trends
- Operations user → Challenger list: reviews priorities
- Operations user → Shipping insights: analyzes shipping
- Operations user → Packing sheet app: creates manifests
- Packing sheet app → Packing manifest form: renders form (evidence: `packing-sheet/js/App.js`)
- Packing sheet app → Master lookup parser: uses lookup (evidence: `packing-sheet/js/App.js`)
- Packing sheet app → Packing exports: exports sheets (evidence: `packing-sheet/js/App.js`)
- Operations user → OCR scanning: scans documents
- Operations user → Optional web server: opens platform
- Summary analytics → Operational reports and plans: exports results
- DO summary generator → Operational reports and plans: exports report
- Truck planning → Operational reports and plans: exports manifest
- Manual truck planning → Operational reports and plans: exports plan
- DO load planner → Operational reports and plans: exports sequence
