Backend Systems
Natively supports two backend systems for your app’s server-side functionality. This guide helps you understand which one you’re using and how each works.Which Backend Am I Using?
Quick Check: Look at the preview header in your project.
- See a “Database” button? → You’re using Liquid Backend (Specular)
- No “Database” button? → You’re using Supabase
Liquid Backend (Specular)
Liquid Backend is Natively’s integrated backend system powered by Specular. It automatically generates APIs and databases from natural language.For complete Specular documentation, visit docs.specular.dev/specular
What Liquid Backend Provides
RESTful APIs
Automatic API endpoint generation from natural language
PostgreSQL Database
Fully managed database with automatic schema creation
Authentication
User registration, login, and session management
File Storage
Upload and serve images and files
When Liquid Backend Is Created
The AI automatically creates backend functionality when you request:- User authentication - Sign up, login, password reset
- Data persistence - Saving data across sessions
- User-specific data - Data tied to user accounts
- API integrations - External services requiring server-side secrets
- AI features - ChatGPT or other AI model integrations
Example Prompts
Database Viewer
With Liquid Backend, you can view your data directly in Natively:- Click the Database icon (🗄️) in the preview header
- Browse tables on the left sidebar
- View records and their values
- Verifying data is saving correctly
- Debugging data-related issues
- Understanding the database structure
Logs Viewer
Liquid Backend includes a Logs Viewer in Natively:- Click the Logs icon in the preview header
- Switch between “Frontend” and “Backend” tabs
- View API calls, errors, and debug information
Environment Variables (Liquid Backend)
For Liquid Backend projects, environment variables are managed through Specular:- Server-side secrets (API keys, tokens) are stored securely in Specular
- Frontend variables can be added via More → Environment Variables
- Variables are automatically available to your backend code
Production Deployment
When deploying your app with Liquid Backend:Supabase
Supabase is an open-source Firebase alternative that provides database, authentication, and storage. Some projects use Supabase for specific requirements.How Supabase Works
Unlike Liquid Backend which generates APIs automatically, Supabase provides:- Direct Database Access - Your app connects directly to PostgreSQL
- Supabase Client SDK - Uses
@supabase/supabase-jsfor queries - Row Level Security (RLS) - Security rules defined in Supabase Dashboard
- OAuth Integration - Natively connects to your Supabase project via secure OAuth
Connecting Supabase
Natively uses OAuth to securely connect to your Supabase project:Managing Your Supabase Database
Since there’s no Database Viewer for Supabase in Natively, you’ll manage your database through: Supabase Dashboard - supabase.com/dashboard- Table Editor for viewing/editing data
- SQL Editor for running queries
- Schema management
Logs for Supabase
To view Supabase logs:- Go to supabase.com/dashboard
- Select your project
- Navigate to Logs in the sidebar
- Choose the log type:
- API Logs - REST API requests
- Postgres Logs - Database queries
- Auth Logs - Authentication events
- Edge Function Logs - Serverless function logs
Environment Variables (Supabase)
Supabase connection is handled automatically via OAuth. The OAuth integration manages your connection securely without requiring manual API key configuration. For additional environment variables needed by your app, use More → Environment Variables.Supabase Features
| Feature | How to Use |
|---|---|
| Database | Supabase Dashboard Table Editor |
| Authentication | Supabase Auth (email, OAuth, phone) |
| Storage | Supabase Storage buckets |
| Edge Functions | Deploy via Supabase CLI |
| Realtime | Subscribe to database changes |
| RLS Policies | Define in Supabase Dashboard |
Comparison Table
| Feature | Liquid Backend (Specular) | Supabase |
|---|---|---|
| Database Viewer in Natively | ✅ Yes | ❌ No (use Dashboard) |
| Backend Logs in Natively | ✅ Yes | ❌ No (use Dashboard) |
| API Generation | Automatic from prompts | Manual or via AI |
| Environment Variables | Managed in Specular | OAuth + manual |
| Authentication | Built-in | Supabase Auth |
| Database Access | Via generated REST APIs | Direct client SDK |
| Schema Management | AI-generated | Supabase Dashboard |
| Production Deploy | One-click in Natively | Automatic (Supabase hosted) |
Migration
If you need to switch backend systems, you can only migrate from Liquid Backend (Specular) to Supabase—not the other way around.When to Consider Migration
In most cases, Liquid Backend will get you further. Consider migrating to Supabase only if you specifically need:- PostgreSQL functions and triggers
- Supabase-specific features (Realtime subscriptions, Edge Functions)
- Integration with existing Supabase infrastructure
- Direct SQL access for complex queries
Migration from Specular to Supabase
If you must migrate:Troubleshooting
I don't see the Database button
I don't see the Database button
Backend logs not showing
Backend logs not showing
- Liquid Backend: Click the Logs icon and select “Backend” tab
- Supabase: Logs are only available in the Supabase Dashboard
Environment variables not working
Environment variables not working
- Liquid Backend: Check Specular configuration
- Supabase: Connection is managed via OAuth; additional vars in More → Environment Variables
API calls failing
API calls failing
- Liquid Backend: Check backend logs in Natively
- Supabase: Check API logs in Supabase Dashboard