Step 1 | Add the Tables

Copy the following SQL into your Supabase project

Comments Table

-- Create Comments Table
create table public.comments (
  id uuid not null default gen_random_uuid (),
  text text null,
  created_at timestamp with time zone null default now(),
  name text null,
  parent_id uuid null,
  page_slug text null,
  ip_address text null,
  edited boolean null,
  constraint comments_pkey primary key (id)
) TABLESPACE pg_default;

-- Enable Row Level Security
alter table public.comments enable row level security;

-- Policies
-- SELECT
create policy "Allow select on comments"
on public.comments
for select
using (true);

-- INSERT
create policy "Allow insert on comments"
on public.comments
for insert
with check (true);

-- UPDATE
create policy "Allow update on comments"
on public.comments
for update
using (true)
with check (true);

-- DELETE
create policy "Allow delete on comments"
on public.comments
for delete
using (true)

Copy

Likes Table

-- Create Likes Table
create table public.likes (
  comment_id uuid not null default gen_random_uuid (),
  created_at timestamp with time zone not null default now(),
  ip_address text null,
  like_id uuid not null default gen_random_uuid (),
  constraint likes_pkey primary key (like_id),
  constraint likes_like_id_key unique (like_id)
);

-- Enable Row Level Security
alter table public.likes enable row level security;

-- Policies
-- SELECT
create policy "Allow select on likes"
on public.likes
for select
using (true);

-- INSERT
create policy "Allow insert on likes"
on public.likes
for insert
with check (true);

-- UPDATE
create policy "Allow update on likes"
on public.likes
for update
using (true)
with check (true);

-- DELETE
create policy "Allow delete on likes"
on public.likes
for delete
using (true)

Copy

SQL Editor

Step 2 | Connect to Framer

Paste Supabase Credentials into the Framer Component

Copy and Paste the Component in Framer

Get Credentials from Supabase

Paste the in Framer Component

Step 2 | Connect to Framer

Paste Supabase Credentials into the Framer Component

Copy and Paste the Component in Framer

Get Credentials from Supabase

Paste the in Framer Component

Create a free website with Framer, the website builder loved by startups, designers and agencies.