Building a Serverless SaaS MVP in 2 Hours Using Antigravity IDE and Cursor

Building a Serverless SaaS MVP in 2 Hours Using Antigravity IDE and Cursor

💡 3-Second Summary

  • Two Frontier AI Tools in Parallel: Antigravity IDE (powered by Gemini 3.6 Flash) scaffolds backend infrastructure while Cursor Composer (driven by GPT-5.6 or Claude Sonnet 5) refines UI components simultaneously.
  • Near $0 Serverless Stack: Built using Supabase Edge Functions (Deno), Stripe Checkout billing, and Vercel hosting.
  • Real-World Fix Included: Resolves the common verify_jwt = false configuration error during Stripe webhook deployment.

I burned two nights last month waiting on a single AI agent to finish deploying a backend while my frontend sat untouched. That's the moment I realized one agent, no matter how capable, can't context-switch between writing Postgres migrations and tuning CSS button states without losing momentum somewhere.

So I stopped asking one tool to do everything. I split the work between Antigravity IDE and Cursor, gave each one a job it's built for, and had a working, billable SaaS MVP running in under two hours.


Why Two Frontier AI Tools Beat One

Antigravity IDE runs on Gemini 3.6 Flash for high-speed terminal execution and Gemini 3.1 Pro for complex 1M-token context reasoning. It can spin up headless Playwright browsers and deploy infrastructure autonomously.

Cursor, on the other hand, excels at fast, reviewable diffs. With OpenAI's GPT-5.6 reasoning engine or Anthropic's Claude Sonnet 5 / Claude Opus 5 selected in Composer mode, Cursor handles multi-file UI refactoring with surgical precision. Running both side-by-side means neither tool waits on the other.

The 2-Hour Blueprint — Role Division

Think of it like a construction site: Antigravity IDE is your site foreman managing background infrastructure, while Cursor is your finish carpenter handling UI polish.

Category Antigravity IDE Cursor VS Code (Baseline)
Core Role Multi-agent orchestration & infrastructure deployment Inline precision multi-file code editing Plain text editor
Best For Supabase function generation, Stripe wiring, terminal scripts React component polish, Tailwind layout tuning Manual coding
Frontier Model Gemini 3.6 Flash / Gemini 3.1 Pro GPT-5.6 / Claude Sonnet 5 / Claude Opus 5 None (Extension dependent)
Autonomy Full autonomy (terminal + browser execution) Semi-autonomous (user reviews each diff) Manual

Scaffolding the Backend with Antigravity (Gemini 3.6 Flash)

A serverless function is like a convenience store light that only turns on when someone walks in — you only pay for execution time. Supabase Edge Functions give you Deno-based global endpoints with zero server overhead.

Subscription Check Code (Deno/TypeScript):

// supabase/functions/check-subscription/index.ts
import { createClient } from "https://esm.sh/@supabase/supabase-js@2";

Deno.serve(async (req) => {
  const authHeader = req.headers.get("Authorization")!;
  const supabase = createClient(
    Deno.env.get("SUPABASE_URL")!,
    Deno.env.get("SUPABASE_SERVICE_ROLE_KEY")!
  );

  const token = authHeader.replace("Bearer ", "");
  const { data: { user }, error } = await supabase.auth.getUser(token);

  if (error || !user) {
    return new Response(JSON.stringify({ error: "Unauthorized" }), { status: 401 });
  }

  const { data: profile } = await supabase
    .from("profiles")
    .select("subscription_status")
    .eq("id", user.id)
    .single();

  const isPaid = profile?.subscription_status === "active";

  return new Response(JSON.stringify({ isPaid, userId: user.id }), {
    headers: { "Content-Type": "application/json" },
  });
});

🚨 Troubleshooting: The `verify_jwt` Webhook Error

When Stripe fires a webhook to Supabase, it uses its own signature header (Stripe-Signature) rather than a Supabase JWT. By default, Supabase functions reject non-JWT requests with:

Error: Function deployment failed: Invalid JWT (verify_jwt setting)

Fix this in supabase/config.toml by setting verify_jwt = false specifically for your webhook function endpoint.

Polishing Frontend with Cursor Composer (GPT-5.6)

While Antigravity handled function deployment, I opened Cursor. Selecting GPT-5.6 inside Composer mode allowed the AI agent to update app/dashboard/page.tsx and components/PricingCard.tsx in tandem, hooking up subscription auth state and Stripe Checkout redirect logic seamlessly.

Conclusion — Ship Your SaaS MVP Today

Building a serverless SaaS MVP no longer requires days of repetitive setup. By letting Antigravity IDE (Gemini 3.6 Flash) handle infrastructure automation and Cursor (GPT-5.6 & Claude Sonnet 5) refine your UI components, you can launch a fully billable product in under 2 hours.

댓글

이 블로그의 인기 게시물

Gemini Many-Shot Prompting: Why 500 Examples Beat Fine-Tuning

No More Git Conflicts: Automate PR Reviews with Cline

기밀 유출 없는 DeepSeek R1 무료 로컬 실행법