The following sections provide detailed step-by-step instructions with code examples.
🎯 YOUR ROLE: You'll manually set up the Supabase database by pasting SQL code into their editor. This is a one-time setup that creates the foundation for storing votes.
✋ YOU DO THIS:
Go to and create an account (if needed)
com
Click "New Project"
Choose a name, password, and region
IMPORTANT: Copy and save your Project URL and anon/public key (found in Settings → API)
✋ YOU DO THIS:
SQL CODE TO PASTE:
-- Create items table
CREATE TABLE items (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
label text NOT NULL,
description text,
likes_count integer DEFAULT 0
);
-- Create likes table
CREATE TABLE likes (
id serial PRIMARY KEY,
item_id uuid REFERENCES items(id) ON DELETE CASCADE,
session_id text NOT NULL,
created_at timestamp with time zone DEFAULT now()
);
✋ YOU DO THIS: