This example app features a collaborative text editor built with Yjs, Tiptap and Supabase.
First, copy the .env.example file to .env in the project root.
cp .env.example .env
Then, create a new Supabase project and open the created .env file to fill in the missing environment variables with the new project information.
In Supabase's SQL editor, create a documents table with:
create table public.documents ( id bigint generated by default as identity, created_at timestamp with time zone null default now(), document json null, name text null, constraint documents_pkey primary key (id), constraint documents_name_key unique (name) ) tablespace pg_default;
Then, run the development server:
npm install npm run dev
This will start the PartyKit development server at port 1999.
Open http://localhost:1999 with your browser to see the result.