Vibecode Cloud vs Supabase vs Firebase
How the Database Works
How Auth Works
APIs and Integrations
Viewing Your Data
What’s a Backend?
When you use an app—say, a to-do list—your tasks need to be saved somewhere so they’re still there when you come back tomorrow. That “somewhere” is the backend. It’s a server that runs behind the scenes, storing your data, handling logins, and calling external APIs securely. In Vibecode, every project includes a backend server powered by Hono. You don’t need to configure it—it’s already wired up and ready to go. When you deploy your app, the backend deploys with it. Without a backend, your app can only store data on the user’s device (it disappears if they delete the app), can’t share data between users, and can’t safely call APIs without exposing secret keys. A backend solves all of this.The Database (SQLite)
Your app uses SQLite as its database—a simple, fast, and reliable database that stores everything in a single file. It’s the same database engine used by most mobile apps in the world, including every iPhone and Android phone. Prisma is used as the ORM to interact with it. When auth is set up, your database automatically includes tables for users, sessions, accounts, and verification codes. Beyond that, the AI can add any tables your app needs—products, posts, messages, orders, whatever you describe.Authentication (Better Auth)
Authentication is how your app knows who is using it. Vibecode uses Better Auth as the auth system for your project. By default, Vibecode sets up email one-time passwords (OTP) so users can sign in without passwords. On top of that, Better Auth supports 30+ auth providers, so you can also add Google, Apple, GitHub, Discord, Microsoft, and more.Default sign-in flow
- User enters their email on the login screen
- A 6-digit code is sent to their inbox via Vibecode’s built-in email service
- User enters the code and they’re signed in
Sessions and protected routes
Once signed in, a session keeps the user authenticated as they use your app. Your backend always knows who’s making each request, so you can show users only their data, prevent unauthorized access, and personalize the experience. Your app automatically has public routes (like the login page) and protected routes (like a dashboard). If someone isn’t logged in and tries to visit a protected screen, they’re redirected to login automatically.Adding Google, Apple, and any other Better Auth provider
Email OTP is the default, but you are not limited to it. Google sign-in has a guided setup built into Vibecode. When you ask the AI to add Google auth, Vibecode walks you through creating OAuth credentials in the Google Cloud Console and provides the correct redirect URLs for your project. Apple sign-in is available now, but it is a more manual setup. In practice, the flow is:- Follow the relevant provider tutorial in the Better Auth docs
- Create the provider credentials in Apple, GitHub, Discord, or whichever platform you want
- Add the required environment variables to your Vibecode project
- Ask the AI to wire the provider into your existing Better Auth setup
APIs and Integrations
Your backend is also where external API calls happen. Things like AI text generation, image generation, weather data, and more should always be called from the backend—never directly from the frontend. This keeps your API keys safe and hidden from users. In Vibecode, all API integrations are proxied through Vibecode and paid for with your Vibecode credits at no additional markup. You don’t need to create separate accounts with OpenAI, ElevenLabs, or other providers—just use the integration and it’s billed directly to your Vibecode credits. Browse all available integrations and their pricing at vibecodeapp.com/integrations.Getting Started
You usually do not need to set any of this up manually. Just tell the AI what you need:- “Add user accounts to my app” — Sets up auth with login screens
- “I need to save data for each user” — Sets up the database with user-specific tables
- “Add a backend with login and a database” — Sets up everything at once
- “Add Google sign-in to my app” — Uses the guided Google setup flow
- “Add Apple sign-in using Better Auth” — Uses Better Auth’s Apple setup pattern
- “Add GitHub auth using Better Auth” — Works for other Better Auth providers too
Use Supabase or Firebase Instead
Already have a Supabase or Firebase project, or want one? The agent can connect your app to it:- Create the project at supabase.com or in the Firebase console
- Copy its connection details: for Supabase, the project URL and public (anon) key, plus the service role key if the backend needs full access; for Firebase, the web or app config
- In Vibecode, open the Env Var tab and add them. Put public keys under Frontend and secret keys (like Supabase’s service role key) only under Backend.
- Ask the agent, for example: “Use my Supabase project for the database and login instead of the built-in backend. The keys are in the env vars.”
- Set up the tables and security rules the agent asks for in Supabase or Firebase, then test sign-in on a deployed app or real device
Viewing and Managing Your Data
Once your app has a database, you can view and edit your data from the deployment dashboard. After deploying your app, go to the Database tab to browse tables, view records, and make edits. This is useful for debugging, customer support, and content management.Frequently Asked Questions
Do I need to set up the database myself?
Do I need to set up the database myself?
Can I use Supabase with Vibecode?
Can I use Supabase with Vibecode?
Can I use a different database than SQLite?
Can I use a different database than SQLite?
What happens to my database when I deploy?
What happens to my database when I deploy?
How do users sign in?
How do users sign in?
Do I need Sign in with Apple for the App Store?
Do I need Sign in with Apple for the App Store?
Does the App Store require account deletion?
Does the App Store require account deletion?
My users are stuck on the login screen after entering the code. What's wrong?
My users are stuck on the login screen after entering the code. What's wrong?
Which plan includes database and auth?
Which plan includes database and auth?
