First-time Setup

Supabase Setup Guide

Follow these steps to create the Funox Writer database and connect it locally.

Back to dashboard

1) Create a Supabase project

  1. Create a new project in Supabase.
  2. Set a strong database password and keep it safe.
  3. Wait until the project finishes provisioning.

2) Create the tables

Use the SQL editor to create the tables:

create table if not exists public.funox_articles (
  id uuid primary key default gen_random_uuid(),
  keyword text not null,
  page_type text not null,
  title text not null,
  slug text unique not null,
  content text not null,
  created_at timestamp with time zone default now()
);

create table if not exists public.funox_settings (
  key text primary key,
  config jsonb not null,
  updated_at timestamp with time zone default now()
);

After running SQL, refresh the schema cache in Project Settings → API if needed.

3) Get your API credentials

  1. Open Project Settings → API.
  2. Copy the Project URL.
  3. Copy the Service Role key.

4) Add environment variables

Create a .env.local file with:

SUPABASE_URL=your_project_url
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key

5) Verify locally

  1. Run npm run dev.
  2. Generate an article.
  3. Confirm it appears in the recent articles list.