Project Structure
Frontend Routes
All routes are nested underDashboardLayout which renders the sidebar navigation.
| Path | Component | Description |
|---|---|---|
/order-drafts | OrderDrafts | Pending WhatsApp order drafts |
/order-drafts/:draftId | OrderDraftEdit | Review and edit a specific draft |
/client-order | ClientOrder | Manage client orders |
/takada | Takada | Manage takadas (partial deliveries) |
/karigar-account | KarigarAccount | List of all karigars |
/karigar-account/:id | KarigarLedger | Karigar ledger detail |
/polisher-account | PolishAccount | List of all polishers |
/polisher-account/:id | PolisherLedger | Polisher ledger detail |
/client-account | ClientAccount | List of all clients |
/client-account/:id | ClientLedger | Client ledger detail |
/bank-account | BankAccount | List of all bank accounts |
/bank-account/:id | BankLedger | Bank ledger detail |
/bullion-account | BullionAccount | List of all bullion accounts |
/bullion-account/:id | BullionLedger | Bullion ledger detail |
/khata-upload | KhataUpload | Khata OCR upload (v1) |
/khata-upload-2 | KhataUpload2 | Khata OCR upload (v2) |
State Management
The frontend uses Zustand for global state.useDataStore
Holds master data loaded at app startup.
| State | Type | Description |
|---|---|---|
clients | Client[] | All clients |
karigars | Karigar[] | All karigars |
karigarList | Karigar[] | Karigar list for dropdowns |
polisherList | Polisher[] | Polisher list for dropdowns |
polishAccount | Polisher[] | Polisher account data |
clientAccount | Client[] | Client account data |
bankAccount | BankAccount[] | Bank accounts |
bullionAccount | BullionAccount[] | Bullion accounts |
takada | Takada[] | All takadas |
fetchClientsAndKarigars()— fetches clients and karigarsfetchPolishers()— fetches polisher data