What this app is
A
temporary safety net for PCS leads. While the GoHighLevel form mapping is
being fixed, every lead sent here is stored in our own private store, emailed to the
notification list, and shown in this dashboard — so no lead is lost.
How leads get in
1) The public form at
/form.html (share the link or QR).
2) Any PCS page can POST to
/api/lead with
{ type, name, phone, email, message, fields }.
3) Once the new GHL webhook is mapped, set
GHL_WEBHOOK_URL in Vercel and
every lead also fans out to GoHighLevel automatically.
Using the dashboard
Sign in with your PCS Google account (admin/manager role required). Search filters the
table live; CSV / Excel / PDF export exactly what's filtered.
Refresh re-pulls
from the server. "Email new leads to" is editable right here — comma-separated,
saves instantly, no redeploy.
Referrals
refer.html makes a personal
?ref=NAME link + QR
for anyone. Leads that come in through it show that name in the Ref column.
Emergency access
If Google login is down:
/api/lead?password=<admin token> returns the
raw leads JSON. Token is in Vercel env (
ADMIN_TOKEN).
Roles
admin / manager — view leads, export, edit notification emails.
staff / no
role — no access. Roles live in the shared Supabase
profiles table.