- Node.js 18+ installed
- Supabase account (sign up at https://supabase.com)
- Go to https://supabase.com/dashboard
- Click "New Project"
- Fill in:
- Name: FlexiRoaster
- Database Password: (choose a strong password)
- Region: (choose closest to you)
- Wait for project to be created (~2 minutes)
- In your Supabase project dashboard, go to Settings → API
- Copy the following:
- Project URL:
https://xxxxx.supabase.co - anon public key:
eyJhbGc... - service_role key:
eyJhbGc...(keep this secret!)
- Project URL:
# Install globally
npm install -g supabase
# Verify installation
supabase --version# Copy template
cp .env.supabase.example .env
# Edit .env and add your credentials
VITE_SUPABASE_URL=https://your-project-ref.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key-here# Copy template
cp backend/.env.supabase.example backend/.env
# Edit backend/.env and add your credentials
SUPABASE_URL=https://your-project-ref.supabase.co
SUPABASE_ANON_KEY=your-anon-key-here
SUPABASE_SERVICE_KEY=your-service-role-key-here
DATABASE_URL=postgresql://postgres:your-password@db.your-project-ref.supabase.co:5432/postgres- Go to SQL Editor in your Supabase dashboard
- Click New Query
- Copy contents of
supabase/migrations/20240112_initial_schema.sql - Paste and click Run
- Repeat for
supabase/migrations/20240112_rls_policies.sql
# Link to your project
supabase link --project-ref your-project-ref
# Push migrations
supabase db push- Go to Table Editor in Supabase dashboard
- You should see these tables:
- user_profiles
- pipelines
- pipeline_stages
- executions
- execution_stages
- logs
- metrics
- alerts
- ai_insights
- Go to Authentication → Providers
- Enable Email provider
- (Optional) Enable Google or GitHub OAuth
- Go to Authentication → URL Configuration
- Add your site URL:
http://localhost:5173(for development)
# Install Supabase client
npm install @supabase/supabase-js
# Start dev server
npm run dev# Install Python dependencies
pip install supabase
# Test connection
python -c "from supabase import create_client; print('✅ Supabase connected!')"- Go to Database → Replication
- Enable replication for these tables:
- executions
- logs
- metrics
- alerts
- ai_insights
- Make sure you run migrations in order
- Check for syntax errors in SQL
- Verify you have the correct permissions
- Double-check your project URL
- Verify API keys are correct
- Ensure no trailing spaces in .env file
- Check if RLS is enabled on tables
- Verify policies are created
- Test with authenticated user
After setup is complete:
- ✅ Database schema created
- ✅ RLS policies configured
- ✅ Environment variables set
- → Proceed to Phase 4: Frontend Integration