How hammadali-185/industrial-weight-ticket-system works
Industrial Weight Ticket System is an Electron desktop application for textile operations. Its main workflow reads weight-indicator data, detects stable readings, presents them live, and supports fabric-roll ticket creation and printing. Separate screens manage generated lists, weight history, inventory, and payments; local persistence and Google Drive backup support those workflows. The graph combines explicit React routing and sampled calls with README-documented capabilities. Some page internals and the Electron bridge implementation were not sampled, so uncertain links are omitted.
Main entry points: storage.js Storage Utility · App.jsx Application Router · main.cjs Electron Main · serialManager.cjs Serial Manager
Components 20
Desktop Runtime
- Application Router
weight-dashboard/src/App.jsx - Electron Main
weight-dashboard/main.cjs - Native Bridge
weight-dashboard/preload.cjs
Weight Capture
- Weighing Indicator
- Serial Manager
weight-dashboard/main/serialManager.cjs - Serial Connection Hook
weight-dashboard/src/hooks/useSerialConnection.js - Weight Context
weight-dashboard/src/context/WeightContext.jsx - Live Weight
weight-dashboard/src/pages/LiveWeight.jsx - Weight Display
weight-dashboard/src/components/WeightDisplay.jsx - Connection Logs
weight-dashboard/src/components/LogsPanel.jsx
Production Operations
- Ticket Generator
weight-dashboard/src/pages/TicketGenerator.jsx - Generate List
weight-dashboard/src/pages/GenerateList.jsx - History Management
weight-dashboard/src/pages/History.jsx - Inventory
weight-dashboard/src/pages/Inventory.jsx - Payments
weight-dashboard/src/pages/Payment.jsx
Persistence And Backup
- Storage Utility
weight-dashboard/src/utils/storage.js - Local Application Data
- Google Drive
- Drive Service
weight-dashboard/main/googleDriveService.cjs
Other components
- Operator
Connections 35
- Operator → Application Router: uses
- Application Router → Weight Context: provides
weight-dashboard/src/App.jsx - Application Router → Live Weight: routes to
weight-dashboard/src/App.jsx - Application Router → Ticket Generator: routes to
weight-dashboard/src/App.jsx - Application Router → Generate List: routes to
weight-dashboard/src/App.jsx - Application Router → History Management: routes to
weight-dashboard/src/App.jsx - Application Router → Payments: routes to
weight-dashboard/src/App.jsx - Application Router → Inventory: routes to
weight-dashboard/src/App.jsx - Weight Context → Serial Connection Hook: uses
weight-dashboard/src/context/WeightContext.jsx - Serial Connection Hook → Serial Manager: receives readings
weight-dashboard/src/hooks/useSerialConnection.js - Weighing Indicator → Serial Manager: sends readings
- Serial Manager → Weighing Indicator: scans ports
weight-dashboard/main/serialManager.cjs - Serial Manager → Weight Context: emits weight
- Weight Context → Live Weight: provides state
weight-dashboard/src/pages/LiveWeight.jsx - Live Weight → Weight Display: renders
weight-dashboard/src/pages/LiveWeight.jsx - Live Weight → Connection Logs: renders
weight-dashboard/src/pages/LiveWeight.jsx - Electron Main → Serial Manager: starts
weight-dashboard/main.cjs - Electron Main → Drive Service: calls
weight-dashboard/main.cjs - Electron Main → Native Bridge: exposes bridge
- Ticket Generator → Weight Context: uses weight
weight-dashboard/src/pages/TicketGenerator.jsx - Ticket Generator → Operator: prints tickets
- Ticket Generator → Operator: generates QR
- Generate List → Storage Utility: loads inventory
weight-dashboard/src/pages/GenerateList.jsx - Generate List → Storage Utility: saves records
weight-dashboard/src/pages/GenerateList.jsx - History Management → Storage Utility: manages history
weight-dashboard/src/pages/History.jsx - Inventory → Storage Utility: persists stock
weight-dashboard/src/pages/Inventory.jsx - Payments → Storage Utility: persists payments
weight-dashboard/src/pages/Payment.jsx - Storage Utility → Native Bridge: calls native API
weight-dashboard/src/utils/storage.js - Native Bridge → Electron Main: forwards requests
- Electron Main → Local Application Data: reads and writes
weight-dashboard/main.cjs - Storage Utility → Local Application Data: uses web storage
- History Management → Storage Utility: backs up history
weight-dashboard/src/pages/History.jsx - Storage Utility → Native Bridge: requests Drive
weight-dashboard/src/utils/storage.js - Electron Main → Drive Service: handles auth and upload
weight-dashboard/main.cjs - Drive Service → Google Drive: uploads history
weight-dashboard/main/googleDriveService.cjs