Partner Portal — System Architecture

Influencer marketing system: invitation, onboarding, splash screens, and referral tracking

System Components

📝
Admin Website
hypnoelp.com/influencers/admin/
👤
Partner Portal
hypnoelp.com/influencers/
🔗
Referral Page
referral (dev only)
🎬
Demo Page
demo (dev only)
Edge Functions
Supabase (foxuipkuotwhitlxssyc)
🗃
Database
PostgreSQL + Storage
📧
Resend
Email delivery
📱
HypnoELP App
get-splash-screen API
🤖
n8n Auto-Reply
worker-1 (Digital Ocean)

Influencer Onboarding Flow

1
Admin sends invite via Admin Website (single or bulk)
2
create-influencer edge function creates DB record + Auth user + sends email via Resend
3
Influencer receives email, clicks link, sets password on Partner Portal
4
Influencer sees dashboard with referral code and shareable link

Splash Screen Pipeline

1
Influencer uploads image on Portal — auto-compressed to ~100KB client-side
2
update-splash-screen stores image in Supabase Storage, status: Pending
3
Admin reviews in Approvals tab — phone mockup preview with enlarge
4
Approve — image fetched, converted to base64, HTML generated and stored | Reject — reason provided, influencer can re-upload
5
App calls GET /functions/v1/get-splash-screen?code=XXX — returns self-contained HTML

Edge Functions

FunctionMethodAuthPurpose
create-influencerPOSTNoneCreate influencer + Auth user + send invite email
update-splash-screenPOSTJWTUpload splash screen image, set status to pending
approve-splash-screenPOSTNoneApprove/reject, generate HTML on approval
get-splash-screenGETNoneReturn HTML for app display

Database Tables

TableKey ColumnsPurpose
influencerscode, auth_user_id, splash_screen_status, splash_screen_htmlPartner profiles and splash screen state
groupsname, description7 content categories
influencer_groupsinfluencer_id, group_idMany-to-many junction

Storage: splash-screens bucket for uploaded images

Email Auto-Reply

1
IMAP check every 1 minute on n8n worker-1
2
Mistral AI categorizes: REPLY (auto-respond) | BUSINESS / SPAM (forward to Sean)
3
AI Agent generates response from knowledge base — escalates to human if unsure
4
Reply sent via Resend, threaded in original conversation (In-Reply-To headers)

Tech Stack

Frontend
Vanilla HTML/CSS/JS — self-contained single-page apps, no build step
Backend
Supabase Edge Functions (Deno), PostgreSQL, Supabase Auth
Email
Resend API from marketing@hypnoelp.com (mail.hypnoelp.com domain)
Hosting
Hostinger (hypnoelp.com) + n8n on Digital Ocean
📌 Detailed documentation: Architecture · Edge Functions · Database · Splash Screens · Email Automation
← Back to Partner Portal