Documentation
Browse and explore docs
Seed the Database
The project includes a seed script at prisma/seed-all.ts that loads sample data from data/data.json and inserts it into the database using idempotent upsert operations. Seeding order matters due to foreign key dependencies:
- Products
- Profiles
- Permissions
- Role Definitions
- Orders
Run the seed script with:
npx tsx prisma/seed-all.tsImportant: Profiles are linked to Supabase auth.users by UUID. Make sure the user accounts exist in Supabase Auth before seeding, or create them via the Supabase dashboard so the UUIDs match.