How sahebpaper/saheb-paper works
Saheb Paper is a multi-role paper-mill ERP spanning shop-floor production through inventory and dispatch. The principal workflow follows documented material and reel traceability, from raw-material receipt and pulping through machine rolls, rewinding, quality checks, finished stock, and dispatch; the app also covers utilities, stores, reporting, and administration. The route map and several shared data/authentication relationships are visible in excerpts and the source index. Most domain screens were not sampled, so their internal calls are not inferred.
Main entry points: App.tsx ERP routes · AuthContext.tsx Login and sessions · RewinderView.tsx Rewinder conversion · index.ts Operational records
Components 25
Access and app shell
- ERP routes
src/App.tsx - Login and sessions
src/modules/auth/AuthContext.tsx - Role route guard
src/modules/auth/ProtectedRoute.tsx - ERP shell
src/components/Layout.tsx
Mill operations
- Raw material inward
src/modules/raw-material/RawMaterialView.tsx - Pulp mill batches
src/modules/pulp-mill/PulpMillView.tsx - Machine production
src/modules/machine/MachineView.tsx - Rewinder conversion
src/modules/rewinder/RewinderView.tsx - QC laboratory
src/modules/lab/LabView.tsx
Inventory and dispatch
- Label studio
src/modules/label-studio/LabelStudioView.tsx - Finished stock
src/modules/finish-stock/FinishStockView.tsx - Customer orders
src/modules/orders/OrdersView.tsx - Dispatch challans
src/modules/dispatch/DispatchView.tsx - Spare parts store
src/modules/store/StoreView.tsx
Utilities and oversight
- Dashboard analytics
src/modules/dashboard/DashboardView.tsx - Management reports
src/modules/reports/ReportsView.tsx - Utilities telemetry
src/modules/boiler/BoilerView.tsx - ETP operations
src/modules/etp/EtpView.tsx - Electricity logs
src/modules/electricity/ElectricityView.tsx - Administration
src/modules/admin/AdminMasters.tsx
Shared data services
- PIN security
src/lib/security.ts - Operational records
src/data/index.ts - Cloud synchronization
src/lib/supabaseSync.ts - Supabase
src/lib/supabase.ts
Other components
- Mill user
Connections 22
- Mill user → ERP routes: uses
- ERP routes → Login and sessions: provides context
src/App.tsx - ERP routes → Role route guard: routes through
src/App.tsx - ERP routes → ERP shell: wraps screens
src/App.tsx - Login and sessions → Operational records: loads users
src/modules/auth/AuthContext.tsx - Login and sessions → PIN security: verifies PIN
src/modules/auth/AuthContext.tsx - Operational records → PIN security: uses PIN helpers
src/data/index.ts - Operational records → Cloud synchronization: pushes changes
src/data/index.ts - Cloud synchronization → Supabase: uses client
src/lib/supabaseSync.ts - Raw material inward → Pulp mill batches: feeds traceability
- Pulp mill batches → Machine production: batch to rolls
- Machine production → Rewinder conversion: parent rolls
- Rewinder conversion → QC laboratory: reels for testing
- Rewinder conversion → Label studio: generates QR tags
- QC laboratory → Finished stock: grades stock
- Finished stock → Dispatch challans: allocates stock
- Customer orders → Dispatch challans: fulfills orders
- Spare parts store → Administration: supports oversight
- Dashboard analytics → Management reports: analytics capability
- Mill user → Utilities telemetry: logs shifts
- Mill user → ETP operations: logs compliance
- Mill user → Electricity logs: logs readings