Overview
Hiro CRM provides two seeding options:- Simple Seed - Basic brands, locations, and sample customers (JavaScript)
- Full Demo Dataset - Complete restaurant scenario with 5,000 customers and realistic data (SQL)
Simple Seed (Quick Start)
The simple seed script creates minimal test data to get started quickly.What’s Included
- 3 Brands: Manero, El Portal, MarMía
- 2 Locations: Manero Madrid, Manero Alicante
- 3 Sample Customers: With realistic Spanish names and data
Running the Simple Seed
The simple seed is idempotent - you can run it multiple times safely. It uses
upsert to avoid duplicates.Full Demo Dataset (Realistic Testing)
The full demo dataset creates a complete restaurant group scenario ideal for testing and demos.What’s Included
3 Restaurant Brands
La Tasca, El Patio, La Brisa
5 Physical Locations
Madrid and Barcelona restaurants
5,000 Customers
Realistic Spanish customer data with loyalty tiers
~25,000 Reservations
2 years of reservation history
12 Marketing Campaigns
Email and SMS campaigns with metrics
~800 NPS Surveys
Customer feedback and ratings
Customer Distribution
The demo data includes realistic loyalty tier distribution:- 45% Nuevo (1-2 visits, €35-110 spend)
- 25% Bronze (3-10 visits, €110-350 spend)
- 15% Silver (10-22 visits, €380-800 spend)
- 10% Gold (20-35 visits, €850-1,550 spend)
- 4% Platinum (30-55 visits, €1,600-3,000 spend)
- 1% Founders (50-100 visits, €3,500-8,000 spend)
Running the Full Demo Seed
Open Supabase SQL Editor
- Go to Supabase Dashboard
- Select your project
- Click SQL Editor in the sidebar
- Click New query
Copy and run the seed
- Open
supabase/seeds/demo.sqlin your code editor - Copy the entire file contents (475 lines)
- Paste into the SQL Editor
- Click Run (or press
Cmd/Ctrl + Enter)
Alternative: Supabase CLI
If you have the Supabase CLI installed:This assumes the seed file is in
supabase/seeds/demo.sql in your linked project.Demo Data Details
Brands & Locations
La Tasca (3 locations)
- La Tasca Madrid · Centro - Gran Vía, 25
- La Tasca Madrid · Salamanca - Calle Serrano, 3
- La Tasca Barcelona · Eixample - Carrer de Provença, 230
El Patio (1 location)
- El Patio Barcelona - Carrer del Consell de Cent, 302
La Brisa (1 location)
- La Brisa Madrid - Paseo de la Castellana, 200
Loyalty Program
Pre-configured loyalty program with 6 tiers:| Tier | Min Visits | Min Spend | Benefits |
|---|---|---|---|
| Nuevo | 0 | €0 | 5% discount next visit |
| Bronze | 3 | €100 | 10% discount, priority booking |
| Silver | 10 | €300 | 15% discount, preferred table, free dessert |
| Gold | 20 | €800 | 20% discount, exclusive events, personal sommelier |
| Platinum | 30 | €1,500 | 25% discount, annual tasting menu, VIP parking |
| Founders | 50 | €3,000 | Unlimited access, private chef, unique experiences |
Marketing Campaigns
12 realistic campaigns with actual metrics: Email Campaigns:- Welcome email (1,198 sent, 45% open rate)
- Valentine’s Day special (2,043 sent, 54% open rate)
- Easter menu (1,791 sent, 47% open rate)
- 1-year anniversary (3,118 sent, 58% open rate)
- Win-back campaign (756 sent, 38% open rate)
- Fall menu launch (2,801 sent, 50% open rate)
- Christmas reservations (3,412 sent, 60% open rate)
- VIP exclusive dinner (318 sent, 84% open rate)
- Spring menu (3,021 sent, 53% open rate)
- Birthday automation (372 sent, 80% open rate)
Customer Data
All 5,000 customers have:- Realistic Spanish names - Common first and last names from Spain
- Valid email addresses - Format:
[email protected] - Spanish phone numbers - Format:
+346xxxxxxxx - Geographic distribution - Primarily Madrid and Barcelona
- Visit history - Realistic first visit and last visit dates over 2 years
- Spending patterns - Correlated with loyalty tier
- Marketing consent - ~72% opted in
- Preferences - Seating preferences, tags, notes
Reservations
Reservations are generated based on each customer’s visit count:- Status distribution: Mostly “completed”, some “no_show” and “cancelled”
- Party sizes: 2-6 people (realistic distribution)
- Time slots: Lunch (13:30-14:30) and dinner (21:00-22:00)
- Source: 65% from CoverManager, 35% manual
- Date range: Distributed over 2 years from first visit to last visit
NPS Surveys
800 feedback surveys with realistic distribution:- 65% Promoters (4-5 stars) - Positive comments
- 20% Passives (3 stars) - Neutral comments
- 15% Detractors (1-2 stars) - Constructive criticism
- Overall rating (1-5)
- Food rating (1-5)
- Service rating (1-5)
- Ambiance rating (1-5)
- Optional text comments
Resetting Demo Data
To clear demo data and start fresh:Custom Seed Data
Create your own seed script for specific testing scenarios:Example: Seed Your Own Restaurant
Using Seed Data
Testing Features
With demo data loaded, you can test:Dashboard Analytics
View realistic revenue charts, customer stats, and trends
Customer Segmentation
Create segments based on loyalty tier, spend, visits
Marketing Campaigns
Test campaign creation, audience selection, preview
Reservation Management
View reservation history, analytics, patterns
Loyalty Program
See tier distribution, points tracking, rewards
NPS Analysis
Analyze feedback trends, sentiment, improvements
Demo Scenarios
Use seed data to demonstrate:- Customer Lifecycle: See customers progress through loyalty tiers
- Campaign ROI: View campaign metrics and engagement rates
- Location Comparison: Compare performance across 5 locations
- Seasonal Trends: Analyze reservation patterns over 2 years
- VIP Management: Identify and track top 1% customers
Production Considerations
Migrating from Demo to Production
When you’re ready to go live:Troubleshooting
Seed script fails with 'permission denied'
Seed script fails with 'permission denied'
Cause: Using anon key instead of service role key.Solution: Ensure
SUPABASE_SERVICE_ROLE_KEY is set in .env.local.Duplicate key errors
Duplicate key errors
Cause: Seed data already exists.Solution:
- Simple seed uses
upsert, so this shouldn’t happen - For demo seed, delete existing data first (see “Resetting Demo Data” above)
Seed takes too long
Seed takes too long
Cause: Generating 5,000+ customers and 25,000+ reservations takes time.Solution:
- Wait patiently (30-60 seconds is normal for full demo seed)
- For faster testing, use the simple seed instead
Foreign key violations
Foreign key violations
Cause: Migrations not run or tables don’t exist.Solution: Run all migrations before seeding (see Database Setup).
Next Steps
Vercel Deployment
Deploy your seeded application to Vercel
Environment Variables
Configure production environment variables
Customer Import
Import your real customer data
Database Setup
Learn more about the database schema
