Learn how to work with Supabase locally in the Tuturuuu development workflow.
devx
command for a streamlined setup.
bun sb:devrs
when switching between branches that might have different
database migrations to ensure your local database schema matches the branch
you’re working on.sb:diff
for schema changes. If you rename columns or
tables, the migration will drop the old ones and create new ones, which can
result in data loss in production environments.apps/db/supabase/migrations
that you can edit to include your desired schema changes.
production
branch.bun sb:reset
, making it
useful when catching up with a new branch’s schema.packages/types/src/supabase.ts
. These types are accessible to all apps that have the @tuturuuu/types
package installed.
You can use these types to ensure type safety when working with Supabase data:
packages/types/src/db.ts
. These are easier to use and remember than the full database type paths:
db.ts
for tables you frequently work with. This is especially useful for tables that have complex structures or need additional client-side properties.
This ensures that your code correctly interacts with the database schema, reducing runtime errors and improving development experience.
apps/db/supabase/migrations
. These files:
main
branch. This maintains the correct
execution order and prevents issues when syncing the production database.public
). When creating tables through the Supabase UI, RLS is enabled by default. For tables created using SQL, you need to explicitly enable RLS:
apps/db/supabase/tests
with your test casesbun sb:test
command to run the testsapps/db/supabase/seed.sql
. This file is automatically executed when you run bun sb:reset
or start a fresh Supabase instance.
password123
, making it easy to log in for testing.
apps/db/supabase/seed.sql
filebun sb:reset
to apply the seed dataapps/db/supabase
directorybun sb:reset
bun supabase db dump --data-only > apps/db/supabase/new_seed.sql
seed.sql
file with your changesbun sb:reset
againai
- Core Vercel AI SDK package@ai-sdk/google
- Provider-specific integration for Google models@tuturuuu/supabase
- Supabase client with Tuturuuu-specific utilitiesmodels.ts
file in the packages/ai
directory:
packages/ai/src/object/types.ts
file:
workspace_secrets
workspace_secrets
to enable/disable AI features per workspaceworkspace_secrets
table:
.env.local
file:
local@tuturuuu.com
) as they often have additional permissions