How suryachauhan6985-pixel/dealer-portal-quotation works
Sunvine is a role-based solar EPC dealer and admin quotation portal. Dealers create and review quotations, while staff manage leads and locate nearby solar vendors, and administrators maintain dealer, pricing, hardware, and quotation records. Rooftop layout/design and proposal PDF and WhatsApp sharing are visible product capabilities. The excerpts establish application routing, layout calculations, authentication storage, and quotation persistence; some screen-to-service wiring is unsampled, so uncertain connections are omitted.
Main entry points: App.jsx Role-based app · QuotationPreview.jsx Quote preview · SolarStructure3DViewer.jsx 3D structure viewer · StaffRadarMap.jsx Solar vendor radar
Components 29
Portal experience
- Role-based app
src/App.jsx - App state
src/context/AppContext.jsx - Dealer login
src/components/Auth/DealerLogin.jsx - Staff login
src/components/Auth/StaffLogin.jsx - Admin login
src/components/Auth/AdminLogin.jsx
Quotation workflow
- Create quotation
src/components/DealerPortal/CreateQuotation.jsx - My quotations
src/components/DealerPortal/MyQuotations.jsx - Quote preview
src/components/DealerPortal/QuotationPreview.jsx - Proposal template
src/components/DealerPortal/PDFTemplate.jsx - Quote sharing
src/utils/quotationShare.js - Solar layout engine
src/utils/solarLayoutEngine.js - Rooftop designer
src/components/Shared/RooftopDesigner.jsx - Roof image analysis
src/utils/aiRoofVisionEngine.js - 3D structure viewer
src/components/Shared/SolarStructure3DViewer.jsx
Business operations
- Staff dashboard
src/components/StaffPortal/StaffDashboard.jsx - New lead
src/components/StaffPortal/StaffNewLead.jsx - Solar vendor radar
src/components/StaffPortal/StaffRadarMap.jsx - Admin dashboard
src/components/AdminPortal/AdminDashboard.jsx - Dealer management
src/components/AdminPortal/DealerManagement.jsx - Pricing master
src/components/AdminPortal/PricingMaster.jsx - Hardware master
src/components/AdminPortal/HardwareMaster.jsx - All quotations
src/components/AdminPortal/AllQuotations.jsx
Services and data
- Authentication service
src/services/authService.js - Quotation service
src/services/quotationService.js - Supabase
src/lib/supabase.js - Radar integration
src/services/n8nSolarRadarService.js
Other components
- Dealer
- Staff
- Administrator
Connections 26
- Dealer → Role-based app: opens portal
- Staff → Role-based app: opens portal
- Administrator → Role-based app: opens portal
- Role-based app → App state: reads role state
- Role-based app → Dealer login: renders login
- Role-based app → Staff login: renders login
- Role-based app → Admin login: renders login
- Authentication service → Supabase: reads and writes
- Role-based app → Create quotation: renders dealer view
- Role-based app → My quotations: renders dealer view
- Role-based app → Quote preview: renders quote view
- Quote preview → Proposal template: renders proposal
- Quote preview → Quote sharing: shares proposal
- 3D structure viewer → Solar layout engine: calculates structure
- 3D structure viewer → Rooftop designer: reads roof geometry
- Quotation service → Supabase: reads and writes quotes
- Role-based app → Staff dashboard: renders staff view
- Role-based app → New lead: renders staff view
- Role-based app → Solar vendor radar: renders staff view
- Solar vendor radar → Radar integration: loads nearby vendors
- Radar integration → Staff: returns vendor results
- Role-based app → Admin dashboard: renders admin view
- Role-based app → Dealer management: renders admin view
- Role-based app → Pricing master: renders admin view
- Role-based app → Hardware master: renders admin view
- Role-based app → All quotations: renders admin view