Supabase Postgres
Swap the default SQLite database for a Supabase-hosted Postgres database in any LaraCopilot project with a single toggle — no manual config needed.
LaraCopilot can swap the default SQLite database in any generated project for a Supabase-hosted Postgres database. You connect your Supabase account once, then attach a database to any project from its IDE — either auto-creating a fresh Supabase project or linking an existing one.
This integration is database-only. Supabase Auth, Storage, Edge Functions, and Realtime are not wired into the generated app.
Step 1 — Connect your Supabase account
- In LaraCopilot, open Supabase from the sidebar
- Click Connect with Supabase — you'll be redirected to authorize LaraCopilot in your Supabase account
- Approve the request — you're returned to LaraCopilot with the connection marked active
You only need to do this once. The same connection is reused for every project you link.
Using a Personal Access Token instead
If OAuth isn't available (e.g. self-hosted Supabase), expand Use a Personal Access Token instead (advanced) on the Supabase page and:
- Generate a token at supabase.com/dashboard/account/tokens
- Paste it into the Personal Access Token field
- Add an optional label (e.g. "Personal account") and click Save & Verify
Tokens are stored encrypted and the value is never shown again — only the last 4 characters appear in the UI.
Step 2 — Attach Supabase to a project
- Open the project in the IDE
- Click Settings → Integrations
- Toggle Supabase Postgres on — a confirmation modal opens
LaraCopilot checks whether you already have a Supabase project with the same name as your LaraCopilot project's unique ID, and offers one of two flows.
Option A — Create a new Supabase project
If no matching project exists (or you choose Create new in the modal):
- Pick a region close to your users
- Click Create & link
LaraCopilot then:
- Creates a fresh Supabase project named after your LaraCopilot project
- Generates a strong database password
- Writes the connection details to your project's
.env - Runs Laravel migrations against the new database
The whole flow takes roughly 1–3 minutes while Supabase provisions the project. Keep the page open until it completes.
Option B — Use an existing Supabase project
If a Supabase project with the same name already exists, choose Use existing:
- Paste the database password you set for that Supabase project
- Click Link
You're asked for the password because Supabase's API does not expose passwords for existing projects — only you know it. If you've forgotten it, reset it in the Supabase dashboard under Project Settings → Database.
Step 3 — Verify it worked
- Open your Supabase dashboard → Table Editor
- You should see your Laravel migration tables (e.g.
users,migrations,password_reset_tokens)
In LaraCopilot, the IDE Settings → Integrations panel shows the linked project's name, region, and pooler host.
Re-running migrations
After editing migration files, click Run migrations in the IDE Settings → Integrations panel. The artisan output is shown in a debug panel so you can see exactly what ran.
LaraCopilot uses the Supabase session pooler (IPv4, supports prepared statements). The transaction pooler is never selected automatically because it doesn't support prepared statements, which Laravel relies on.
If a migration fails because the pooler hostname doesn't resolve, LaraCopilot transparently tries other regional cluster prefixes (e.g. aws-0-..., aws-1-...) until one connects. This is automatic — no action required.
Unlinking a project
To disconnect a single project from Supabase:
- Open the IDE → Settings → Integrations
- Toggle Supabase Postgres off (or click Unlink)
LaraCopilot:
- Removes all Supabase fields from the project record
- Resets
DB_CONNECTIONtosqlitein the project's.env - Recreates the local SQLite file and re-runs migrations against it
The Supabase project itself is left untouched — you can re-link to it later or delete it manually from the Supabase dashboard.
Disconnecting your entire Supabase account
To remove the LaraCopilot ↔ Supabase connection altogether:
- Go to Supabase in the sidebar
- Click Disconnect Supabase and confirm
This:
- Deletes your stored token / OAuth credentials
- Reverts every linked project back to SQLite in a single transaction
No Supabase projects are deleted on Supabase's side.
Troubleshooting
| Problem | Solution |
|---|---|
| "Something went wrong with Supabase" toast | Check the IDE's debug panel for the artisan output. If linking, verify the database password is correct. |
| Migrations succeed but tables don't appear | Refresh the Supabase dashboard's Table Editor — it caches schema briefly. |
| "Use existing" asks for a password I don't have | Reset the database password in Supabase → Project Settings → Database, then paste the new value. |
| OAuth button does nothing or shows a generic error | Your LaraCopilot installation may be missing Supabase OAuth credentials. Use the Personal Access Token flow instead, or contact your administrator. |
| Provision hangs longer than 5 minutes | Supabase occasionally takes longer to provision. Re-open the modal; if a Supabase project was created, choose Use existing to link it. |
What's stored
| Item | Where | Notes |
|---|---|---|
| Personal Access Token | Encrypted in supabase_connections | Never returned to the browser; only the last 4 characters shown |
| OAuth refresh token | Encrypted in supabase_connections | Rotated automatically by Supabase on each refresh |
| Database password | Encrypted per project | Generated by LaraCopilot for auto-provisioned projects; collected from you for existing ones |
| Connection settings | Project's .env (in the container) | DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD |
Figma
Connect Figma so LaraCopilot can import your design frames as context — reading the rendered frame and its exact styles to generate matching UI.
API Tokens
Generate, view, and revoke API tokens to authenticate with the LaraCopilot Agent API and generate projects programmatically from your own tools.