Antigravity 200: The Architect's Migration to Next.js
As projects scale, the Orchestration layer becomes more important than the Code layer. It's time to upgrade our static HTML site to a full Next.js ecosystem.
The video version · same thesis, looser edits
In our 100-level series, we built a solid foundation. We created a working static website, integrated it with GitHub, and deployed it to Cloudflare. But as any Tech Entrepreneur knows, a one-pager only takes you so far.
Today, we’re leveling up. We’re moving from a simple static site to a professional Next.js multi-page ecosystem. The goal isn’t just to code—it’s to architect.
The AI Studio Advantage
Most people jump straight into the code when starting a migration. When working with AI, that’s a mistake.
Before opening our IDE, we use Google AI Studio as our dedicated “Creative Director.” I load it with a highly specific “Lead Web Architect” system instruction prompt. We force the AI to think about Information Architecture (IA), routing, and design systems before it ever touches a div.
By going back and forth in AI Studio, we refine our vision into a Markdown blueprint: website-upgrade-plan.md. This document becomes our North Star. It defines our color palette (Void Gray), our 3D hero components, and our core hubs.
The Agent Manager Handoff
Once the blueprint is finalized, we hand it off to the Antigravity Agent Manager.
Because the plan is meticulously detailed, the Agent knows exactly what to build. We transition to Next.js for better routing and performance. We let the AI do the heavy lifting of scaffolding the framework.
Did we hit errors? Yes. Real-world development always has friction. We hit errors on the video routing pages. But instead of manually debugging, we used the AI to diagnose and fix them on the fly until localhost was running perfectly.
Deploying to the Edge: The Log Loop
In Antigravity 103, we uploaded static files. In 200, we do it the professional way using Cloudflare’s new UI under Compute & AI > Workers & Pages.
We connect our GitHub repository directly to Cloudflare. Now, every time we push code, Cloudflare automatically builds and deploys it.
But it wasn’t a ‘one-click’ success. The initial Next.js build failed on Cloudflare’s servers. Here is the pro-tip for working with AI: Don’t panic.
Instead of scouring Stack Overflow, I copied the deployment error logs from Cloudflare, pasted them directly back into the Agent Manager, and let the AI diagnose the issue. This is The Log Loop. After a few rounds of iteration, the AI identified the missing build commands and dependency conflicts, and we cleared the hurdles.
The Takeaway
The site is live, fast, and dark-mode by default. We successfully moved from a basic HTML site to a scalable, architected platform.
The most important lesson of the 200 series is this: as your application scales, your job shifts from writing code to writing instructions and managing logs. The voice might be AI, but the strategy is 100% human.
- Antigravity 250: Why I Ditched Next.js for Astro 6 SSR
- Antigravity 300: Mastering the Context Window & Health Extension
- Antigravity 200: The Architect's Migration to Next.js
- Antigravity 102: Building Your Digital Safety Net with GitHub
- Antigravity 103: Deploying Your AI-Built Site to Cloudflare
- Antigravity 101: Managing Instead of Coding (The 3-Chat Workflow)