How farfar2/gudangappfixed works
GudangApp is a warehouse-management web app. Users sign in, then navigate role-filtered screens to maintain SKU and category records, receive or dispatch stock, and review inventory, purchasing, audit, and analytics information. The main operational path runs from scan or purchase-order actions through shared inventory state to Supabase-backed records; AuthContext supplies identity and the database enforces role permissions with RLS. The README documents the role model and RLS, while several view-to-context relationships are supported by the SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: App.tsx App router · InventoryContext.tsx Inventory state and actions · AuthContext.tsx Authentication · BarcodeLabelsView.tsx Barcode labels
Components 24
Application and access
- App router
src/App.tsx - Authentication
src/context/AuthContext.tsx - Role-aware navigation
src/components/layout/Sidebar.tsx - Login screen
src/views/LoginView.tsx
Warehouse operations
- Scan in
src/views/ScanInView.tsx - Scan out
src/views/ScanOutView.tsx - Inventory status
src/views/InventoryView.tsx - Barcode labels
src/views/BarcodeLabelsView.tsx - Barcode renderer
src/components/common/BarcodeRenderer.tsx
Catalog and procurement
- SKU management
src/views/SkuManagementView.tsx - Category management
src/views/CategoryManagementView.tsx - User management
src/views/UserManagementView.tsx - Purchase orders
src/views/PurchaseOrdersView.tsx
Reporting and analysis
- Restock calculator
src/views/RestockCalculatorView.tsx - Dashboard
src/views/DashboardView.tsx - Analytics
src/views/AnalyticsView.tsx - Audit log
src/views/AuditLogView.tsx
Shared data services
- Inventory state and actions
src/context/InventoryContext.tsx - Sample data
src/lib/seedData.ts - Warehouse data types
src/types/database.ts - Supabase client
src/lib/supabase.ts - Database policies and schema
supabase/schema_additions.sql
Other components
- Warehouse user
- Supabase platform
Connections 39
- Warehouse user → App router: uses
- App router → Authentication: provides auth
src/App.tsx - App router → Inventory state and actions: provides state
src/App.tsx - App router → Login screen: shows when signed out
src/App.tsx - App router → Role-aware navigation: routes navigation
src/App.tsx - App router → Scan in: routes scan-in
src/App.tsx - App router → Scan out: routes scan-out
src/App.tsx - App router → Inventory status: routes inventory
src/App.tsx - App router → SKU management: routes catalog
src/App.tsx - App router → Category management: routes categories
src/App.tsx - App router → User management: routes users
src/App.tsx - App router → Purchase orders: routes orders
src/App.tsx - App router → Restock calculator: routes restock
src/App.tsx - App router → Dashboard: routes dashboard
src/App.tsx - App router → Analytics: routes analytics
src/App.tsx - App router → Audit log: routes audit
src/App.tsx - App router → Barcode labels: routes labels
src/App.tsx - Authentication → Supabase client: authenticates via
src/context/AuthContext.tsx - Authentication → Sample data: uses fallback profiles
src/context/AuthContext.tsx - Role-aware navigation → Authentication: reads user role
src/components/layout/Sidebar.tsx - Login screen → Authentication: signs in through
src/views/LoginView.tsx - Scan in → Inventory state and actions: records receipt
src/views/ScanInView.tsx - Scan out → Inventory state and actions: records dispatch
src/views/ScanOutView.tsx - Inventory status → Inventory state and actions: reads inventory
src/views/InventoryView.tsx - SKU management → Inventory state and actions: uses catalog state
src/views/SkuManagementView.tsx - Purchase orders → Inventory state and actions: uses order actions
src/views/PurchaseOrdersView.tsx - Restock calculator → Inventory state and actions: reads stock data
src/views/RestockCalculatorView.tsx - Dashboard → Inventory state and actions: reads summaries
src/views/DashboardView.tsx - Analytics → Inventory state and actions: reads inventory data
src/views/AnalyticsView.tsx - Audit log → Inventory state and actions: reads movement data
src/views/AuditLogView.tsx - Barcode labels → Inventory state and actions: reads SKU data
src/views/BarcodeLabelsView.tsx - Barcode labels → Barcode renderer: renders labels
src/views/BarcodeLabelsView.tsx - Inventory state and actions → Supabase client: loads and writes
src/context/InventoryContext.tsx - Inventory state and actions → Sample data: uses fallback data
src/context/InventoryContext.tsx - Inventory state and actions → Authentication: checks current user
src/context/InventoryContext.tsx - Authentication → Warehouse data types: uses profile types
src/context/AuthContext.tsx - Inventory state and actions → Warehouse data types: uses domain types
src/context/InventoryContext.tsx - Supabase client → Supabase platform: connects to
src/lib/supabase.ts - Database policies and schema → Supabase platform: defines RLS schema
README.md