Lovable, the Swedish platform that generates web applications using artificial intelligence, has left Next.js and Vercel for its own website and moved to TanStack Start on Cloudflare Workers — the same setup it uses to serve the applications its users build. Its co-founder and CTO, Fabian Hedin, explained the change at Cloudflare Connect, the conference Cloudflare held October 19-21 in San Francisco, and the company detailed it on its technical blog. According to the post Cloudflare published about the talk, the platform has already generated 70 million AI-built applications.
Lovable’s move to Cloudflare Workers in 30 seconds
- Lovable has migrated its website from Next.js on Vercel to TanStack Start on Cloudflare Workers, the same environment its customers’ apps run on.
- Each published app is a worker spun up on demand inside its own V8 isolate.
- The migration took about six months and cut median time-to-first-byte by 49%.
- A memory incident pushed the error rate to 50% for 11 minutes.
The change has two parts. Since May 13, every new Lovable project has been generated with TanStack Start, a React framework with server-side rendering, and published as a worker at the edge of Cloudflare’s network — previously, projects were static, browser-only-rendered apps served from Cloudflare Pages. And in August, the company finished migrating lovable.dev itself, which stopped being treated as a special case and now runs as just another app on the platform.
Millions of On-Demand Apps on V8 Isolates
Lovable’s technical challenge is serving huge numbers of low-traffic applications without keeping them all running. According to its technical blog, every published application is packaged as a worker for workerd, Cloudflare’s runtime engine. An entry worker receives the request, loads the matching application’s code, and dispatches it to a dynamically created worker that runs inside its own V8 isolate — the same kind of sandboxed environment used by Chrome’s JavaScript engine. It’s a different model from containers or virtual machines: spinning up an isolate costs somewhere between about 4 milliseconds and roughly one second, depending on the size of the code bundle.
That margin is why app size matters so much. Lovable says workers have a 128 MB memory limit, and much of the migration work went into slimming down the server-side code: the team stripped browser-only tools — the TypeScript compiler, Prettier, the syntax highlighter — out of the server bundle, saving about 9 MB of code and roughly 18 MB of memory per worker. For users’ apps, the shift to server-side rendering also has a search-engine effect. Lovable says apps using pre-rendering have gained 2.9% more organic traffic and nearly doubled — up 98.5% — their traffic from AI tools like ChatGPT or Perplexity.
Why TanStack Start Instead of Next.js
Hedin explained on Lovable’s blog in June that they chose TanStack Start because it keeps the platform inside the React ecosystem, is open and portable, supports server-side rendering so search engines can index pages, and has strong typing that helps AI generate correct code. Any route can be rendered on the server, generated as static, or run in the browser, and TanStack’s server functions replace the edge functions they used before. Supabase still handles the database, authentication, and storage.
Alexander Lebedev, the engineer who led the lovable.dev migration, adds less technical reasons in his August write-up. He considers Next.js’s abstractions confusing, such as server components and server actions, and says AI agents gave outdated advice because the framework’s versions change so much from one to the next. The previous site on Vercel also suffered from differences between local and production builds, plus slow loads in some regions. With the new setup, development startup time went from about 70 seconds and 8 GB of RAM to about 10 seconds and 1.5 GB on their machines, and continuous-integration build time dropped from more than 12 minutes to between 6 and 9. It’s not an isolated move: CloudNews reported that Cloudflare acquired VoidZero, the company behind Vite, back in June — the tool TanStack Start uses as its development server.
Dogfooding: Lovable as Just Another Lovable App
The main reason for the migration was to use their own product the way any customer would — what the industry calls dogfooding. lovable.dev gets more than 42 million unique visitors a month, has about 400 routes and more than 900,000 lines of code, and today it’s served exactly like any other app on the platform, with fewer than 200 lines of code specific to it. The process took about six months, including roughly two months of rollout to external users. During that time, a worker acted as a proxy, deciding by route and by user whether a request went to the old Vercel version or the new one, and each group of routes went through internal testing, then 1%, then 100% of users. AI agents prepared much of the change, which was then reviewed automatically.
It wasn’t a clean process, and the company says so itself. When they expanded the dashboard rollout from 5% to 20% of users on a Friday, the error rate jumped from 0.1% to close to 50% within minutes. The incident lasted 11 minutes and was resolved by rolling back. The cause was an unrelated change to a static JSON file that pushed workers past their memory limit. They also acknowledge that TanStack Start required a lot of bundler configuration for an app of that size, and that the 90th-percentile response time was initially up to twice as slow, though it’s now 16% better than with Next.js. Median time-to-first-byte is 49% lower. These figures come from Lovable itself, which has said it may later allow importing and editing apps built with Next.js. It’s a useful lesson for any platform, because the risks of an AI-generated app, as the security risks of vibe coding remind us, also depend on where and how it runs.
Frequently Asked Questions
Why did Lovable leave Next.js?
To serve its own website the same way it serves its users’ apps, on Cloudflare Workers with TanStack Start, and because of issues with Next.js such as its complex abstractions, slow builds, and outdated advice from AI agents.
What is TanStack Start?
A React framework with server-side rendering, server functions, and strong typing, which uses Vite and can be deployed on Cloudflare Workers.
How does Lovable serve millions of apps without keeping them all running?
Each app is a worker loaded on demand inside a V8 isolate, which takes between about 4 milliseconds and one second to spin up depending on the code’s size.
Have users’ apps improved?
According to Lovable, new apps are rendered on the server, and those using pre-rendering have gained 2.9% more organic traffic and 98.5% more traffic from AI tools.
Sources:

