Go to supabase.com → New Project → fill in name & password → Create.
2
Run this SQL in your project
Go to SQL Editor in your Supabase dashboard and run:
-- Swift Attendance: Secure Setup
CREATE TABLE students (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
name TEXT NOT NULL,
enrollment_no TEXT UNIQUE NOT NULL,
pu_mail TEXT,
phone TEXT,
collage TEXT,
department TEXT,
branch TEXT,
face_descriptor JSONB NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE attendance (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
student_id UUID REFERENCES students(id) ON DELETE CASCADE,
date DATE NOT NULL DEFAULT CURRENT_DATE,
time_in TIME NOT NULL DEFAULT CURRENT_TIME,
created_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(student_id, date)
);
ALTER TABLE students ENABLE ROW LEVEL SECURITY;
ALTER TABLE attendance ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Public: Read students" ON students FOR SELECT USING (true);
CREATE POLICY "Admin: Manage students" ON students FOR ALL TO authenticated USING (true);
CREATE POLICY "Public: Read attendance" ON attendance FOR SELECT USING (true);
CREATE POLICY "Public: Insert attendance" ON attendance FOR INSERT WITH CHECK (true);
CREATE POLICY "Admin: Manage attendance" ON attendance FOR ALL TO authenticated USING (true);
3
Enter your Supabase credentials
Find these in your project → Settings → API
Swift Coding Club
00:00:00
Loading AI…
Look at the camera to mark your attendance
Initializing…
🔐
Admin Access
Sign in to manage Swift Coding Club
Swift Coding Club
1
Lookup
2
Confirm
3
Face
Enter Enrollment Number
Type to search from student master database
Confirm Student Details
Verify the information below before proceeding to face capture
📸 Face Capture
Camera will start here
No face captured
🚀 Enrolling
#
Name
Enrollment No
Department
Date
Time In
Select a date and click Filter
Loading…
Loading students...
📍 Geo-Fence Settings
Geo-Fence Disabled
No location set
📍 Lat: —
📍 Lng: —
📏 Radius: 100m
Allowed Radius100m
10m250m500m
How it works: Set your current GPS location as the center point. Only devices within the radius you set above will be able to mark attendance. Students outside the geo-fence will be blocked.