Connect Supabase so all BDEs share one live database.
Free · No credit card · ~10 minutes.
Sign up and create a new project — no credit card needed.
↗ Open supabase.com/dashboard/newsteelflow → region: Southeast Asia (Singapore) → Create. Takes ~2 min.In Supabase → SQL Editor → New query → paste and Run.
-- MybFlow schema
create extension if not exists "uuid-ossp";
create table if not exists sf_users(id uuid primary key default uuid_generate_v4(),username text unique not null,password_hash text not null,name text not null,area text,role text default 'bde',created_at timestamptz default now());
create table if not exists sf_customers(id uuid primary key default uuid_generate_v4(),bde_id uuid references sf_users(id),name text not null,phone text,company text,cust_type text default 'Retail',addrs jsonb default '[]',created_at timestamptz default now());
create table if not exists sf_orders(id text primary key,bde_id uuid references sf_users(id),cust_id uuid references sf_customers(id),cust_name text,cust_type text,gst boolean default false,lines jsonb default '[]',total numeric default 0,stage int default 0,pay text default 'cod',del text default 'delivery',order_date text,req_date text,ts bigint,created_at timestamptz default now(),updated_at timestamptz default now());
alter table sf_users enable row level security;
alter table sf_customers enable row level security;
alter table sf_orders enable row level security;
create policy "open_users" on sf_users for all using(true)with check(true);
create policy "open_customers" on sf_customers for all using(true)with check(true);
create policy "open_orders" on sf_orders for all using(true)with check(true);
do$$begin alter publication supabase_realtime add table sf_orders;exception when others then null;end$$;
insert into sf_users(username,password_hash,name,area,role)values
('arun','03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4','Arun Kumar','Anna Nagar','bde'),
('balaji','03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4','Balaji Rajan','Tambaram','bde'),
('chandru','03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4','Chandru S','Velachery','bde'),
('rajan','03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4','Rajan M','Guindy','bde'),
('divya','03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4','Divya P','Porur','bde'),
('admin','8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918','Admin','Head Office','admin')
on conflict(username)do nothing;
↗ Open SQL Editor in Supabase
From Supabase → Project Settings → General: copy Project URL.
From Settings → API Keys: copy the Publishable key (or the legacy anon key from the Legacy tab).
Your database is live. Click below to open the app.
BDE Order Portal