Splash Screen Pipeline
The splash screen feature allows influencers to upload a custom image that displays to users who signed up with their referral code.
Purpose
Give influencers brand presence in the app. When a user opens HypnoELP and has a referral code linked to their account, they see the influencer’s splash screen before the main content.
Upload Flow
- Influencer logs into Partner Portal (
hypnoelp.com/influencers/) - Clicks “Upload Splash Screen” on their dashboard
- Selects an image file (PNG or JPG)
- Client-side JavaScript compresses the image to ~100KB target using canvas
- Portal calls
update-splash-screenedge function with the compressed image - Image stored in
splash-screensSupabase storage bucket splash_screen_statusset topending- Influencer sees “Pending Approval” status on their dashboard
Image Requirements
| Spec | Value |
|---|---|
| Dimensions | 1080 x 1920 px |
| Aspect ratio | 9:16 (portrait) |
| Format | PNG or JPG |
| Max size | ~100KB (after compression) |
| No borders | Must be edge-to-edge |
| No rounded corners | Image fills entire screen |
Approval Flow
- Admin opens Admin Website → “Approvals” tab
- Pending splash screens appear as cards with phone mockup previews
- Click to enlarge shows full preview with influencer details
- Admin clicks “Approve” or “Reject”
On Approve
approve-splash-screenedge function fetches the image from storage- Image converted to base64 string
- Self-contained HTML generated with the base64 image embedded inline
- HTML stored in
influencers.splash_screen_html - Status set to
approved
On Reject
- Status set to
rejected - Rejection reason stored in
splash_screen_rejected_reason - Influencer sees the reason on their portal dashboard
- Influencer can upload a new image (restarts the flow)
App Integration
The HypnoELP app retrieves splash screens via a single GET endpoint:
GET https://foxuipkuotwhitlxssyc.supabase.co/functions/v1/get-splash-screen?code=REFERRAL_CODE
- Returns raw HTML — ready to render in a WebView
- HTML is self-contained (base64 image, no external dependencies)
- Returns 404 if code not found or splash screen not approved
- No authentication required
Variables
| Variable | Location | Purpose |
|---|---|---|
SUPABASE_URL |
Edge functions env | Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY |
Edge functions env | Admin DB access |
RESEND_API_KEY |
Edge functions secrets | Email sending |
Status
Production. Complete pipeline working. Admin can approve/reject, app can fetch approved screens.