How to Build a Full Website Using Google Stitch and Anti-Gravity
DevBlog
Mar 31, 2026 · 5 min read · 7 views
Building a website used to take weeks of planning, designing, and coding. Today, new AI tools make this process much faster. You can now go from a simple idea to a working React or Next.js website in minutes. This guide shows you a special workflow using Google Stitch and Anti-Gravity. By connecting these two tools, you can turn AI-generated designs into production-ready code with just one prompt.
Getting Started with Google Stitch
Google Stitch is a tool that helps you create UI designs for mobile and web apps. It recently received a major upgrade. It now uses a system called "w-designing." This allows you to use simple text prompts to create high-quality mockups.
To start, visit Stitch with Google and sign up with your Gmail account. Once you are in the interface, you can choose between a mobile or web app design. For this workflow, we will focus on a web app.
Creating Your Initial Design
You can give Stitch a prompt to describe the website you want. For example, you might ask for a "modern and sleek AI-powered CRM platform."
Select your model: Choose Gemini 3.1 Pro for the best results.
Pick a design system: Select a color palette and font style.
Generate: Click send and wait for the AI to work.
Stitch does more than just show a picture. It creates a full design system. This includes your primary colors, button styles, and fonts. It will then generate core screens for your app, such as a dashboard, a contact management page, and a deal pipeline.
Customizing the UI
You have total freedom to change the designs Stitch creates. If you don't like a specific page, you can use the annotate tool to highlight an area and ask for changes. You can also generate variations. This lets you see different layouts for the same page before you decide which one to keep.
Connecting Stitch to Anti-Gravity
To make the two tools talk to each other, you use an MCP (Model Context Protocol) server. Follow these steps to set it up:
Go to your Stitch settings and find the API keys section.
Create a new key and copy it.
Open Anti-Gravity and go to the Agents panel.
Find the Stitch MCP in the settings.
Paste your API key to link your accounts.
Finding Your Project ID
Every project in Stitch has a unique ID. You can find this in the URL of your project or in the project settings. You will need this ID so Anti-Gravity knows exactly which design to pull into your code editor.
Turning Design Into Code
Now you are ready to build the actual website. Open a blank folder in Anti-Gravity. It is helpful to set up a basic Next.js project first by running npx create-next-app@latest. This gives the AI a foundation to work on.
The Power of the Single Prompt
Open a new chat in Anti-Gravity. Use the Gemini 3.1 Pro model for the best coding logic. Give the AI a prompt like this:
"Find the project with the following ID from my Stitch account. Turn it into a real Next.js website. I have already set up the project folder. Use the designs to build the pages."
Anti-Gravity will then use the MCP tool to:
Access your Stitch project.
List every screen you designed.
Analyze the colors, fonts, and components.
Write the React code to match the design.
When it finishes, you can run npm run dev to see your site. The buttons, charts, and layouts will look exactly like the mockups you made in Stitch.
Testing Your New Website
Even AI makes mistakes sometimes. It is important to test your new website for bugs or security issues. You can use a tool called Test Sprite for this. It is an AI software testing agent that works right inside your coding environment.
You can visit Test Sprite to get started. Just like with Stitch, you can add Test Sprite as an MCP server in Anti-Gravity.
Running Automated Tests
You can ask the AI to run a "front-end test." The AI will actually record its screen while it clicks on buttons and fills out forms on your site.
Test TypeWhat it ChecksFront-end TestChecks if buttons work and layouts look right.Backend TestChecks if data is saved correctly.Security TestLooks for holes that hackers might use.
If a test fails, Test Sprite gives you a test report. You can drag this report into the Anti-Gravity chat and say, "Please fix these issues." The AI will read the report and update your code automatically.
Why This Workflow Matters
This process changes how people build software. You no longer need to spend hours manually copying CSS values or exported images. The AI understands the design system and applies it directly to the code.
Key Benefits of this Workflow:
Speed: Go from idea to code in under ten minutes.
Accuracy: The code matches the design perfectly.
Updates: If you change the design in Stitch, you can ask Anti-Gravity to update the code to match.
Quality: Using Test Sprite ensures your site actually works before you launch it.
Build Your First AI App Today
You have the tools to create professional websites faster than ever. Start by designing your vision in Stitch, then let Anti-Gravity handle the heavy lifting of coding.
Create your UI in Google Stitch.
Connect the API to Anti-Gravity.
Run the prompt to generate your Next.js site.
Verify everything with Test Sprite.
This workflow is a powerful way to turn your ideas into reality. Give it a try and see how much time you can save on your next project.
Conclusion
The combination of Google Stitch and Anti-Gravity is a massive step forward for developers and designers. It removes the wall between making a design look good and making it work. You can focus on the big ideas while the AI handles the repetitive parts of building components and styling pages.
By adding a testing layer like Test Sprite, you also make sure your code is high quality. This workflow is not just about moving fast. It is about building better software with fewer errors. Whether you are a pro developer or just starting out, these tools will help you build amazing things in 2026.