Migrate RunesSwap to TanStack Start and Cloudflare Workers - #199
Conversation
|
Important Review skippedToo many files! This PR contains 158 files, which is 58 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (158)
You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d780fcf to
c29d431
Compare
PR Review: Migrate RunesSwap to TanStack Start and Cloudflare WorkersI reviewed the full diff (159 files) against base Bugs / issues to address
Security observations (no leaks found, one hardening suggestion)
Minor improvements
Verification noteI could not run Verdict: Approve with changes — items 1–4 should be fixed before merge; the rest are follow-ups. The rollout plan (Vercel kept for rollback, |
PR Review: Migrate RunesSwap to TanStack Start and Cloudflare WorkersSummaryThis is a well-executed migration. I verified the move by diffing old Approval-worthy, with a few low-severity items below. What I verified
FindingsLow
Nits (mostly pre-existing)
Notes
Nice work on keeping this a pure, verifiable migration with no behavioral drift in the API layer. |
PR Review: Migrate RunesSwap to TanStack Start and Cloudflare WorkersI reviewed the full migration diff ( Previous review rounds — verified resolved
Findings (all low severity — nothing blocking)
VerdictApprove. All blocking items from the two earlier reviews are addressed with tests, and the remaining findings are follow-ups. The migration itself is faithful: handlers diff clean against their Next.js predecessors, response envelopes and API paths are preserved, secrets stay server-side, and the rollout/rollback plan (Vercel retained, |



Replace Next.js with TanStack Start and deploy the existing swap, borrowing, portfolio, transactions, rune information, and documentation screens on Cloudflare Workers. Existing API paths and response shapes remain compatible. The Worker is live at https://runesswap.robin-obermaier.workers.dev; production DNS cutover is pending registrar nameserver changes.
The migration removes redundant query/API/SDK wrappers and forwarding-only tests while retaining financial, wallet, authentication, and signing coverage. The SatsTerminal SDK uses native fetch through a pinned Bun patch because its node-fetch transport fails in workerd. BTC pricing now uses mempool.space because CoinGecko rejects Worker requests. Server credentials are Worker secrets and are absent from client bundles. Cloudflare Web Analytics replaces Vercel Analytics with SPA tracking; its public beacon token is embedded in production HTML.
Validation: full ai-check passes (28 suites, 208 tests; lint, formatting, architecture checks, strict TypeScript, unused-code checks, and production build). Deployed page/static-asset/API smoke checks pass, including live rune data, prices, chart timeframes, wallet selection, and navigation. Live BTC balance, transaction history (100 events), and portfolio aggregation (17 rune balances with metadata and market data) also return successful responses for the public documentation address. A read-only quote returns the same no-orders response as Vercel. Real wallet signing, swaps, borrowing, and repayment remain part of owner verification. Two full repository reviews confirmed the API/runtime migration. Follow-up changes retain original SDK errors in server logs, restore chart/tab loading feedback and lazy icons, correct stale documentation, and remove unused framework assets. The review suggestion to restore relative README links was rejected because browser verification showed those links break in /docs. Trailing-slash URLs were tested: /swap/ redirects and /api/popular-runes/ succeeds. Local review-helper and CodeRabbit coverage were unavailable; GitHub OpenCode supplied the full reviews.
Keep the existing Vercel project and production deployment for rollback until owner verification is complete. vercel.json disables new Git deployments of the migrated app. DNS setup, custom-domain cutover, and rollback instructions are in docs/cloudflare-migration.md.