Local Supabase startup, sync, reset, seeds, storage, and generated types.
The local Supabase stack backs the SaaS and API apps during development.
pnpm supabase:start
pnpm supabase:syncThe sync task pushes pending migrations and seeds to the local database (falling back to a full reset when the push fails) and then seeds the Storage buckets. OAuth-related warnings about missing Google credentials are safe unless you are testing OAuth.
Use reset only when a clean local database is intended:
pnpm supabase:resetAfter reset, browser sessions from the previous local auth database are stale. Sign in again with the seeded test account.
test@example.comPassword123!tractor-service, auto-garage, bike-scooter-shop, equestrian-centertest@example.com is also the seeded system admin. All seeded users share the same password. Local development lists every persona, including the portal-only customers test3@example.com, test4@example.com and test5@example.com and the role-specific accounts such as owner@example.com, crm.editor@example.com and viewer@example.com.
Seed files provide deterministic coverage for every shop organization: customers, contacts, roles, teams, products, inventory, customer assets, tasks, agenda items, quotes, invoices, orders, files, inbox threads, AI chat history, notifications, employees, time, expenses, hiring, workflows, webhooks, audit logs and billing read models. Files 100 to 170 in supabase/seeds/ hold the demo data, one domain per file, and each starts with a -- Covers: comment. docs/agents/supabase-schema.md describes the id scheme and the conventions for adding rows.
Storage buckets are configured through supabase/config.toml and seeded from supabase/seed-buckets/. Bucket ids match product features: users, customers, organization, assets, products, files, knowledge, ai, integrations, audit-logs, and workflows. The reset flow recreates those local buckets and loads public seed objects from the matching folders. Object paths are UUID-first ({orgId|userId}/…); never use org slugs as the tenant folder.
On a hosted project, create the eleven new buckets and delete the old ids after deploy. Existing hosted objects are discarded for this cutover; path columns 404 until objects are re-uploaded or the remote database is reset.
Regenerate packages/supabase-runtime/src/types/database.generated.ts after schema changes. Include both public and graphql_public schemas so generated types do not drop GraphQL-related definitions.
Last updated on