Skip to main content
This quickstart guide will help you get Hiro CRM running on your local machine in under 10 minutes. You’ll set up the development environment, configure the database, and start the application.

Prerequisites

Before you begin, make sure you have:
Optional: OpenAI API key for the AI Assistant feature, and Brevo API key for email/SMS campaigns. You can add these later.

Step 1: Clone the repository

Clone the Hiro CRM repository to your local machine:
git clone https://github.com/your-org/hiro-crm.git
cd hiro-crm

Step 2: Install dependencies

Navigate to the frontend directory and install the required packages:
cd frontend
npm install
This will install all dependencies including Next.js, React, Supabase client, and other required packages.

Step 3: Create a Supabase project

You’ll need a Supabase project to store your data:
1

Sign in to Supabase

Go to supabase.com and sign in or create a free account
2

Create a new project

Click “New Project” and choose your organization. Give your project a name like “hiro-crm-dev”
3

Set a database password

Choose a strong database password and save it securely. Select a region close to you (e.g., “West EU” for Spain)
4

Wait for setup

Your project will take 1-2 minutes to provision. Grab a coffee while you wait!

Step 4: Configure environment variables

Copy the environment template and add your Supabase credentials:
cp .env.example .env.local
Open .env.local in your editor and fill in the required values:
# Get these from your Supabase project settings > API
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here

# Your app URL (use localhost for development)
NEXT_PUBLIC_APP_URL=http://localhost:3000
Never commit your .env.local file to version control. It’s already included in .gitignore.

Step 5: Set up the database

Run the database migrations to create all required tables and functions:
You can apply migrations using either the Supabase CLI or the Supabase Dashboard SQL Editor.
If you have the Supabase CLI installed:
# Link to your project
supabase link --project-ref your-project-ref

# Push all migrations
supabase db push

Option B: Using Supabase Dashboard

1

Open SQL Editor

Go to your Supabase project dashboard and click on “SQL Editor” in the sidebar
2

Run migrations

Copy the content of each migration file from supabase/migrations/ (starting with 000_MARKETING_HUB_GGP_COMPLETE_SCHEMA.sql) and run them in order
3

Verify setup

Check the “Table Editor” to confirm tables like customers, locations, campaigns, etc. were created

Step 6: Seed demo data (optional)

To explore Hiro CRM with realistic demo data:

Option A: Basic seed (locations only)

Seed basic brand and location data via the API:
# Start the dev server first
npm run dev

# In another terminal, seed locations
curl http://localhost:3000/api/admin/seed-locations

Option B: Full demo dataset

For a complete demo with 5,000 customers, reservations, and campaigns:
1

Open SQL Editor

Go to your Supabase dashboard > SQL Editor
2

Run demo seed

Copy the entire content of supabase/seeds/demo.sql and execute it
3

Wait for completion

This will create demo data for La Tasca, El Patio, and La Brisa restaurant groups with realistic Spanish customer data
The demo dataset includes:
  • 3 brands (La Tasca, El Patio, La Brisa)
  • 5 locations across Madrid and Barcelona
  • 5,000 customer profiles
  • ~25,000 reservation records
  • 12 marketing campaigns with metrics
  • Configured loyalty program with 6 tiers

Step 7: Start the development server

Start the Next.js development server:
npm run dev
You should see output like:
▲ Next.js 16.1.1
- Local:        http://localhost:3000
- Network:      http://192.168.1.X:3000

✓ Ready in 2.3s

Step 8: Access the application

Open your browser and navigate to http://localhost:3000. You’ll see the Hiro CRM landing page. Click “Acceder al Portal” to access the login page.
1

Sign up

Create your first user account using the sign-up form
2

Verify email

Check your email for the verification link from Supabase (it might be in spam)
3

Sign in

After verification, sign in with your credentials
4

Explore

You’re in! Start exploring the dashboard, customers, campaigns, and more

What’s next?

Now that you have Hiro CRM running locally, you can:

Explore the Dashboard

Check out the executive analytics dashboard with KPIs and charts

Create a Customer

Add your first customer profile and see the CRM in action

Set Up Integrations

Connect CoverManager, Revo POS, or configure email/SMS with Brevo

Deploy to Production

Deploy your instance to Vercel for production use

Troubleshooting

Port already in use

If port 3000 is already taken:
npm run dev -- -p 3001

Database connection errors

Verify your Supabase credentials in .env.local are correct. You can find them in your Supabase project settings > API.

Migration errors

If migrations fail, ensure you’re running them in order starting from 000_MARKETING_HUB_GGP_COMPLETE_SCHEMA.sql.

Type check errors

Run a type check to identify TypeScript issues:
npm run type-check

Getting help

If you run into issues:

Build docs developers (and LLMs) love