Hisaab EZ BYOK Setup Guide

Use this once per company. Netlify hosts the frontend. Each company connects its own Supabase project.

Step 1: Create Supabase Project

Who: Company owner or IT person

  1. Go to Supabase dashboard and create a project.
  2. Open Project Settings -> API.
  3. Copy:
    • Project URL
    • Anon public key

Step 2: Connect in App

Who: Company owner or first admin

  1. Open your Hisaab EZ app URL.
  2. In setup Step 1, paste URL + anon key.
  3. Click Connect & Check Schema.

Step 3: Initialize Database Schema

Who: Company owner or IT person

  1. In setup Step 2, click Open Supabase SQL Editor.
  2. Copy SQL from app (Copy SQL button) or open supabase/schema.sql.
  3. Paste and run SQL in Supabase SQL Editor.
  4. Return to app and click Re-check Schema.

Step 4: Activate Project License

Who: Company owner

  1. In setup Step 3, click Buy One-Time License (Stripe) or paste a signed key.
  2. Complete payment and return to app.
  3. App validates key and project binding automatically.

Step 5: Create First Account

Who: Company owner

  1. In setup Step 4, click Sign Up.
  2. The first account automatically becomes superuser/admin.
  3. Other team members can sign in from any PC using the same Supabase project credentials.

Important Notes

Troubleshooting

If you see an RLS sync error for app_records:

  1. Run latest schema SQL again in Supabase SQL Editor (supabase/schema.sql).
  2. Or run migration supabase/migrations/003_fix_next_ids_rls_and_schema_version.sql.
  3. Back in app, click Re-check Schema.