Security and launch check for v0 apps

Updated

v0 defaults to Next.js with the App Router and deploys to Vercel, with databases, auth and payments added through Vercel Marketplace integrations such as Neon, Supabase and Stripe. Before launch, check that every server action and route handler verifies the user, that no secret uses the NEXT_PUBLIC_ prefix, and that database connections go through a pooler.

What you are running

  • Framework. Next.js App Router with React Server Components, server actions and route handlers. Pages render on the server, so search visibility is usually fine.
  • Integrations. Databases, storage and auth come from the Vercel Marketplace, and their keys land in the project’s environment variables.
  • Environments. The v0 preview uses Development variables, the published site uses Production ones. A key that works in preview can be missing in production.

What to check

  1. Server actions. Next.js exposes each server action as an endpoint anyone can call, not only your form. Every action that reads or changes data must check the session and the user’s rights inside the action.
  2. NEXT_PUBLIC_ variables. Anything with this prefix is written into browser code. Database URLs, Stripe secret keys and AI keys must not have it.
  3. Data in server components. A server component can pass a whole database row to a client component, including fields the user shouldn’t see. Select only the fields the page needs.
  4. Database connections. Vercel functions open many short connections. Use the pooled connection string from your provider.
  5. Webhooks. Route handlers for Stripe must read the raw body with req.text() and verify the signature.

Sources