Dashboard
Active Jobs
Assets In Field
Units deployed
Active Personnel
Open Work Orders
Awaiting completion
Completed Jobs
In history log
Active Jobs
Current Jobs
Job NameTypeDay CrewEquipmentStatus
Asset Summary
CategoryTotalIn FieldYardService/Other
Field Managers
Operators
Document Templates
Daily Pump Inspection — All Responses
Date Unit # Operator Job Name Engine Hrs Leaks Fire Ext. Grounded Area Neat Codes Valves OK Issues Trailer
Work Orders
WO #DateEquipmentDescriptionTechnicianPM LevelStatus
Activity & Completion Log
User Access Management
🔑 ADMIN
Full access. Can create, edit, delete everything and manage users.
✏️ MANAGER
Can edit jobs, assets, personnel and work orders. Cannot manage users.
👁 VIEWER
Read-only. Can see all data but cannot make any changes.
Active Users
EmailRoleUser IDActions
Supabase Setup Guide
1
Create a Supabase Account
Go to supabase.com and click Start your project. Sign in with GitHub or email. It's free.
2
Create a New Project
Click New Project → name it terra-ofs → set a strong database password (save it) → choose the closest region (US East or US West) → click Create new project. Wait ~2 minutes for it to provision.
3
Get Your API Keys
In your project → go to Project Settings → API. You need two values:
Project URL — looks like https://xxxx.supabase.co
anon / public key — a long string starting with eyJ...
Open this HTML file in a text editor and replace PASTE_SUPABASE_URL and PASTE_SUPABASE_ANON_KEY with these values.
4
Run the Database Setup SQL
In Supabase → go to SQL Editor → click New query → paste the SQL below and click Run:
-- Enable Realtime alter publication supabase_realtime add table jobs; alter publication supabase_realtime add table assets; alter publication supabase_realtime add table operators; alter publication supabase_realtime add table work_orders; alter publication supabase_realtime add table history; -- Jobs table create table if not exists jobs ( id text primary key, name text, type text, status text default 'active', start_date text, day_personnel jsonb default '[]', night_personnel jsonb default '[]', equipment jsonb default '[]', notes text, updated_at timestamptz default now() ); -- Assets table create table if not exists assets ( id text primary key, type text, category text, status text, operator text default '', job text default '', updated_at timestamptz default now() ); -- Operators table create table if not exists operators ( id text primary key, phone text default '', role text default 'Operator', status text default 'active', updated_at timestamptz default now() ); -- Work orders table create table if not exists work_orders ( id text primary key, date text, equipment text, description text, tech text, pm text, status text default 'open', updated_at timestamptz default now() ); -- History table create table if not exists history ( id text primary key, type text, title text, meta text, color text default '#1A5FAB', ts bigint default 0 ); -- User roles table (links auth user to role) create table if not exists user_roles ( user_id uuid primary key references auth.users(id) on delete cascade, email text, role text default 'viewer', updated_at timestamptz default now() ); -- Row Level Security: all authenticated users can read everything alter table jobs enable row level security; alter table assets enable row level security; alter table operators enable row level security; alter table work_orders enable row level security; alter table history enable row level security; alter table user_roles enable row level security; create policy "Authenticated read jobs" on jobs for select using (auth.role() = 'authenticated'); create policy "Authenticated read assets" on assets for select using (auth.role() = 'authenticated'); create policy "Authenticated read operators" on operators for select using (auth.role() = 'authenticated'); create policy "Authenticated read work_orders" on work_orders for select using (auth.role() = 'authenticated'); create policy "Authenticated read history" on history for select using (auth.role() = 'authenticated'); create policy "Authenticated read user_roles" on user_roles for select using (auth.role() = 'authenticated'); -- Write policies: only service_role (server) can write -- The app uses the anon key so writes go through our own check create policy "Authenticated write jobs" on jobs for all using (auth.role() = 'authenticated'); create policy "Authenticated write assets" on assets for all using (auth.role() = 'authenticated'); create policy "Authenticated write operators" on operators for all using (auth.role() = 'authenticated'); create policy "Authenticated write work_orders" on work_orders for all using (auth.role() = 'authenticated'); create policy "Authenticated write history" on history for all using (auth.role() = 'authenticated'); create policy "Authenticated write user_roles" on user_roles for all using (auth.role() = 'authenticated');
5
Enable Email Auth & Create Your Admin Account
In Supabase → Authentication → Providers → make sure Email is enabled.
Then go to Authentication → Users → Add user → Create new user.
Enter your email and a strong password. Click Create User.
6
Assign Yourself as Admin
In Supabase → Table Editor → user_roles → Insert row.
Set user_id = your user's UUID (find it in Authentication → Users), email = your email, role = admin.
Alternatively, open this portal, sign in, and the app will prompt you to set your role the first time.
7
Host the Portal (Share the Link)
To share with your team, host this HTML file using one of these free options:
Netlify Drop — drag and drop the file, get a live URL instantly
GitHub Pages — free, reliable, custom domain possible
• Any web hosting service you already use

Once hosted, share the URL with your team. Each person needs their own login created in Supabase Auth.
8
Add More Users
For each new user:
1. In Supabase → Authentication → Users → Add user → enter their email + temp password
2. In this portal → User Access → click Set Role next to their email → choose Admin / Manager / Viewer
3. Send them the portal URL, their email, and their temp password

That's it! Every change made by any user syncs in real-time to everyone else viewing the portal.
SUN
MON
TUE
WED
THU
FRI
SAT
Active Flow Meter Projects