💰

FinLedger

Personal Finance Tracker · v3

Step 1 of 2 — Connect Supabase
Settings → API → Project URL
Settings → API → anon public
First time? Show SQL schema ▾
-- Paste in Supabase → SQL Editor → Run All create table if not exists accounts ( id uuid default gen_random_uuid() primary key, user_id uuid references auth.users(id) on delete cascade not null, name text not null, type text not null, balance numeric default 0, currency text default 'INR', billing_day integer, credit_limit numeric, color text default '#f59e0b', created_at timestamptz default now() ); create table if not exists transactions ( id uuid default gen_random_uuid() primary key, user_id uuid references auth.users(id) on delete cascade not null, account_id uuid references accounts(id) on delete cascade, amount numeric not null, type text not null, category text default 'Other', description text default '', txn_at timestamptz not null default now(), to_account_id uuid references accounts(id) on delete set null, created_at timestamptz default now() ); alter table accounts enable row level security; alter table transactions enable row level security; create policy "own_accounts" on accounts for all using (auth.uid() = user_id) with check (auth.uid() = user_id); create policy "own_transactions" on transactions for all using (auth.uid() = user_id) with check (auth.uid() = user_id); -- Upgrading from v2? Run these extra lines: -- alter table accounts add column if not exists user_id uuid references auth.users(id) on delete cascade; -- alter table transactions add column if not exists user_id uuid references auth.users(id) on delete cascade; -- drop policy if exists "all_accounts" on accounts; -- drop policy if exists "all_transactions" on transactions; -- (then create the policies above)

Using on a new device? Get a login link from Settings ⚙ on your existing device.