Security checklist
Security checklist for Rocket.new Build apps: protect API keys, configure authentication, apply row-level security, and handle user data privately.
Rocket generates production-grade code, but security is a shared responsibility. This guide covers the essential security practices you should follow before launching any app - especially apps that handle user data, payments, or sensitive information.
Never ship an app with API keys exposed in client-side code or authentication disabled on protected routes. Review this checklist before every production deployment.
API key management
API keys grant access to services like Supabase, Stripe, and third-party APIs. Exposing them in your frontend code means anyone can see and misuse them.
sk_, key_, or secret)Ask Rocket to help:
Move all API keys to environment variables and make sure they're only accessed from server-side API routes.Rocket stores environment variables securely and injects them at build time. They are never exposed in the client-side bundle.
Authentication
If your app has user accounts, protected pages, or personalized content, you need authentication.
Ask Rocket to help:
Add authentication to my app using Supabase Auth. Protect the dashboard and settings pages so only logged-in users can access them. Add sign up, log in, and password reset pages.Row-level security (RLS)
If you're using Supabase, row-level security ensures users can only access their own data at the database level - even if there's a bug in your application code.
service_role key in client-side code - it bypasses RLS entirelyAsk Rocket to help:
Enable row-level security on all Supabase tables. Add policies so users can only read and write their own data. Make sure the service_role key is only used in server-side API routes.RLS is the last line of defense. Even if your API has a bug that sends the wrong query, RLS will prevent data leaks at the database level.
Environment variables
Environment variables keep sensitive configuration out of your source code.
NEXT_PUBLIC_) contain only non-sensitive valuesAny environment variable prefixed with NEXT_PUBLIC_ is visible to anyone using your app. Only use this prefix for values that are safe to expose publicly, like your Supabase project URL (not your secret key).
For step-by-step instructions on adding and managing environment variables in the editor, see Environment variables.
HTTPS and transport security
Rocket automatically provisions SSL certificates for all deployed apps, including custom domains. You don't need to configure HTTPS manually.
Privacy considerations
Ask Rocket to help:
Add a privacy policy page to my app. Include a cookie consent banner. Add an account deletion option in user settings.Security audit prompt
Before each deployment, ask Rocket to run a security check on your app:
Review my app for security issues. Check for exposed API keys, missing authentication on protected routes, Supabase RLS status, and any client-side code that handles sensitive data.This won't catch everything, but it's a fast way to surface common mistakes.

