How santhosh-python/navetra works
Navetra is a browser-based inventory-intelligence app for essential supplies, using synthetic demo data rather than a live backend. The principal workflow is to load inventory and delivery data, calculate stock risk and depletion estimates, then surface prioritized attention and reorder recommendations through the overview and item-focused pages. Users can also manage inventory, model what-if scenarios, inspect analytics and reports, and configure thresholds and notifications. The service layer supports demo operation and documents a planned API boundary; unsampled page internals are represented only where README capabilities establish them.
Main entry points: App.tsx App routing · InventoryContext.tsx Inventory state · InventoryPage.tsx Inventory management · inventoryService.ts Inventory service
Components 21
App experience
- App routing
src/app/App.tsx - Overview
src/pages/OverviewPage.tsx
Inventory and data
- Inventory management
src/pages/InventoryPage.tsx - Item details
src/pages/ItemDetailPage.tsx - Inventory state
src/state/InventoryContext.tsx - Inventory service
src/services/inventoryService.ts - Synthetic inventory data
src/data/demoInventory.ts - Demo stock history
src/data/demoHistory.ts - Inventory filtering
src/lib/inventoryQuery.ts
Risk and planning
- Risk and stock analysis
src/lib/riskClassification.ts - Shortage forecasts
src/pages/ForecastsPage.tsx - Forecast calculations
src/lib/forecasting.ts - Ranked recommendations
src/pages/RecommendationsPage.tsx - What-if simulator
src/pages/SimulatorPage.tsx
Analysis and reports
- Analytics charts
src/pages/AnalyticsPage.tsx - Reports and exports
src/pages/ReportsPage.tsx
Settings and alerts
- Settings
src/pages/SettingsPage.tsx - Notifications
src/state/NotificationContext.tsx - Settings state
src/state/SettingsContext.tsx
Other components
- Clinic staff
- Planned backend API
Connections 24
- Clinic staff → App routing: opens app
README.md - App routing → Overview: routes to
src/app/App.tsx - App routing → Inventory management: routes to
src/app/App.tsx - App routing → Item details: routes to
src/app/App.tsx - App routing → Shortage forecasts: routes to
src/app/App.tsx - App routing → Ranked recommendations: routes to
src/app/App.tsx - App routing → What-if simulator: routes to
src/app/App.tsx - App routing → Analytics charts: routes to
src/app/App.tsx - App routing → Reports and exports: routes to
src/app/App.tsx - App routing → Settings: routes to
src/app/App.tsx - Inventory state → Inventory service: loads and mutates
src/state/InventoryContext.tsx - Inventory service → Synthetic inventory data: uses demo items
src/services/inventoryService.ts - Inventory state → Demo stock history: builds history from
src/state/InventoryContext.tsx - Inventory state → Risk and stock analysis: builds inventory rows
- Inventory state → Ranked recommendations: builds ranked list
src/state/InventoryContext.tsx - Inventory management → Inventory state: manages items
- Inventory management → Inventory filtering: filters and sorts
- Inventory filtering → Risk and stock analysis: compares risk
src/lib/inventoryQuery.ts - Shortage forecasts → Forecast calculations: shows estimates
- What-if simulator → Forecast calculations: models scenarios
- Settings → Settings state: changes preferences
- Notifications → Inventory state: reads inventory rows
src/state/NotificationContext.tsx - Notifications → Settings state: reads notification settings
- Inventory service → Planned backend API: optionally requests
src/services/inventoryService.ts