· 6 min read
From prompt to production: what your vibe coded app still needs
A working demo is not a production app. Here is what to add before you take real users and payments: auth, secrets, backups, and more.
A demo that works in a builder's preview environment is a long way from an app you can charge money for. AI tools generate code quickly, but they do not handle hosting environments, secrets management, authentication, backups, or error tracking for you. Those gaps are your responsibility. This guide walks through each one.
Get your code and environments under control
The first thing to do after your app works in a builder is push the source code to a private Git repository in an account the business controls. That means you, not the AI platform, own the main branch. Protect it, review every diff before merging, and keep a tested rollback path ready. If a generated change breaks something in production, you need to be able to revert in minutes, not hours.
Next, separate your environments. Run distinct development, staging, and production setups, each with its own database and credentials. If you experiment or run migrations inside the builder's test environment and it shares a connection with live data, you risk corrupting or losing real user records. Staging should mirror your production configuration closely enough that a deployment tested there is likely to work in production. (https://blackthorn.ai/blog/vibe-coded-prototype-to-production/)
For deployments, Cloudflare Pages can build and serve a repository-based web app. A Vite project typically uses npm run build as the build command and dist as the output directory, with production environment variables configured separately from your dev setup. Check Cloudflare's official pricing page for current plan details, as prices and quotas can change. (https://www.masaischool.com/resources/build/ship-a-vibe-coded-app-to-production)
If you are evaluating deployment options, the Vercel and Netlify tool pages on AppVibed compare alternatives worth reviewing.
Add authentication, authorization, and row-level security
Authentication and authorization are not the same thing, and AI-generated apps often handle neither correctly by default.
Authentication confirms who a user is. Amazon Cognito handles sign-in and can connect to corporate identity providers via SAML or OIDC. Services like Clerk or Auth0 offer similar capabilities with different integration models. For current pricing and quotas on any of these, check the vendor's official documentation before committing.
Authorization controls what an authenticated user may do. Every server-side request must verify this independently. Do not trust the browser to enforce access rules. Test authorization with separate user accounts and confirm that user A cannot read, modify, or delete user B's records. If your app uses a database with row-level security, such as Supabase, enable RLS on every relevant table and write policies that reflect your actual access rules. Having a policy in place is not evidence that it is correct, test directly against the API. (https://maniruzzamanjubayer.com/blog/vibe-coded-app-to-production)
This combination of auth work is not suitable to skip if you are storing any personally identifiable data or if different users should see different records.
Secure your secrets and harden payments
API keys embedded in browser JavaScript are public. Anyone who views your page source or inspects network requests can read them. Move all secrets to server-side functions or a secrets manager. If a key has already reached a browser bundle, a repository, or a commit history, rotate it immediately. The fact that it was there for a short time is enough reason to treat it as compromised. (https://www.dotsquares.com/au/press-and-events/tech/deploy-vibe-coded-claude-code-apps-to-production)
For payments, enforce all financially consequential logic on the server side. Browser code can be edited by any user. Test for edge cases your AI tool almost certainly did not handle:
- Duplicate payment submissions
- Failed payment retries
- Malformed or missing input
- Timeouts mid-transaction
- Plan limits and role checks
The research notes do not name a specific recommended payment processor, so check the Stripe tool page for one widely used option, and verify current fees and limits with the provider directly before you go live.
Rate-limit your login and any AI-powered endpoints. Without rate limits, both are open to abuse and can generate unexpected infrastructure or model-call bills. Set spending ceilings for every metered service you use: hosting, databases, model calls, and builder credits. (https://controlplane.com/blog/post/make-vibe-coded-app-production-ready)
Add backups, error tracking, and a named owner
Rolling back your code does not restore your database. Those are separate systems. Set up production data backups that are independent of source-code versioning, and run at least one real restore test before you open to paying users. If you have never actually restored from a backup, you do not know whether your backup works. The research notes do not establish a specific backup product, retention period, or current price, so research options and verify details with the vendor. (https://www.dulandias.com/guides/vibe-coded-app-to-production)
For monitoring, production needs structured logging, health checks, alerting, and a person assigned to respond when something breaks. Error handling in your code should cover failure states, not just the happy path. Sentry is one widely used error-tracking option worth reviewing. Verify current pricing and event quotas directly with the vendor before choosing a plan.
Security review should cover:
- Every endpoint that touches user data (check auth and authorization)
- Dependencies and generated code scanned for known vulnerabilities
- Secrets audit across code, history, and environment variables
- Manual review of login, payment, and personal-data flows
Automate tests to run on pull requests and gate production deployments on passing tests. For changes involving payments or authentication, add a human approval step before merge. (https://www.superblocks.com/blog/vibe-coding-aws)
Assign a named owner for alerts and incidents. Keep all accounts and third-party integrations registered to the business, not a personal email. Document how to deploy, roll back, and restore in writing, not just in someone's head. If you are building for a client, the vibe coders directory lists experienced builders who handle this kind of production setup regularly.
This checklist is not optional for teams accepting payments or personal data. It is also not a one-time task. Each new feature that touches user data, money, or external APIs brings the same set of questions back.
Common questions
Do AI builders handle any of this automatically?
Some platforms include hosting and basic authentication, but they do not handle authorization rules, secrets rotation, backup restore tests, rate limiting, or security review. Production readiness requires decisions only you can make about your app's access rules and data. (https://maniruzzamanjubayer.com/blog/vibe-coded-app-to-production)
Is staging really necessary for a small team?
Yes. Without a staging environment that mirrors production, you are testing on live data with real users. A single migration or generated schema change run in the wrong environment can wipe or corrupt production records.
What is the difference between authentication and authorization?
Authentication confirms a user's identity at sign-in. Authorization controls what that confirmed user may read or change. Both must be enforced on the server side, and both must be tested with real accounts. (https://maniruzzamanjubayer.com/blog/vibe-coded-app-to-production)
Why is a code rollback not enough to recover from a bad deployment?
Code and data are separate. Rolling back your repository to a previous version restores the application logic but leaves the database in its current state. If the broken deployment ran a migration, modified records, or deleted data, that is not undone by reverting code. That is why you need separate database backups and restore tests.
Who should own the production infrastructure for a vibe coded app?
The business should own every account: hosting, database, auth provider, error tracker, payment processor. A named person should be responsible for responding to alerts. If that person leaves, the business should still control all credentials and be able to operate or hand off the system.


