How aryansingh257/inven3 works
Inven3 is an offline inventory and point-of-sale app for small shops. A shopkeeper manages products, categories, and expiry-dated batches on the dashboard, then builds a bill and confirms a sale; billing deducts stock using FEFO and records sales locally. Stock adjustments and expiry/low-stock alerts support ongoing inventory work, while history and settings provide review and configuration. Routing, storage hooks, and batch utilities are shown as internal layers. Page wiring beyond the sampled excerpts is included only where routes or README capabilities establish it.
Main entry points: Index.tsx Product dashboard · App.tsx App router · useSettings.ts Settings hook · useLocalStorage.ts Storage hook
Components 19
App navigation
- App router
src/App.tsx - Settings page
src/pages/Settings.tsx
Inventory management
- Product dashboard
src/pages/Index.tsx - Product forms
src/components/AddProductForm.tsx - Category form
src/components/AddCategoryForm.tsx - Stock card
src/components/StockProductCard.tsx - Batch management
src/components/BatchManagement.tsx - Stock adjustment
src/components/StockAdjustmentDialog.tsx - Expiry alerts
src/components/ExpiringProductsDialog.tsx - Batch calculations
src/utils/batchHelpers.ts - Product filtering
src/utils/productHelpers.ts - Product and batch data
src/types/product.ts
Billing and history
- POS billing
src/pages/Billing.tsx - Sales history
src/pages/SalesHistory.tsx - Sale records
src/types/sale.ts
Local state
- Settings hook
src/hooks/useSettings.ts - Storage hook
src/hooks/useLocalStorage.ts - Browser storage
Other components
- Shopkeeper
Connections 23
- Shopkeeper → App router: uses
- App router → Product dashboard: routes to
- App router → POS billing: routes to
- App router → Sales history: routes to
- App router → Settings page: routes to
- Product dashboard → Product forms: opens
- Product dashboard → Category form: opens
- Product dashboard → Batch calculations: syncs batches
- Product dashboard → Product filtering: sorts products
- Product dashboard → Settings hook: reads settings
- Product dashboard → Storage hook: persists inventory
- POS billing → Settings hook: reads settings
- POS billing → Batch calculations: deducts FEFO
- POS billing → Storage hook: stores sales
- Stock card → Batch management: shows batches
- Stock card → Stock adjustment: opens adjustment
- Stock card → Batch calculations: syncs batches
- Stock card → Settings hook: checks thresholds
- Settings page → Settings hook: updates settings
- Settings hook → Storage hook: persists settings
- Storage hook → Browser storage: reads and writes
- Sales history → Storage hook: reviews records
- Expiry alerts → Product dashboard: alerts dashboard