This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This project uses declarative Supabase schemas with one table per file under supabase/schemas/public/.
To bootstrap or re-sync from production baseline:
- Link the project:
supabase link --project-ref tvstbbuidvwgelgidaqy - (Optional) Dump production public schema:
supabase db dump --linked --schema public --file supabase/schemas/prod.sql - Break
prod.sqlinto per-table files undersupabase/schemas/public/or reconcile incrementally.
When schema changes are made:
- Edit the SQL files under
supabase/schemas/public/(one table per file). - Generate a migration from the declared state:
supabase db diff -f <migration_name>. - Apply migrations to the linked project:
npm run db:push. - Regenerate TypeScript types:
npm run db:gen-types.
Development with Turbopack and Velite
This project uses Velite for crafting demo stations which historically ran via a webpack plugin. Turbopack (Next's Rust bundler) doesn't run webpack plugins. To run the dev server with Turbopack while keeping Velite's watch process:
-
Start dev (runs velite watcher and Next with Turbopack):
npm run dev
(The
devscript exports NEXT_TURBOPACK=1 and runsvelite --watchin the background beforenext dev --turbo.) -
If you prefer not to use Turbopack, run the old flow:
npm run velite:dev npm run dev:webpack # not present by default; use
next devto run Webpack-based dev server
Notes
- Ensure your shell supports
bash -cwhen runningnpm run devlocally (macOS/Linux). For Windows PowerShell/CMD, run the steps manually or installconcurrentlyand update scripts accordingly. - When running in CI or environments that don't support background processes, run Velite build separately (e.g.,
npm run velite:build) during the build step.
Storage buckets (local dev)
To mirror production storage buckets locally, configure them in supabase/config.toml under [storage.buckets.<name>] (this repo already defines a photos bucket). Then link the CLI and create them in the linked project:
- Link supabase CLI to your project:
supabase link --project-ref tvstbbuidvwgelgidaqy - (Optional) Place files under folders in
supabase/storage/
Note: The local supabase start process may also create buckets declared in config.toml depending on CLI version. If you need seeded files in storage for CI/dev, run an upload step after linking the project.
