Skip to content

Feat/web redesign - #10

Merged
ramachandrareddy352 merged 6 commits into
mainfrom
feat/web-redesign
Nov 13, 2026
Merged

ramachandrareddy352 merged 6 commits into
mainfrom
feat/web-redesign

Conversation

@ramachandrareddy352

Copy link
Copy Markdown
Owner

What this does

Redesigns the web app so a first-time visitor (merchant, lender, customer or judge) can use it without reading a guide, and adds in-app docs and simulators.

Look and feel

  • New palette built on dark blue #274245 ("ink") and yellow sapling #DFD6AE ("sand"), with Fraunces headings and Manrope body text.
  • Dark-blue header with the logo, a mobile menu and the active page highlighted. A footer with links.
  • Motion: a scroll reveal on sections, count-up live numbers, an animated money-flow diagram, animated bars and score gauges. All of it is turned off under prefers-reduced-motion.

Home page

  • Hero with the animated flow (customer → 1Click or INR gateway → keyless settlement account → vault + merchant).
  • Live stats from testnet: vault value, share price, active loans, rupee float.
  • Sections: "What is Runway?", the four steps, an interactive payment split, the four roles (merchants, lenders, customers, judges), rupees and crypto, "every claim is checkable", a 30-minute quick start, and an FAQ.

Simulator (/simulator)

Four live calculators, each showing its formulas filled in with your numbers:

  • Offer: runs the underwriter's own @runway/scoring code.
  • Repayment: the exact settle + apply_regular split for each sale.
  • Lender: shares, then value after a repaid, a late or a defaulted loan.
  • Rupee converter: at the live oracle rate.

Docs (/docs)

Eight pages: overview and quick start, merchants, lenders, customers, rupees and the INR gateway (who holds the rupees), worked examples with every balance, trust and checks, and a glossary with FAQ and error codes.

Every page explains itself and previews actions

  • Merchant dashboard:
    • a "Your next step" panel computed from on-chain state (USDC registration, windows with revenue, loan period);
    • a live window clock;
    • an offer estimate from your actual revenue;
    • a loan-period countdown with the minimum still due;
    • copy and open buttons on the payment link;
    • revenue windows labelled by clock time.
  • Registration: a live preview of the accounts it creates, and a warning if the wallet isn't registered with USDC yet.
  • Capital: a step tracker, an explanation for every offer number, and a live draw preview (fee, owed, scaled repay share, sales needed, period minimum).
  • Settings: step-by-step order and ₹ conversion previews at the live rate.
  • Pay: a "Where your payment goes" split panel and a three-step crypto guide. The UPI tab previews the USDC before you get the QR.
  • Lend: your position, a tooltip on every vault number, deposit and withdrawal previews (USDC and ₹).
  • Verify and Audit: what each check proves.
  • Errors: contract error codes are translated into what to do next (for example ERR_COOLDOWN → "The 120-second waiting period isn't over yet").

Under the hood

  • apps/web/lib/sim.ts mirrors the contracts' integer maths exactly.
  • test/sim.test.ts pins it to hand-worked numbers, including the live testnet deposit (200 USDC → 199.820179 shares) and the vault's 1.000899 share price.
  • The web app depends on @runway/scoring. The lockfile change is the 3-line workspace link only.
  • Component labels, test ids and button names the tests rely on are unchanged.

Verified

  • Web typecheck clean; Prettier clean.
  • Web tests: 26 passed (13 existing + 13 new simulation tests), 4 live tests skipped as usual.
  • next build --webpack: all 19 routes generated.
  • Reviewed in headless Chrome against the live Render backend, at desktop width and at 520 px: the home, simulator, docs, worked examples, merchant, lend, pay, verify and offer-audit pages.

lib/sim.ts reproduces, in the same integer arithmetic, the settlement
split, the credit contract's repayment accounting (principal and fee
parts, the reserve's 10% of fees), draw terms, the period minimum,
provisions, default losses and vault share pricing with the virtual
offset. Offer estimates call the underwriter's own @runway/scoring,
now a web dependency (the lockfile gains only the workspace link).
lib/live.ts reads the gateway oracle's INR rate and the vault.

test/sim.test.ts pins it to hand-worked values: 36.68 / 33.345454 /
3.334546 for a 400 USDC sale at 9.17%, a 10 USDC fee split 9.000002 to
lenders and 0.999998 to the reserve, the live testnet deposit of 200
USDC minting 199.820179 shares at price 1.000899, and the offer
decisions (grade C at 42.50 for three 400 windows, declines for too new,
uneven and low revenue).
A palette built on #274245 (ink) and #DFD6AE (sand): light sand surfaces
with ink text, and ink bands with sand text for the header, hero and
footer. Fraunces headings, Manrope body.

The UI kit keeps its components and props and adds what explanations
and previews need: page headers, card descriptions, info tips, "How
this works" panels, callouts, step lists, preview boxes, progress bars,
and error messages that translate contract codes into what to do next.
A logo, an icon set, an animated money-flow diagram, scroll reveals and
count-up numbers, all switched off under prefers-reduced-motion. The
sticky header gets a mobile menu and highlights the current page; a
footer links the guides and checks. Revenue windows are labelled by
clock time, with the window in progress in sand.
/simulator has four live calculators, each showing its formulas with
the numbers entered: the offer the underwriter would compute from a
list of revenue windows (score parts, grade, limit and what bounds it,
fee, repay share), a loan repaid sale by sale (principal, fee, reserve,
merchant, still owed, and the per-period minimum), a lender's shares and
their value after a repaid, late or defaulted loan (from the live
vault), and the INR gateway's conversion at the live oracle rate with
where the rupees and USDC sit. Presets cover the common cases,
including the ones that get an offer declined.
/docs has eight pages written for newcomers: an overview and quick
start; guides for merchants (every field, the revenue-window rules,
decline reasons, loan states, the period minimum, rupee payouts,
troubleshooting), lenders (shares, returns, withdrawals, risks) and
customers (the quote checks, statuses, UPI); the INR gateway as a float
plus an off-chain treasury, with its formulas and flows; worked examples
following one loan through every balance; how to check each claim; and
a glossary, FAQ and error-code table. JUDGES.md points to the docs and
the simulator.
An ink hero with the animated money flow and calls to action, live
testnet numbers (vault value, share price, active loans, rupee float,
each waiting for its own read), a one-minute explanation, the four
steps, an interactive payment split, what each role can do, how rupees
and crypto enter and leave, what can be verified, a 30-minute quick
start and an FAQ.
- Merchant: a landing page before connecting; registration previews the
  accounts it creates and warns if the wallet isn't registered with
  USDC; the dashboard's "next step" reads the on-chain state (windows
  with revenue, the live window clock, an offer estimate, the loan
  period's minimum and countdown), with copy and open for the link.
- Capital: a step tracker, what each offer number means, and a live
  preview of the fee, owed amount, scaled repay share and period
  minimum while choosing how much to draw.
- Settings: the order to do things in, and payouts in rupees at the
  live rate.
- Pay: where the payment goes (the loan's share and the merchant's),
  a three-step crypto guide, and a USDC estimate before a UPI QR.
- Lend: your position, the meaning of every vault number, and previews
  of shares for a deposit and USDC or rupees for a withdrawal.
- Verify and Audit: what each check proves.

Tested components keep every label, test id and button name.
@vercel

vercel Bot commented Nov 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
runway Building Building Preview Nov 13, 2026 6:45am UTC

@ramachandrareddy352
ramachandrareddy352 merged commit 1432810 into main Nov 13, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant