Live goose sightings, heatmap, and safety tips for Western University campus.
- Copy
.env.exampleto.env.localand fill in values. - Create tables (required before submit works):
- Supabase Dashboard → SQL Editor → paste
supabase/setup-all.sql→ Run - Or:
npm run setup:db(needs a validDIRECT_URLin.env.local)
- Supabase Dashboard → SQL Editor → paste
- Create storage buckets:
npm run setup:storage(you already havesightings-pending/sightings-approved)- Or run everything:
npm run setup:supabase
- Or run everything:
- Enable Realtime for
public.sightings(included in migration). - Roboflow: deploy a hosted detection model; set
ROBOFLOW_API_KEYandROBOFLOW_MODEL_ID(e.g.your-project/1). - Optional: Gemini API key for nesting/aggression analysis.
- Optional: Resend for approval emails (
RESEND_API_KEY,EMAIL_FROM,APPROVER_EMAIL).
npm install
npm run devOpen http://localhost:3000.
- User uploads a photo → Roboflow YOLO counts geese + confidence; Gemini (optional) assesses behaviour.
- Submit creates a pending row + stores image in
sightings-pendingstorage. - Approver receives email with approve/reject links (or dev console logs links if Resend is not configured).
- On approve, row moves to
sightingsand the live map updates via Supabase Realtime.
| Route | Method | Purpose |
|---|---|---|
/api/sightings |
GET | Approved sightings for map |
/api/analyze |
POST | Roboflow + Gemini preview on report page |
/api/report |
POST | Submit pending sighting |
/api/approve |
GET | Email approval/reject handler |