This document analyzes common integration and deployment strategies across AI coding assistant implementations. It covers external service integration patterns (databases, payments, AI/ML providers), secrets management approaches, environment variable handling, and deployment workflows. These patterns represent evolved best practices for connecting AI-generated code to production-ready infrastructure.
For information about security aspects of integrations, see Security Models and Safety Constraints. For parallel execution patterns that optimize integration calls, see Parallel Execution Patterns and Constraints.
AI coding assistants integrate with external services to enable production-ready application development. The integration ecosystem spans databases, payment processors, AI/ML services, and deployment platforms.
Sources: High-level Diagram 4 (External Integration Ecosystem)
Supabase emerges as the dominant database choice, appearing in v0, Lovable, and Antigravity implementations. Systems provide specific guidance on client initialization, Row Level Security (RLS), and authentication flows.
v0 Supabase Requirements:
| Requirement | Implementation | Location |
|---|---|---|
| Client-side client | createBrowserClient from @supabase/ssr | v0 Prompts and Tools/Prompt.txt589 |
| Server-side client | createServerClient from @supabase/ssr | v0 Prompts and Tools/Prompt.txt590 |
| Singleton pattern | Prevents client creation errors | v0 Prompts and Tools/Prompt.txt591 |
| RLS enforcement | MANDATORY for data protection | v0 Prompts and Tools/Prompt.txt637 |
| Auth redirect | NEXT_PUBLIC_DEV_SUPABASE_REDIRECT_URL or window.location.origin | v0 Prompts and Tools/Prompt.txt605-613 |
| No dashboard usage | SQL scripts run from /scripts folder | v0 Prompts and Tools/Prompt.txt594-595 |
Lovable Supabase Documentation Search:
Lovable provides dedicated tools for searching and retrieving official Supabase documentation:
supabase--docs-search: Search documentation via Content API, returns ranked results with title, slug, URL, and content snippetsupabase--docs-get: Fetch complete documentation page by slug, returns structured content with markdown and headingsSources: v0 Prompts and Tools/Prompt.txt587-640 Lovable/Agent Tools.json256-285
v0 explicitly mandates using @neondatabase/serverless package and the neon(...) function to create a reusable SQL client. The @vercel/postgres package is explicitly prohibited for Neon databases.
Sources: v0 Prompts and Tools/Prompt.txt643-648
Upstash for Redis uses two environment variables: KV_REST_API_URL and KV_REST_API_TOKEN. This integration appears in both v0 and Antigravity.
Sources: v0 Prompts and Tools/Prompt.txt650-653
| Pattern | Description | Systems |
|---|---|---|
| No ORM default | Direct SQL preferred unless requested | v0 |
SQL scripts in /scripts | Database setup via executable scripts | v0 |
| Versioned migrations | New scripts instead of editing existing | v0 |
| RLS mandatory | Row Level Security non-negotiable | v0 |
| Server components for auth | Avoid useEffect permission checks | v0 |
Sources: v0 Prompts and Tools/Prompt.txt557-561 v0 Prompts and Tools/Prompt.txt636-637
Lovable implements a dedicated secrets management system with encrypted storage:
Key principles:
secrets--add_secret tool, never directly from usersecrets--update_secret for modifying existing secretsSources: Lovable/Agent Tools.json230-255
v0 Environment Variable Rules:
NEXT_PUBLIC_ prefix.env files are NOT supported in v0's Next.js runtimeSources: v0 Prompts and Tools/Prompt.txt456-458
| Integration | Variables | Notes |
|---|---|---|
| Supabase | SUPABASE_URL, SUPABASE_ANON_KEY, NEXT_PUBLIC_DEV_SUPABASE_REDIRECT_URL | Auto-configured when integration added |
| Stripe | STRIPE_SECRET_KEY, STRIPE_PUBLISHABLE_KEY, NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY | Sandbox claimable from Connect section |
| xAI | XAI_API_KEY | Only when Grok explicitly requested |
| Groq | GROQ_API_KEY | Only when Groq explicitly requested |
| Fal AI | FAL_KEY | Used with @fal-ai/serverless |
| DeepInfra | DEEPINFRA_API_KEY | Only when explicitly requested |
| Neon | DATABASE_URL | Standard PostgreSQL connection string |
| Upstash | KV_REST_API_URL, KV_REST_API_TOKEN | Redis REST API credentials |
Sources: v0 Prompts and Tools/Prompt.txt646-687
Both v0 and Lovable implement Stripe payment integration with specific workflows:
v0 Stripe Workflow:
Lovable Stripe Workflow:
stripe--enable_stripe toolSources: v0 Prompts and Tools/Prompt.txt576-587 Lovable/Agent Tools.json399-406
v0 and Antigravity implement comprehensive AI/ML integration strategies allowing users to choose between different providers:
v0 AI Integration Rules:
| Scenario | Approach | Reason |
|---|---|---|
| Default AI needs | Use Vercel AI Gateway | No configuration needed |
| User requests Grok | Use xAI integration with xai("grok-4") | Explicit user preference |
| User requests Groq | Use Groq integration | Explicit user preference |
| User requests Fal | Use Fal integration with @fal-ai/serverless | Explicit user preference |
| Image generation | Use Fal integration | Specialized capability |
| User requests DeepInfra | Use DeepInfra integration | Explicit user preference |
AI SDK Integration:
v0 uses the AI SDK from sdk.vercel.ai exclusively:
'ai' and '@ai-sdk' packagesruntime = 'edge' in API routes with AI SDK'langchain' or 'openai-edge'Sources: v0 Prompts and Tools/Prompt.txt318-343 v0 Prompts and Tools/Prompt.txt563-680
Lovable implements image generation via Fal AI with multiple models:
Generation guidelines:
flux.schnell for images <1000px (faster, good quality)flux.dev for large fullscreen images like hero images (max 1920x1920)Image editing capabilities:
Sources: Lovable/Agent Tools.json299-350
Windsurf implements a comprehensive deployment pipeline to Netlify with automated configuration and status checking:
Deployment tool specifications:
| Tool | Purpose | Key Parameters |
|---|---|---|
read_deployment_config | Validate project readiness | ProjectPath (absolute) |
deploy_web_app | Deploy to Netlify | Framework (enum), ProjectPath, ProjectId, Subdomain |
check_deploy_status | Monitor deployment | WindsurfDeploymentId |
Framework support:
Windsurf supports 16+ frameworks: eleventy, angular, astro, create-react-app, gatsby, gridsome, grunt, hexo, hugo, hydrogen, jekyll, middleman, mkdocs, nextjs, nuxtjs, remix, sveltekit, svelte.
Deployment workflow rules:
read_deployment_config first to check all required files existProjectId from deployment configProjectId empty and provide unique SubdomainProjectId, leave Subdomain emptycheck_deploy_status after deploy_web_app completesSources: Windsurf/Tools Wave 11.txt27-33 Windsurf/Tools Wave 11.txt88-100 Windsurf/Tools Wave 11.txt195-201
v0 provides built-in deployment to Vercel via UI controls:
v0 deployment options:
Sources: v0 Prompts and Tools/Prompt.txt850-870
v0 uses a unified tool for both checking and requesting integrations:
Integration checking workflow:
GetOrRequestIntegration to check database schema and connectionsTroubleshooting integrations:
When integrations fail, v0 instructs users to check:
Sources: v0 Prompts and Tools/Prompt.txt531-543
Windsurf and Antigravity implement Model Context Protocol (MCP) for external resource access:
MCP capabilities:
list_resources: Lists available resources from specified MCP serverread_resource: Retrieves specific resource contents by URISources: Windsurf/Tools Wave 11.txt171-177 Windsurf/Tools Wave 11.txt203-211 Google/Antigravity/Fast Prompt.txt420-436
Antigravity specifies explicit technology preferences for web application development:
| Layer | Technology | Rationale |
|---|---|---|
| Structure | HTML | Maximum flexibility |
| Logic | JavaScript | Core language |
| Styling | Vanilla CSS | Maximum control, avoid TailwindCSS unless requested |
| Framework | Next.js or Vite | Only for complex web apps explicitly requested |
| Initialization | npx -y with --help flag | Non-interactive mode, auto-install dependencies |
| Dev Server | npm run dev | Standard development workflow |
| Production Build | Only on explicit request or validation | Not default |
Project initialization rules:
npx -y to automatically install scripts and dependencies--help flag first to see available options./ (e.g., npx -y create-vite-app@latest ./)Sources: Google/Antigravity/Fast Prompt.txt19-31
v0 implements Next.js 16 specific features:
Critical Next.js 16 changes:
params, searchParams, headers, and cookies are NO LONGER synchronous - MUST be awaitedmiddleware.ts now proxy.js (backwards compatible)revalidateTag() requires cacheLife profile as second argument (e.g., 'max', 'days', 'hours')cacheComponents: true in next.config.jsSources: v0 Prompts and Tools/Prompt.txt346-434
| Integration Type | Primary Systems | Configuration Method | Key Requirements |
|---|---|---|---|
| Supabase | v0, Lovable, Antigravity | Auto-configured when added | RLS mandatory, singleton client pattern |
| Neon | v0, Antigravity | DATABASE_URL env var | Use @neondatabase/serverless, never @vercel/postgres |
| Stripe | v0, Lovable | Claimable sandbox (v0) or prompt (Lovable) | Install before building payment UI |
| AI Gateway | v0 | Default, no setup | Use for all AI unless provider explicitly requested |
| xAI/Grok | v0, Antigravity | XAI_API_KEY when requested | Only when user explicitly asks for Grok |
| Fal AI | v0, Antigravity, Lovable | FAL_KEY | Image generation, use @fal-ai/serverless |
| Deployment | Windsurf, v0 | Platform-specific tools | Windsurf: Netlify pipeline, v0: Vercel Publish button |
Sources: All cited sources throughout document
Refresh this wiki