How nagarjuna-druvo/leads-newversion-frontend works
This is a React-based ERP frontend, with sales and operational workflows spanning leads, enquiries, quotations, orders, invoices and payments, alongside customer, visit, parts and administration areas. Users enter through the authenticated app and navigate permission-guarded routes to domain pages. The sampled code confirms opportunity fetching through a hook and API client, plus service calls from the pipeline; the tree shows additional domain modules whose internal wiring was not sampled. The diagram omits uncertain page-to-page transitions and backend endpoint details.
Main entry points: api.js API client · App.jsx App shell · AppRoutes.jsx Protected routes · Pipeline.jsx Lead pipeline
Components 21
App and access
- App shell
src/App.jsx - Auth context
src/contexts/AuthContext.jsx - Protected routes
src/routes/AppRoutes.jsx
Sales workflow
- Lead pipeline
src/pages/pipeline/Pipeline.jsx - Opportunity hook
src/hooks/useOpportunities.js - Enquiry management
src/pages/enquiry/EnquiryManagement.jsx - Door measurements
src/pages/enquiry/EnqueryMeasurementsEmp.jsx - Quotation management
src/pages/quotes/QuoteList.jsx - Quote preview
src/pages/quotes/QuotePreview.jsx - Quote pipeline
src/pages/pipeline/QuotesPipeline.jsx
Order and billing
- Order management
src/pages/orders/OrdersView.jsx - Invoice management
src/pages/invoices/InvoiceView.jsx - Payments and balances
src/pages/payments/PaymentsMain.jsx
Operational records
- Customer records
src/pages/customers/CustomerList.jsx - Sales visits
src/pages/visits/SalesView.jsx - Parts management
src/pages/partsManagement/PartsView.jsx - Masters and permissions
src/pages/masters/MastersDashboard.jsx
Shared data access
- ERP services
src/services/systemServices.js - API client
src/utils/api.js
Other components
- ERP user
- ERP backend
Connections 11
- ERP user → App shell: uses
- App shell → Auth context: provides auth
- App shell → Protected routes: renders routes
- Protected routes → Enquiry management: dispatches
- Protected routes → Order management: dispatches
- Lead pipeline → Opportunity hook: fetches opportunities
- Opportunity hook → API client: requests data
- Lead pipeline → ERP services: creates follow-up
- Quote pipeline → API client: loads pipeline
- ERP services → API client: sends requests
- API client → ERP backend: exchanges data