Leads
Data
- Table:
leadsin Supabase - Types:
Lead,LeadActivityinlib/supabase.ts - Actions:
app/actions/leads.ts— CRUD + activity log
Activity log
Every status change and notable action is appended to lead_activities. Displayed chronologically on the lead detail page.
Creating a lead
Leads are created when:
- A contact form is submitted at
/contact(submitContactForm) - A service order is placed at
/services/[slug](submitServiceOrder) - Admin creates one manually at
/admin/leads
QuickActions
From the lead detail page, admin can:
- Send a questionnaire (emails token link)
- Create a proposal
- Create a case study (maps lead → draft project)