Skip to content

Get started

The easiest way to set up Do11y is the following:

  1. Set up a Supabase project as the destination for your data
  2. Add Do11y to your documentation site using a script tag

This page walks you through this setup. For other destinations and installation paths, see Destinations & setup paths.

Set up a Supabase project

  1. Sign up for Supabase. You don't need a credit card. The free tier includes more than enough storage for most docs sites with no time-based retention limits.

  2. After you create your project, click Copy in the Project Overview page, and note your Project URL and Publishable key.

  3. Open the SQL Editor in the left sidebar, and then run the following:

sql
create table do11y_events (
  id bigint generated always as identity primary key,
  created_at timestamptz not null default now(),
  payload jsonb not null
);

alter table do11y_events enable row level security;

grant insert on do11y_events to anon;
grant select on do11y_events to service_role;

create policy "Allow anonymous inserts"
  on do11y_events for insert
  to anon
  with check (true);

This SQL script creates a table that accepts event data from Do11y and allows anonymous inserts via the publishable key. The publishable key cannot read data, only write it. The script also grants SELECT access on the table to the service role. This is needed for the insights script to work.

The default table name is do11y_events. If you use a different name, add the supabaseTable parameter to your Do11y configuration.

Add Do11y to your documentation site

Follow the install guide for your documentation framework:

Other destinations and setup paths

For other destinations and installation paths, see Destinations & setup paths.

Released under the MIT License.