How agrajput2006-ui/krushi-kendra-webapplicaion works
Khushi Kendra Business Manager is an offline-first retail operations app for agricultural-input shops. Shop staff authenticate, create sales bills, manage stock and purchases, receive customer payments, and produce invoices, receipts, statements, and reports. AppContext coordinates domain state and persistence; feature pages invoke it, while calculations and exports support domain workflows. The README documents major capabilities and flows; sampled source confirms routing, bill-state ownership, and storage dependencies. Some page-to-feature behavior is documented rather than verified from page excerpts.
Main entry points: AppContext.tsx Domain State and Actions · App.tsx App Navigation · NewBillPage.tsx Create Sale Bill · LandingPage.tsx Shop Landing
Components 23
Access and Navigation
- Shop Landing
src/pages/LandingPage.tsx - Sign-in
src/pages/AuthPage.tsx - App Navigation
src/App.tsx
Sales and Records
- Create Sale Bill
src/pages/NewBillPage.tsx - Invoice and Print
src/components/InvoiceModal.tsx - Find and Extract
src/pages/FindExtractPage.tsx - Receive Payments
src/pages/PaymentsPage.tsx - Payment Receipts
src/components/ReceiptModal.tsx - Customer and Supplier Ledgers
src/pages/AccountsPage.tsx - Dashboard
src/pages/DashboardPage.tsx
Shop Operations
- Purchases
src/pages/PurchasesPage.tsx - AI Bill Scan
src/pages/ScanBillPage.tsx - Item Catalog
src/pages/ItemsPage.tsx - Stock and Expiry
src/pages/StockPage.tsx - Reports
src/pages/ReportsPage.tsx - Settings and Backup
src/pages/SettingsPage.tsx
Application Core
- Domain State and Actions
src/context/AppContext.tsx - Browser Persistence
src/db/storage.ts - Sample Data
src/db/seed.ts - Business Calculations
src/utils/calculations.ts - PDF and Data Exports
src/utils/exports.ts - English Hindi Marathi
src/i18n/translations.ts
Other components
- Shop Owner / Staff
Connections 40
- Shop Owner / Staff → Shop Landing: opens
README.md - Shop Owner / Staff → Sign-in: signs in
README.md - Sign-in → Domain State and Actions: authenticates
src/pages/AuthPage.tsx - Shop Landing → Domain State and Actions: reads app state
src/pages/LandingPage.tsx - App Navigation → Domain State and Actions: provides state
src/App.tsx - App Navigation → Shop Landing: routes to
src/App.tsx - App Navigation → Sign-in: routes to
src/App.tsx - App Navigation → Create Sale Bill: routes to
src/App.tsx - Shop Owner / Staff → App Navigation: uses
README.md - Create Sale Bill → Domain State and Actions: saves bill
src/pages/NewBillPage.tsx - Domain State and Actions → Invoice and Print: opens invoice
README.md - Shop Owner / Staff → Create Sale Bill: creates sale
README.md - Shop Owner / Staff → Find and Extract: searches records
README.md - Find and Extract → PDF and Data Exports: exports statements
README.md - Shop Owner / Staff → Receive Payments: records payment
README.md - Receive Payments → Domain State and Actions: saves payment
src/pages/PaymentsPage.tsx - Domain State and Actions → Payment Receipts: generates receipt
README.md - Shop Owner / Staff → Customer and Supplier Ledgers: manages ledgers
README.md - Customer and Supplier Ledgers → Domain State and Actions: reads and updates
src/pages/AccountsPage.tsx - Shop Owner / Staff → Dashboard: views activity
README.md - Dashboard → Domain State and Actions: reads state
src/pages/DashboardPage.tsx - Shop Owner / Staff → Purchases: records purchases
README.md - Purchases → Domain State and Actions: saves purchases
src/pages/PurchasesPage.tsx - Shop Owner / Staff → AI Bill Scan: scans supplier bill
README.md - AI Bill Scan → Domain State and Actions: confirms purchase
src/pages/ScanBillPage.tsx - Shop Owner / Staff → Item Catalog: manages items
README.md - Item Catalog → Domain State and Actions: updates catalog
src/pages/ItemsPage.tsx - Shop Owner / Staff → Stock and Expiry: checks stock
README.md - Stock and Expiry → Domain State and Actions: reads and adjusts
src/pages/StockPage.tsx - Shop Owner / Staff → Reports: views reports
README.md - Reports → Domain State and Actions: reads records
src/pages/ReportsPage.tsx - Shop Owner / Staff → Settings and Backup: configures shop
README.md - Settings and Backup → Domain State and Actions: updates settings
src/pages/SettingsPage.tsx - Domain State and Actions → Browser Persistence: persists state
src/context/AppContext.tsx - Domain State and Actions → Sample Data: loads sample data
src/context/AppContext.tsx - Domain State and Actions → Business Calculations: computes domain values
src/context/AppContext.tsx - Create Sale Bill → Business Calculations: calculates bill number
src/pages/NewBillPage.tsx - Invoice and Print → PDF and Data Exports: downloads invoice
src/components/InvoiceModal.tsx - Payment Receipts → PDF and Data Exports: downloads receipt
src/components/ReceiptModal.tsx - Domain State and Actions → English Hindi Marathi: selects language
src/context/AppContext.tsx