The borrower-facing loan-application SPA — a white-labelled, multi-brand onboarding & repayment funnel used directly by loan applicants and their guarantors.
This app has almost no role complexity — and that is itself a notable fact about it. There is no staff or internal actor represented anywhere in the repo.
los-partner, which is the internal staff/DSA CRM. The two apps share the same backend (los-backend) but serve entirely different audiences.
| Actor | Session | What they do |
|---|---|---|
| Borrower | Own OTP session | The primary and near-exclusive user of this app. OTP login → full onboarding workflow → loan application/offer → disbursement wait → later repayment and reloan. |
| Guarantor | Own, separate OTP session | Backs someone else's loan. Logs in independently, but is routed away from the create-loan (/apply) screen and instead completes only the guarantor-relevant subset of the onboarding workflow (identity/consent steps) via /loan-application, gated by UserRoleEnum.GUARANTOR. |
The full path from landing on a brand's domain to an active, repaying loan. Every step below is brand-configurable — the concrete screen a borrower sees at each step depends on which of ~30 UI templates the brand has assigned to it (see §07).
domain header on every API call). / redirects to /loan-application if a token is present, otherwise to /phone-verification.useSignup hook). On success, access/refresh tokens are issued and the session begins. Referral-code capture happens here too if the URL carried ?ref=... or via a /r/:code landing.index config (theme, logo, ordered workflow_steps with per-step web_template_version) and the user's currentLoan/status, deciding which template renders each step and whether to fast-path straight to /rejected or /review./loan-application, driven by WorkflowPage + features/workflow/* — an ordered, brand-configurable step list: basic info → mobile OTP (if not already done) → email verification → geo-location permission → PAN verify/KYC → bank account verification → income proof (bank-statement upload or Account Aggregator consent) → Aadhaar verification (Digilocker via Digitap/Signzy redirect) → liveness capture (AWS Amplify face liveness / webcam) → employment details → alternate phone number → document uploads → existing-loan/debt-consolidation declaration → guarantor add → BRE wait screen. Each step is skippable/required per brand config./rejected (terminal screen). Soft reject → /review ("Application Under Review", manual ops review pending). Approved → proceeds to loan offer./apply (guarantors are redirected back to their own workflow via BorrowerOnlyRoutes) — amount & tenure selection, submits create-loan; may show a pre-approved amount (recent feature).los-partner-driven — this app's remaining borrower touchpoints during this phase are status/profile viewing./repay-now (public + authenticated variants) and a repay section on /profile; payment via Cashfree or Razorpay (/payment/cashfree, /payment/status-sync, /payment/razorpay-status handle gateway redirect/status reconciliation back into the SPA)./loan/:loanId/request (features/loanRequest) to request against an existing loan without repeating full onboarding.A separate, shorter flow layered on the same app.
/phone-verification entry point, independent token./loan-application./apply screen by BorrowerOnlyRoutes (which checks selectIsGuarantor); the backend also rejects create-loan calls from a guarantor account./repay-now — exists both as a public route (no auth needed to start a payment, e.g. from an SMS/WhatsApp reminder link) and as an authenticated flow reachable from /profile.@cashfreepayments/pg-react SDK, in-app checkout) and Razorpay (redirect/status-callback only, no SDK dependency). Gateway completion is reconciled back into the SPA via /payment/cashfree, /payment/status-sync, and /payment/razorpay-status./loan/:loanId/request (features/loanRequest) lets an existing borrower request against an already-disbursed loan without repeating the full onboarding wizard — a materially shorter path than first-time application./r/:code landing page + URL-param capture (captureReferralCodeFromUrl, callable from anywhere in the app) attributes the eventual signup to a referrer.
los-partner exposes a coinWallet concept, suggesting referrals captured here feed a rewards/coin mechanism managed on the staff side.
Available at any time, independent of login state — none of these are auth-gated.
| Route | Purpose |
|---|---|
/contact-us | General contact form |
/grievance_redressal_complaint | Grievance redressal complaint form — Turnstile-gated, submits to a dedicated backend grievance service |
/complaint | Whistleblower complaint form — Turnstile-gated, submits to a dedicated backend whistleblower service |
All three are open to anyone — not just applicants — and are gated only by Turnstile captcha, not by authentication, consistent with regulatory expectations that grievance and whistleblower channels not be restricted to existing customers.
t1…t30), selected per brand + step via backend config (web_template_version, resolved by src/config/brand-version.config.ts). Several dedicated per-brand variant folders exist under features/workflow/common/v8|v16|v19|v24|v29. In practice, "the onboarding flow" is a family of configurable flows, not a single fixed screen sequence — any given borrower's actual screens depend entirely on which brand they're applying through.
InternalPages calls ensureLatestWebVersion(res.web_version), which forces a reload/update when the deployed build is stale. Given how frequently brand-specific fixes ship (per the commit history), this keeps all brand users on the latest release without relying on a manual cache-bust.
/rejected terminal screen carries an "Employment Information" page title left over from earlier copy — a low-key, low-severity leftover rather than a functional bug. Worth a cleanup pass but not urgent.