How wingtm-lang/machine-asset-location works
PT.WINNERS Machine Asset Location Tracker is a multi-site sewing-machine asset management app. Users sign in, then navigate from the main app to inventory, movement, transfers, stocktaking, history, reports, administration, or WH2 rack mapping; the views use shared services to read and update server-backed asset data. The graph includes the documented Supabase authentication and storage layers, plus the rack-map and user-management paths. Some view-to-service edges rely on the SOURCE INDEX import references; unsampled implementation details and backend schema are not inferred.
Main entry points: App.tsx App navigation · storage.ts Asset data service · RackMapView.tsx Rack map view · MachineDetailModal.tsx Machine details
Components 31
Application shell
- App navigation
src/App.tsx - Home
src/views/HomeView.tsx
Identity and access
- Login
src/components/LoginPage.tsx - Auth context
src/services/authContext.tsx - Supabase auth
src/services/authService.ts - User management
src/views/UserManagementView.tsx - Admin users function
supabase/functions/admin-users/index.ts
Asset operations
- Dashboard
src/views/DashboardView.tsx - Machine inventory
src/views/MachinesListView.tsx - Move machines
src/views/MoveView.tsx - Site transfers
src/views/TransfersView.tsx - Stocktaking
src/views/OpnameView.tsx - Movement history
src/views/HistoryView.tsx - Reports
src/views/ReportsView.tsx - Administration
src/views/AdminView.tsx - Barcode scanner
src/components/ScannerModal.tsx - Machine details
src/components/MachineDetailModal.tsx
Warehouse mapping
- Rack map view
src/views/RackMapView.tsx - Room map
src/components/rackmap/RoomMap.tsx - Rack detail
src/components/rackmap/RackDetail.tsx - Rack slot panel
src/components/rackmap/SlotPanel.tsx - Rack map service
src/services/rackMapService.ts
Shared services
- Asset data service
src/services/storage.ts - Supabase
src/services/supabase.ts - User/admin service
src/services/gasAuthService.ts - Data exporter
src/services/gasExporter.ts - Pagination
src/components/Pagination.tsx - Sound feedback
src/services/sound.ts - Translations
src/services/translations.ts - Machine labels
src/utils/machineName.ts
Other components
- User
Connections 46
- User → Login: signs in
- Login → Auth context: uses session
src/components/LoginPage.tsx - Auth context → Supabase auth: restores session
src/services/authContext.tsx - Supabase auth → Supabase: authenticates
src/services/authService.ts - App navigation → Auth context: checks access
src/App.tsx - App navigation → Home: routes to
src/App.tsx - App navigation → Dashboard: routes to
src/App.tsx - App navigation → Machine inventory: routes to
src/App.tsx - App navigation → Move machines: routes to
src/App.tsx - App navigation → Site transfers: routes to
src/App.tsx - App navigation → Stocktaking: routes to
src/App.tsx - App navigation → Movement history: routes to
src/App.tsx - App navigation → Reports: routes to
src/App.tsx - App navigation → Administration: routes to
src/App.tsx - App navigation → Rack map view: routes to
src/App.tsx - App navigation → Barcode scanner: opens scanner
src/App.tsx - App navigation → Machine details: opens details
src/App.tsx - User management → Auth context: uses access context
src/views/UserManagementView.tsx - User management → User/admin service: manages accounts
src/views/UserManagementView.tsx - User/admin service → Admin users function: invokes function
src/services/gasAuthService.ts - Dashboard → Asset data service: reads assets
src/views/DashboardView.tsx - Machine inventory → Asset data service: reads assets
src/views/MachinesListView.tsx - Move machines → Asset data service: moves assets
src/views/MoveView.tsx - Site transfers → Asset data service: updates transfers
src/views/TransfersView.tsx - Stocktaking → Asset data service: records counts
src/views/OpnameView.tsx - Movement history → User/admin service: loads history
src/views/HistoryView.tsx - Reports → Asset data service: reads records
src/views/ReportsView.tsx - Administration → Asset data service: manages data
src/views/AdminView.tsx - Administration → Data exporter: exports data
src/views/AdminView.tsx - Asset data service → Supabase: reads and writes
src/services/storage.ts - Asset data service → Supabase auth: signals auth failure
src/services/storage.ts - Rack map view → Rack map service: loads rack data
src/views/RackMapView.tsx - Rack map view → Room map: renders
src/views/RackMapView.tsx - Rack map view → Rack detail: renders
src/views/RackMapView.tsx - Rack map view → Rack slot panel: renders
src/views/RackMapView.tsx - Room map → Rack map service: reads map data
src/components/rackmap/RoomMap.tsx - Rack detail → Rack map service: reads rack data
src/components/rackmap/RackDetail.tsx - Rack slot panel → Rack detail: uses rack detail
src/components/rackmap/SlotPanel.tsx - Rack map service → Asset data service: moves machine
src/services/rackMapService.ts - Machine details → Machine labels: formats labels
src/components/MachineDetailModal.tsx - Machine details → Asset data service: reads machine records
src/components/MachineDetailModal.tsx - Machine details → Pagination: uses pagination
src/components/MachineDetailModal.tsx - Barcode scanner → Asset data service: looks up assets
src/components/ScannerModal.tsx - Barcode scanner → Sound feedback: plays feedback
src/components/ScannerModal.tsx - Site transfers → Translations: localizes labels
src/views/TransfersView.tsx - Stocktaking → Sound feedback: plays feedback
src/views/OpnameView.tsx