How jaisriv788/scan2pay_merchant works
Scan2Pay Merchant Portal is a React merchant-facing application for selling USDT/USDC for INR and managing merchant operations. Merchants enter through login or verification, then use protected routes for dashboard rates, transactions, wallet/order workflows, profile, disputes, and support. The route map and sampled components show that pages are composed under a shared Redux-backed shell; state slices hold user, price, UI-model, constants, and PWA state. API details are only connected where sampled code shows requests; other documented capabilities are retained without guessing their internal wiring.
Main entry points: App.tsx Route shell · store.ts Redux store · Navbar.tsx Navigation and rates · Verify.tsx Identity verification
Components 32
App and routing
- Route shell
src/App.tsx
Merchant workflows
- Login
src/screens/Login.tsx - Login methods
src/components/login/LoginDialog.tsx - Identity verification
src/screens/Verify.tsx - Verification status
src/components/common/Verification.tsx - Dashboard and rates
src/screens/Dashboard.tsx - Profile management
src/screens/Profile.tsx - Transaction history
src/screens/Transaction.tsx - Wallet and deposits
src/screens/Wallet.tsx - Deposit form
src/components/wallet/DepositeForm.tsx - Order and confirmation
src/screens/Confirmation.tsx - Sell confirmation
src/screens/SellConfirmation.tsx - Scan confirmation
src/screens/ScanConfirmation.tsx - Pending requests
src/screens/PendingRequest.tsx - Funds
src/screens/Funds.tsx - Processing requests
src/screens/ProcessingRequest.tsx - Dispute management
src/screens/DisputeForm.tsx - Support
src/screens/Support.tsx
Application state
- Redux store
src/store/store.ts - User state
src/store/slices/userSlice.ts - Price and balance
src/store/slices/priceSlice.ts - UI model state
src/store/slices/modelSlice.ts - App constants
src/store/slices/constSlice.ts - PWA state
src/store/slices/pwaSlice.ts
Shared interface
- Navigation and rates
src/components/common/Navbar.tsx - Protected access
src/components/common/ProtectedRoute.tsx - Seen-order storage
src/utils/seenStorage.ts - Success feedback
src/hooks/useShowSuccess.ts
PWA support
- Install button
src/components/PWAInstall/InstallButton.tsx
Other components
- Merchant
- Rates API
- Merchant API
Connections 35
- Merchant → Route shell: opens portal
src/App.tsx - Route shell → Login: routes to
src/App.tsx - Route shell → Identity verification: routes to
src/App.tsx - Route shell → Verification status: routes to
src/App.tsx - Route shell → Dashboard and rates: routes to
src/App.tsx - Route shell → Profile management: routes to
src/App.tsx - Route shell → Transaction history: routes to
src/App.tsx - Route shell → Wallet and deposits: routes to
src/App.tsx - Route shell → Order and confirmation: routes to
src/App.tsx - Route shell → Sell confirmation: routes to
src/App.tsx - Route shell → Scan confirmation: routes to
src/App.tsx - Route shell → Pending requests: routes to
src/App.tsx - Route shell → Funds: routes to
src/App.tsx - Route shell → Processing requests: routes to
src/App.tsx - Route shell → Dispute management: routes to
src/App.tsx - Login → Login methods: uses login methods
- Wallet and deposits → Deposit form: uses form
- Navigation and rates → Rates API: fetches rates
src/components/common/Navbar.tsx - Navigation and rates → Price and balance: updates prices
src/components/common/Navbar.tsx - Price and balance → Merchant API: requests balance
src/store/slices/priceSlice.ts - Identity verification → Merchant API: submits approval
src/screens/Verify.tsx - Identity verification → Merchant API: checks approval
src/screens/Verify.tsx - Protected access → Navigation and rates: renders shell
src/components/common/ProtectedRoute.tsx - Protected access → Seen-order storage: reads and writes
src/components/common/ProtectedRoute.tsx - Pending requests → Seen-order storage: uses storage
src/screens/PendingRequest.tsx - Success feedback → UI model state: dispatches messages
src/hooks/useShowSuccess.ts - Route shell → Redux store: selects state
src/App.tsx - Redux store → User state: combines reducer
- Redux store → Price and balance: combines reducer
src/store/slices/priceSlice.ts - Redux store → UI model state: combines reducer
- Redux store → App constants: combines reducer
- Redux store → PWA state: combines reducer
- Navigation and rates → Install button: renders button
src/components/common/Navbar.tsx - Install button → PWA state: reads install state
src/components/PWAInstall/InstallButton.tsx - Merchant → Support: seeks help
README.md