How adityaprasad02/bill-bridge-frontend works
This is a React bill-management frontend for merchants and customers. Users enter through public landing, login, signup, or OAuth routes; authenticated users reach a role-aware dashboard to register as merchants, create or upload bills, manage responses, and review received bills. Bill and payment operations go through API services, while customer bill payment and merchant refunds are distinct flows. The dashboard also uses a socket service for live updates. Relationships for unsampled routes and integrations are limited to SOURCE INDEX references; the README describes only the Vite template.
Main entry points: Dashboard.jsx Role dashboard · billService.js Bill API service · main.jsx Route setup · authStore.js Session state
Components 23
App entry and identity
- Route setup
src/main.jsx - Landing page
src/pages/Landing.jsx - Login and signup
src/pages/Login.jsx - OAuth completion
src/pages/OauthSuccess.jsx - Auth guard
src/features/auth/RequireAuth.jsx
Bill workflows
- Role dashboard
src/pages/Dashboard.jsx - Merchant registration
src/components/dashboard/MerchantRegisterForm.jsx - Create bills
src/components/dashboard/CreateBillForm.jsx - PDF bill upload
src/components/dashboard/UploadBillPdf.jsx - Merchant bill management
src/components/dashboard/MerchantBillsList.jsx - Merchant responses
src/components/dashboard/MerchantResponses.jsx - Received bills
src/components/dashboard/CustomerReceivedBills.jsx - Customer bill responses
src/components/dashboard/CustomerReactedBills.jsx
Client services
- Authentication service
src/features/auth/authService.js - Session state
src/features/auth/authStore.js - Bill API service
src/api/billService.js - HTTP client
src/api/axios.js
Payments and live events
- Payment handoff
src/components/payments/PaytmPayment.js - Payment service
src/components/payments/PaytmService.js - Socket service
src/features/socket/socketService.js - Socket connection
src/features/socket/socket.js
Other components
- User
- Application backend
Connections 39
- User → Route setup: opens app
src/main.jsx - Route setup → Landing page: routes to
src/main.jsx - Route setup → Login and signup: routes to
src/main.jsx - Route setup → Auth guard: guards route
src/main.jsx - Route setup → Role dashboard: routes to
src/main.jsx - Route setup → OAuth completion: routes to
src/main.jsx - Login and signup → Authentication service: authenticates
src/pages/Login.jsx - Login and signup → Session state: updates session
src/pages/Login.jsx - OAuth completion → Authentication service: uses auth
src/pages/OauthSuccess.jsx - OAuth completion → Session state: updates session
src/pages/OauthSuccess.jsx - Auth guard → Session state: checks session
src/features/auth/RequireAuth.jsx - Authentication service → HTTP client: sends requests
src/features/auth/authService.js - HTTP client → Session state: reads tokens
src/api/axios.js - HTTP client → Application backend: calls API
src/api/axios.js - Role dashboard → Authentication service: loads profile
src/pages/Dashboard.jsx - Role dashboard → Bill API service: loads merchant data
src/pages/Dashboard.jsx - Role dashboard → Session state: reads user
src/pages/Dashboard.jsx - Role dashboard → Merchant registration: renders registration
src/pages/Dashboard.jsx - Role dashboard → Create bills: renders form
src/pages/Dashboard.jsx - Role dashboard → PDF bill upload: renders uploader
src/pages/Dashboard.jsx - Role dashboard → Merchant bill management: renders bills
src/pages/Dashboard.jsx - Role dashboard → Merchant responses: renders responses
src/pages/Dashboard.jsx - Role dashboard → Received bills: renders received bills
src/pages/Dashboard.jsx - Role dashboard → Customer bill responses: renders responses
src/pages/Dashboard.jsx - Merchant registration → Bill API service: registers merchant
src/components/dashboard/MerchantRegisterForm.jsx - Create bills → Bill API service: creates bill
src/components/dashboard/CreateBillForm.jsx - PDF bill upload → Bill API service: uploads PDF
src/components/dashboard/UploadBillPdf.jsx - Merchant bill management → Bill API service: manages bills
src/components/dashboard/MerchantBillsList.jsx - Customer bill responses → Bill API service: fetches bills
src/components/dashboard/CustomerReactedBills.jsx - Received bills → Bill API service: fetches bills
src/components/dashboard/CustomerReceivedBills.jsx - Bill API service → HTTP client: sends requests
src/api/billService.js - Bill API service → Application backend: calls bill endpoints
src/api/billService.js - Received bills → Payment handoff: starts payment
src/components/dashboard/CustomerReceivedBills.jsx - Merchant bill management → Bill API service: initiates refunds
src/components/dashboard/MerchantBillsList.jsx - Role dashboard → Bill API service: saves payment data
src/pages/Dashboard.jsx - Role dashboard → Socket service: uses live updates
src/pages/Dashboard.jsx - Socket service → Socket connection: delegates connection
src/features/socket/socketService.js - Socket service → Session state: reads session
src/features/socket/socketService.js - Payment service → HTTP client: sends requests
src/components/payments/PaytmService.js