Perfection Clothing Ltd PINNS
1
Create a free account at supabase.com and start a new project. Wait ~1 min for it to provision.
2
Go to SQL Editor in the left sidebar and run this script — creates all tables, RLS security, and a default admin login:
-- PINNS Hours Tracker — Full Database Setup CREATE TABLE employees ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, name TEXT NOT NULL, username TEXT UNIQUE NOT NULL, pin TEXT NOT NULL, is_admin BOOLEAN DEFAULT false, is_archived BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT now() ); CREATE TABLE time_entries ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, employee_id UUID REFERENCES employees(id) ON DELETE CASCADE, entry_date DATE NOT NULL, start_time TIME, end_time TIME, break_start TIME, break_end TIME, notes TEXT, is_clocked_in BOOLEAN DEFAULT false, is_on_break BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT now(), UNIQUE(employee_id, entry_date) ); CREATE TABLE audit_log ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, employee_id UUID REFERENCES employees(id) ON DELETE SET NULL, employee_name TEXT NOT NULL, action TEXT NOT NULL, detail TEXT, created_at TIMESTAMPTZ DEFAULT now() ); -- Row Level Security ALTER TABLE employees ENABLE ROW LEVEL SECURITY; ALTER TABLE time_entries ENABLE ROW LEVEL SECURITY; ALTER TABLE audit_log ENABLE ROW LEVEL SECURITY; CREATE POLICY "rls_employees" ON employees FOR ALL TO anon USING (true) WITH CHECK (true); CREATE POLICY "rls_time_entries" ON time_entries FOR ALL TO anon USING (true) WITH CHECK (true); CREATE POLICY "rls_audit" ON audit_log FOR ALL TO anon USING (true) WITH CHECK (true); -- Default admin: username=admin PIN=1234 (change after first login!) INSERT INTO employees (name, username, pin, is_admin) VALUES ('Admin', 'admin', '1234', true);
3
Go to Project Settings → API, copy your Project URL and anon public key, paste below.

My Hours
Not Started
Log your hours for today
Week
Total This Week
0.00 hrs
Days Logged
0/7
Daily Avg
My History
All logged hours
All Time
This Month
Days Worked
All Entries
All Staff Hours
Admin overview
Staff SummaryClick row to expand daily view
Export Hours
Select data to include
What to Include
Preview
Audit Log
All activity — who did what and when
Activity (last 200)
Manage Staff
Add, edit, archive employees