Prerequisites
Before you begin, ensure you have:- Node.js 20+ — Download Node.js
- Git — Download Git
- Supabase Account — Sign up for Supabase
- Code Editor — We recommend VS Code
Optional Tools
- OpenAI API Key — For AI Assistant features
- Brevo Account — For email/SMS campaign testing
- Supabase CLI — For database migrations
Installation
Install dependencies
Install all required npm packages:This will install Next.js, React, TypeScript, Supabase client, and all development dependencies.
Configure environment variables
Copy the environment template:Edit
.env.local and fill in your Supabase credentials:Set up the database
You need to apply the database schema to your Supabase project.Option A: Using Supabase CLI (recommended)Option B: Manual via Supabase Dashboard
- Go to your Supabase project dashboard
- Navigate to SQL Editor
- Run the migration files from
supabase/migrations/in order
Seed demo data (optional)
To get started with sample data:For a full demo dataset with customers and reservations, run
supabase/seeds/demo.sql in the Supabase SQL editor.Start the development server
Environment Variables Reference
Here’s a complete breakdown of environment variables:Required Variables
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase anonymous (public) key |
SUPABASE_SERVICE_ROLE_KEY | Supabase service role key (keep secret!) |
NEXT_PUBLIC_APP_URL | Application URL (http://localhost:3000 for dev) |
Optional Variables
| Variable | Description | Feature |
|---|---|---|
OPENAI_API_KEY | OpenAI API key | AI Assistant |
BREVO_API_KEY | Brevo API key | Email & SMS campaigns |
BREVO_SENDER_EMAIL | Sender email address | Email campaigns |
BREVO_SENDER_NAME | Sender name | Email campaigns |
BREVO_SMS_SENDER | SMS sender ID | SMS campaigns |
COVERMANAGER_API_KEY | CoverManager API key | POS integration |
REVO_ACCESS_TOKEN | Revo POS access token | Revo integration |
INNGEST_EVENT_KEY | Inngest event key | Background workflows |
INNGEST_SIGNING_KEY | Inngest signing key | Background workflows |
GOOGLE_DRIVE_CLIENT_ID | Google OAuth client ID | Document library |
GOOGLE_DRIVE_CLIENT_SECRET | Google OAuth secret | Document library |
GOOGLE_DRIVE_REFRESH_TOKEN | Google refresh token | Document library |
SENTRY_DSN | Sentry DSN | Error tracking |
NEXT_PUBLIC_SENTRY_DSN | Sentry public DSN | Client-side errors |
Verification
Verify your setup is working:Project Structure
Understanding the codebase:Common Development Tasks
Running the app with Turbopack disabled
Type checking
Running linter
Cleaning build artifacts
Creating a test user
Troubleshooting
Port 3000 already in use
Change the port in your start command:NEXT_PUBLIC_APP_URL in .env.local accordingly.
Supabase connection errors
- Verify your Supabase URL and keys in
.env.local - Check that your Supabase project is active
- Ensure RLS policies are set up correctly
TypeScript errors
Clear the Next.js cache:Module not found errors
Reinstall dependencies:Next Steps
Code Standards
Learn our coding conventions
Testing Guide
Write and run tests
