✌️ Socials | |
---|---|
Pablo Hdez | GitHub - Twitter |
Nacho Aldama | GitHub - Twitter |
David Huertas | GitHub - Twitter |
Juan Rojas | GitHub - Twitter |
git clone https://github.com/pheralb/superui.git
cd superui
npm install
create table components (
id bigint generated by default as identity primary key,
user_id uuid references auth.users not null,
title text check (char_length(title) > 3),
description text,
code text,
inserted_at timestamp with time zone default timezone('utc'::text, now()) not null
);
create table public.users (
id uuid not null primary key, -- UUID from auth.users
email text,
raw_user_meta_data text
);
create or replace function public.handle_new_user()
returns trigger as $$
begin
insert into public.users (id, email)
values (new.id, new.email,new.raw_user_meta_data);
return new;
end;
$$ language plpgsql security definer;
create trigger on_auth_user_created
after insert on auth.users
for each row execute procedure public.handle_new_user();
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
npm run dev
And ready 🥳, go to localhost:3001.