Your case file, under lock and key
Sign in to see your own case references, progress updates, hearing dates, court orders and documents, to send documents to the chamber securely, and to message the firm directly. Every client sees only their own file — nothing in this portal is public.
Access is issued by the chamber
Portal accounts are created personally by Wazir Law Associates when a brief is accepted — there is no public sign-up for case files, and no client information is ever publicly accessible.
The secure portal activates as soon as the firm’s private backend (Supabase, held under the firm’s own account) is connected to this page. Until then, sign-in is not available here: existing clients can reach the chamber on WhatsApp or by phone for hearing dates, orders and updates, exactly as before.
Cases & progress
Your case references, current status and a dated progress timeline written by the chamber after every step.
Hearings, orders & documents
Upcoming hearing dates, court orders and case documents, downloadable through short-lived secure links — never public URLs.
Uploads & messaging
Send documents to the chamber through private storage, and exchange messages on your file inside the portal.
How your information is protected
- Authentication is handled by Supabase Auth under the firm’s own account — passwords are never stored on this website.
- Row-level security in the database means your login can only ever read your own cases, hearings, documents and messages.
- Documents sit in a private storage bucket; downloads use signed links that expire within minutes.
- Only authorised firm personnel hold the administrator role, which alone can create cases and post updates.
Never share your portal password with anyone — the chamber will never ask for it by phone or WhatsApp. If you believe your account has been compromised, call the chamber immediately on 0305-1929419.
Connecting the live backend
The portal is wired to Supabase — PostgreSQL database, built-in authentication, private document storage and row-level security — under the firm’s own account (hlawfirm89@gmail.com), so ownership of the data stays with Wazir Law Associates. To activate: create the project, run the schema below in the Supabase SQL editor, then paste the project’s URL and anon key into the clearly marked SUPABASE_CONFIG block in this page’s source. Until those two values are set, the portal stays in its chamber-issued state above and no sign-in is possible.
1 · Database schema — profiles, cases, hearings, updates, documents, messages, notifications
-- ============================================================
-- WAZIR LAW ASSOCIATES — Client Portal schema (Supabase/PostgreSQL)
-- Run once in the Supabase SQL Editor of the firm's own project.
-- ============================================================
create extension if not exists pgcrypto;
create table public.profiles (
id uuid primary key references auth.users(id) on delete cascade,
full_name text not null default '',
phone text,
role text not null default 'client' check (role in ('client','admin')),
created_at timestamptz not null default now()
);
create table public.cases (
id uuid primary key default gen_random_uuid(),
client_id uuid not null references public.profiles(id) on delete cascade,
case_ref text not null,
title text not null,
court text,
practice_area text,
status text not null default 'Active',
next_hearing date,
summary text,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
create table public.hearings (
id uuid primary key default gen_random_uuid(),
case_id uuid not null references public.cases(id) on delete cascade,
hearing_date date not null,
court text,
purpose text,
outcome text,
created_at timestamptz not null default now()
);
create table public.case_updates (
id uuid primary key default gen_random_uuid(),
case_id uuid not null references public.cases(id) on delete cascade,
body text not null,
created_by uuid references public.profiles(id),
created_at timestamptz not null default now()
);
create table public.documents (
id uuid primary key default gen_random_uuid(),
case_id uuid not null references public.cases(id) on delete cascade,
client_id uuid not null references public.profiles(id) on delete cascade,
name text not null,
storage_path text not null,
kind text not null default 'document' check (kind in ('order','document','upload')),
uploaded_by uuid references public.profiles(id),
created_at timestamptz not null default now()
);
create table public.messages (
id uuid primary key default gen_random_uuid(),
case_id uuid references public.cases(id) on delete cascade,
client_id uuid not null references public.profiles(id) on delete cascade,
sender_id uuid not null references public.profiles(id),
sender_role text not null default 'client' check (sender_role in ('client','admin')),
body text not null,
created_at timestamptz not null default now()
);
create table public.notifications (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references public.profiles(id) on delete cascade,
title text not null,
body text,
is_read boolean not null default false,
created_at timestamptz not null default now()
);
-- A profile row is created automatically for every new account.
create or replace function public.handle_new_user()
returns trigger language plpgsql security definer set search_path = public as $$
begin
insert into public.profiles (id, full_name, phone)
values (new.id,
coalesce(new.raw_user_meta_data->>'full_name',''),
new.raw_user_meta_data->>'phone');
return new;
end; $$;
drop trigger if exists on_auth_user_created on auth.users;
create trigger on_auth_user_created
after insert on auth.users
for each row execute function public.handle_new_user();
-- Helper: is the signed-in user firm personnel?
create or replace function public.is_admin()
returns boolean language sql security definer set search_path = public as $$
select exists (select 1 from public.profiles
where id = auth.uid() and role = 'admin');
$$;
-- Make the Principal Counsel's account an administrator (run once,
-- after that account has registered):
-- update public.profiles set role = 'admin'
-- where id = (select id from auth.users where email = 'hlawfirm89@gmail.com');2 · Row-level security — each client sees only their own records; admins see all
-- ============================================================
-- ROW-LEVEL SECURITY: client information is never public.
-- Every table denies all access except through these policies.
-- ============================================================
alter table public.profiles enable row level security;
alter table public.cases enable row level security;
alter table public.hearings enable row level security;
alter table public.case_updates enable row level security;
alter table public.documents enable row level security;
alter table public.messages enable row level security;
alter table public.notifications enable row level security;
-- profiles: read/update your own row; admins read all.
create policy "profiles read own or admin" on public.profiles
for select using (id = auth.uid() or public.is_admin());
create policy "profiles update own" on public.profiles
for update using (id = auth.uid()) with check (id = auth.uid());
-- cases: the client who owns the case, or an admin.
create policy "cases read own or admin" on public.cases
for select using (client_id = auth.uid() or public.is_admin());
create policy "cases write admin only" on public.cases
for all using (public.is_admin()) with check (public.is_admin());
-- hearings & progress updates: follow the parent case.
create policy "hearings read via case" on public.hearings
for select using (public.is_admin() or exists (
select 1 from public.cases c
where c.id = case_id and c.client_id = auth.uid()));
create policy "hearings write admin only" on public.hearings
for all using (public.is_admin()) with check (public.is_admin());
create policy "updates read via case" on public.case_updates
for select using (public.is_admin() or exists (
select 1 from public.cases c
where c.id = case_id and c.client_id = auth.uid()));
create policy "updates write admin only" on public.case_updates
for all using (public.is_admin()) with check (public.is_admin());
-- documents: the owning client reads and uploads; admins manage all.
create policy "documents read own or admin" on public.documents
for select using (client_id = auth.uid() or public.is_admin());
create policy "documents insert own or admin" on public.documents
for insert with check (uploaded_by = auth.uid()
and (client_id = auth.uid() or public.is_admin()));
create policy "documents delete admin only" on public.documents
for delete using (public.is_admin());
-- messages: a conversation is visible only to its client and the firm.
create policy "messages read own or admin" on public.messages
for select using (client_id = auth.uid() or public.is_admin());
create policy "messages insert as self" on public.messages
for insert with check (sender_id = auth.uid()
and (client_id = auth.uid() or public.is_admin()));
-- notifications: you see and clear only your own.
create policy "notifications read own" on public.notifications
for select using (user_id = auth.uid() or public.is_admin());
create policy "notifications update own" on public.notifications
for update using (user_id = auth.uid()) with check (user_id = auth.uid());
create policy "notifications insert admin" on public.notifications
for insert with check (public.is_admin());3 · Private document storage — bucket and signed download links
-- ============================================================
-- PRIVATE STORAGE: one bucket, never public.
-- File path convention: <client_id>/<case_id>/<file name>
-- Downloads in the portal use signed URLs that expire in
-- 2 minutes (createSignedUrl), so no permanent public link
-- to any client document ever exists.
-- ============================================================
insert into storage.buckets (id, name, public)
values ('client-documents', 'client-documents', false)
on conflict (id) do nothing;
create policy "client files read own folder or admin"
on storage.objects for select
using (bucket_id = 'client-documents'
and (public.is_admin()
or (storage.foldername(name))[1] = auth.uid()::text));
create policy "client files upload own folder or admin"
on storage.objects for insert
with check (bucket_id = 'client-documents'
and (public.is_admin()
or (storage.foldername(name))[1] = auth.uid()::text));
create policy "client files update own folder or admin"
on storage.objects for update
using (bucket_id = 'client-documents'
and (public.is_admin()
or (storage.foldername(name))[1] = auth.uid()::text));
create policy "client files delete admin only"
on storage.objects for delete
using (bucket_id = 'client-documents' and public.is_admin());Configuration in this page’s source: search for SUPABASE_CONFIG and replace the two placeholder values with the live project’s URL and anon (public) key. The anon key is safe to publish only because row-level security above restricts every request to the signed-in user’s own records — the service-role key must never be placed on a website.