You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MB3R Lab Landing
2
2
3
-
Static landing page + Supabase Edge Function backend for pilot onboarding. The UI lives on any static host (GitHub Pages), while a Supabase function receives submissions, stores them (with Geo-IP country) in Postgres, and triggers Mailgun emails.
3
+
Static landing page + Supabase Edge Function backend for pilot onboarding. The UI lives on any static host (GitHub Pages), while a Supabase function receives submissions, stores them (with Geo-IP country) in Postgres, and sends owner notifications via Mailgun.
4
4
5
5
## Architecture
6
6
@@ -34,6 +34,7 @@ If the function is unreachable, the UI falls back to localStorage so leads are n
The function expects an existing `public.applications` table (see SQL below).
51
56
52
57
### 2. Point the frontend at the function
@@ -67,15 +72,16 @@ Push the static site (e.g., to GitHub Pages). The landing page and `/admin.html`
67
72
68
73
-**CTA + modal form** — collects email/company/context and sends the payload to the Supabase function.
69
74
-**Supabase storage** — submissions persist in `public.applications`; schema (including `country` column) is auto-created on first call.
70
-
-**Mailgun confirmations** — the function posts to Mailgun so every lead receives an acknowledgement email.
75
+
-**Mailgun owner notifications** — the function posts to Mailgun so the owner mailbox receives every new lead.
76
+
-**No auto-reply to requester** — submitters are not emailed automatically; follow-up is manual from the owner side.
71
77
-**Admin dashboard** — `/admin.html` lists submissions. Access requires the password that you stored in the function secret (`x-admin-pass` header). If the function is offline, the dashboard shows the locally cached leads.
72
78
-**Offline fallback** — when the API is unreachable (or not configured) leads are saved in `localStorage`, so you can later recover them from `/admin`.
73
79
74
80
## Supabase function behavior
75
81
76
82
The deployed function handles:
77
83
78
-
-`POST /database-access` — validate payload, insert into `applications`, trigger Mailgun email, respond with the created ID.
84
+
-`POST /database-access` — validate payload, insert into `applications`, send owner notification to `MAIL_NOTIFY_TO` (if configured), respond with the created ID.
0 commit comments