Skip to content

feat(bridge-ui-next): add Next.js port of bridge-ui - #21937

Draft
0xmapachex wants to merge 2 commits into
mainfrom
feat/bridge-ui-next
Draft

feat(bridge-ui-next): add Next.js port of bridge-ui#21937
0xmapachex wants to merge 2 commits into
mainfrom
feat/bridge-ui-next

Conversation

@0xmapachex

Copy link
Copy Markdown

Summary

Adds packages/bridge-ui-next — a 1:1 port of the Taiko Bridge web app from SvelteKit to Next.js (App Router), plus a post-port review/hardening pass. See packages/bridge-ui-next/MIGRATION.md for the full migration narrative and architecture notes.

Commit 1 — the port

  • Next.js App Router + zustand (replacing Svelte stores), wagmi/viem on the same major versions, @web3modal/wagmi bumped v4 → v5
  • Framework-agnostic $libs/** business layer (bridge classes, proof, fee, relayer, token, chain, network) ported using @wagmi/core actions
  • Config generation scripts and JSON schemas carried over

Commit 2 — review fixes & hardening

  • Correctness (all test-first): zustand replace-vs-merge semantics via new createValueStore; TokenInput one-keystroke-stale amount; Moralis NFT cache keyed per chainId:address (was shared across wallets); StrictMode-safe wagmi watcher
  • Upstream drift sync: quota-exhaustion claim handling from bridge-ui on main (checkQuota, quotaManagerAbi, ClaimDialog/RetryDialog wiring, schema field) with upstream tests
  • Security/data layer: /api/nft input validation (viem isAddress, positive-int chainId, 400 on bad JSON, Cache-Control: no-store); baseline security headers in next.config.ts; relayer axios timeouts
  • Cleanup: removed ~1,170 lines of dead React Query hooks; fixed next/font Public Sans wiring; SEO/OpenGraph metadata

Unit tests: 177 passing (up from 110); tsc --noEmit clean; next build green.

Still open (why draft)

  • Side-by-side visual QA against the SvelteKit app with real CONFIGURED_* values
  • Full testnet bridge/claim/release flow verification
  • Web3Modal v5 → Reown AppKit decision (v5 is deprecated upstream)
  • <img>next/image migration

🤖 Generated with Claude Code

0xmapachex and others added 2 commits June 9, 2026 13:41
Add packages/bridge-ui-next, a Next.js 16 (App Router) + React 19 port
of the SvelteKit bridge-ui. The original bridge-ui is left untouched
and remains the production app.

- All 114 components, 144 libs, and 11 stores ported to React/TSX
- Tailwind 3.4 + daisyUI 4 with the original themes, shadcn/ui,
  TanStack Query v5, wagmi v2/viem, react-i18next, Zustand
- tsc --noEmit clean, next build green (7/7 routes)
- Pixel-parity verified side-by-side for home and /transactions
- Remaining work tracked in packages/bridge-ui-next/MIGRATION.md

Also registers the package in the pnpm workspace and approves native
build scripts via the new pnpm allowBuilds map.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… and test hardening

Follow-up pass on the Next.js port: test-first correctness fixes
(zustand replace semantics via createValueStore, TokenInput stale
amount, Moralis per-wallet cache keying, StrictMode-safe wagmi
watcher), port of upstream quota-exhaustion claim handling from
bridge-ui (checkQuota, quotaManagerAbi, dialog wiring), /api/nft input
validation and baseline security headers, removal of ~1,170 lines of
dead React Query hooks, and unit tests up from 110 to 177 passing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants