How mayur-web03/prv works
PRV is a bath-fittings manufacturer’s public catalogue and dealer ordering/operations platform. The user journey runs from product discovery or dealer login through typed, spoken, or image-assisted order entry, submission, staff review and decisions, then dispatch and delivery with status history. The graph also includes public enquiries and dealer applications, authentication, and persistence. Several backend modules are named in the tree and README but were not sampled; those relationships are shown only where documented, or omitted. (The README’s OCR and lifecycle capabilities are preserved.)
Main entry points: App.jsx Application router · client.js API client · NewOrder.jsx Order entry · dealer-applications.js Form submission APIs
Components 25
Public storefront
- Product catalogue
src/pages/Catalogue.jsx - Product details
src/pages/ProductDetail.jsx - Product data
src/data/product.js - Enquiry and dealer forms
src/components/contact/EnquiryForm.jsx
Identity and access
- Session authentication
api/_lib/auth.js - Frontend auth context
src/auth/AuthContext.jsx - Role-gated portals
src/auth/roles.js
Dealer ordering
- Order entry
src/pages/portal/NewOrder.jsx - Speech recognition
src/hooks/useSpeechRecognition.js - Image capture
src/components/orders/CameraCapture.jsx - Order text parsing
src/utils/parseOrderText.js - Dealer order list
src/pages/portal/Orders.jsx
Order operations
- Staff order review
src/pages/portal/AdminOrderReview.jsx - Staff order queue
src/pages/portal/AdminOrders.jsx - Order status history
api/_lib/orders.js
Backend services
- Shared validation
shared/validation.js - Form submission APIs
api/dealer-applications.js - Form request handler
api/_lib/handler.js - API client
src/api/client.js - Order API
api/_lib/orders.js - PostgreSQL database
api/_lib/db.js
Other components
- Public visitor
- Dealer or staff
- Application router
src/App.jsx - Google Cloud Vision
Connections 32
- Public visitor → Application router: browses
src/App.jsx - Application router → Product catalogue: routes to
src/App.jsx - Application router → Product details: routes to
src/App.jsx - Product details → Product data: reads
src/pages/ProductDetail.jsx - Public visitor → Enquiry and dealer forms: submits
- Enquiry and dealer forms → Form submission APIs: posts to
- Form submission APIs → Form request handler: delegates to
api/dealer-applications.js - Form submission APIs → Shared validation: validates with
api/dealer-applications.js - Form submission APIs → PostgreSQL database: writes to
api/dealer-applications.js - Dealer or staff → Application router: uses portal
src/App.jsx - Application router → Frontend auth context: provides auth
src/App.jsx - Frontend auth context → API client: requests session
src/auth/AuthContext.jsx - API client → Session authentication: calls API
- Session authentication → PostgreSQL database: reads and writes
api/_lib/auth.js - Application router → Role-gated portals: gates routes
src/App.jsx - Application router → Order entry: routes to
src/App.jsx - Order entry → API client: submits order
- Order entry → Speech recognition: uses dictation
- Order entry → Image capture: captures image
- Order entry → Order text parsing: parses text
- Order text parsing → Product data: suggests matches
src/utils/parseOrderText.js - API client → Order API: calls API
- Order API → Google Cloud Vision: requests OCR
- Order API → PostgreSQL database: persists orders
- Application router → Dealer order list: routes to
src/App.jsx - Dealer order list → API client: loads orders
- Application router → Staff order queue: routes to
src/App.jsx - Staff order queue → API client: loads queue
- Application router → Staff order review: routes to
src/App.jsx - Staff order review → API client: loads and updates
src/pages/portal/AdminOrderReview.jsx - Order API → Order status history: records changes
- Order status history → PostgreSQL database: persists history