Cloudflare Clones Next.js with AI in 7 Days

A single Cloudflare engineer reportedly reimplemented the Next.js core in just one week using AI and the framework's existing test suite. The result was reportedly 4x faster builds and a 57% smaller bundle size. Cloudflare's CTO called it standard engineering practice, arguing AI shifts value from source code to the tests and intent behind it.

The project, dubbed `vinext`, is positioned as a drop-in replacement for Next.js, built on the Vite toolchain instead of Vercel's bespoke Turbopack. This architectural choice is a key reason for the claimed performance improvements. The entire effort cost roughly $1,100 in API tokens for Anthropic's Claude AI model. The primary motivation cited by Cloudflare was not simply an AI experiment, but to solve the "deployment problem" of Next.js on serverless platforms outside of Vercel. Tooling like OpenNext attempts to adapt Next.js build outputs for platforms like Cloudflare Workers or AWS Lambda, but this approach has proven fragile and difficult to maintain as it requires reverse-engineering Vercel's build process. By reimplementing the API from scratch on a more platform-agnostic foundation like Vite, `vinext` allows Next.js applications to run natively on Cloudflare's infrastructure, including full support for services like KV, R2, and AI bindings without workarounds. The project includes over 1,700 unit tests and 380 end-to-end tests, many ported directly from Next.js's own test suite, to ensure compatibility. Vercel CEO Guillermo Rauch responded swiftly, labeling `vinext` a "vibe-coded framework." His team identified and responsibly disclosed seven security vulnerabilities in the initial release: two critical, two high, two medium, and one low. The term "vibe coding" implies a process of using AI to generate code without deep review, a practice that has been documented as a potential security liability. This development intensifies the existing competition between Cloudflare and Vercel, which has previously included public disagreements between their respective CEOs on security issues. For developers, `vinext` represents a potential alternative to escape vendor lock-in and high costs associated with scaling on Vercel, a common pain point cited for migrating to Cloudflare. The project introduces novel features like 'Traffic-aware Pre-Rendering' (TPR), which uses Cloudflare's analytics to pre-render only the pages that receive actual traffic, addressing a common build-time scaling issue in large Next.js sites. While the code was primarily AI-generated, Cloudflare emphasizes that the quality is maintained by the extensive test suite, not traditional human code review. Cloudflare is actively encouraging other hosting providers to adopt the `vinext` toolchain, highlighting that a proof-of-concept deployment on Vercel itself took less than 30 minutes. This positions the project not just as a Cloudflare-specific tool but as a potential open-source, community-driven standard for running Next.js applications anywhere.

Get your own daily briefing

Scout delivers personalized news, insights, and conversations tailored to your role and industry.

Download on the App Store

Shared from Scout - Be the smartest in the room.