The onboarding wizard guides new dealers through initial setup. The support system allows dealers to submit tickets and admins to manage them.
/onboardingonboarding_progress table in databaseCollects the dealer's business information. All validation uses Zod schemas.
| Field | Required | Validation |
|---|---|---|
| Shop Name | Yes | Minimum 3 characters |
| Owner Name | Yes | Minimum 2 characters |
| Address | Yes | Minimum 5 characters |
| GSTIN | No | Regex: /^\d{2}[A-Z]{5}\d{4}[A-Z]{1}[A-Z\d]{1}[Z]{1}[A-Z\d]{1}$/ |
| Drug License No. | No | Free text (no format validation) |
22AAAAA0000A1Z5 ││ │ │││└─ Check digit (alphanumeric) ││ │ ││└── Always "Z" ││ │ │└─── Alphanumeric ││ │ └──── Alpha ││ └───────── 4 digits │└─────────────── 5 uppercase letters (PAN) └──────────────── 2-digit state code
updateDealerProfile to save shop detailscompleteStep('shop_details') to mark step completeAllows the dealer to choose their preferred language. Uses i18next for internationalization.
i18next.changeLanguage()The dealer selects initial products from the global catalog or adds custom products.
Browse and select products from the AquaDealers master product database. Pre-populated with common agricultural products.
Create products not in the global catalog. Enter name, category, unit, and pricing.
Creates the dealer's first customer (farmer) record.
| Field | Required | Notes |
|---|---|---|
| Name | Yes | Farmer's full name |
| Phone | Yes | 10-digit Indian mobile number (used for WhatsApp) |
After this step, the dealer has a complete minimal setup: shop profile, language, products, and at least one customer.
onboarding_progress tableEach step's completion is tracked individually. The dealer can leave and resume onboarding — completed steps are skipped on return.
| Step Key | Completed When |
|---|---|
shop_details | Profile saved successfully |
language | Language selected |
catalog | At least one product selected or added |
first_farmer | First farmer created |
When all 4 steps are complete, the dealer is redirected to the dashboard. The onboarding route becomes inaccessible (redirects to dashboard if visited again).
| Component | Details |
|---|---|
| Database tables | support_tickets + ticket_messages |
| Dealer interface | In-app support form (create ticket, view replies) |
| Admin interface | /admin/support — ticket list, detail view, reply, resolve |
| Resolution RPC | admin_resolve_ticket |
open/admin/support dashboard. Can change status to in_progressticket_messages. Dealer sees reply in-appadmin_resolve_ticket RPC. Status: resolved| Status | Meaning | Who Sets It |
|---|---|---|
| open | New ticket, awaiting admin response | Automatic on creation |
| in_progress | Admin is investigating | Admin |
| resolved | Issue resolved | Admin (via RPC) |
Tickets can be assigned priority levels by the admin to help triage the support queue. Priority is informational and does not trigger any automated behavior (no SLAs, no auto-escalation).