How we rebuilt Next.js with AI in one week
Cloudflare engineers rebuilt Next.js from scratch on top of Vite in under a week using AI (Claude via OpenCode), producing an open-source drop-in replacement called vinext. It builds production apps up to 4.4x faster with Vite 8/Rolldown and produces client bundles 57% smaller than Next.js 16. vinext deploys directly to Cloudflare Workers with a single command, supports both App Router and Pages Router, includes ISR via KV, and covers 94% of the Next.js 16 API surface backed by 1,700+ Vitest tests and 380 Playwright E2E tests. A novel 'Traffic-aware Pre-Rendering' (TPR) feature uses Cloudflare zone analytics to pre-render only the pages that actually receive traffic, avoiding the linear build-time scaling problem of large Next.js sites. The project cost roughly $1,100 in Claude API tokens and raises broader questions about which software abstractions exist for human cognitive limits versus genuine architectural necessity.