# Submerge — Web Feature Inventory & Mobile Plan (v2, 2026-10-06) **v1→v2 audit summary (§6 log at bottom):** every claim re-verified in-repo. 6 corrections (middleware.js ABSENT — removed; "Stories & Reels" false — removed; betaCheck route corrected to pages/api; 3 component paths corrected; "port firestore rules" wrong — no rules in repo; 412px bugs mapped to exact CSS lines). ## 0. Locked appearance (from the approved side-by-side board) - **Shell = Variant A, bottom tab dock** — FEED / RADIO / EVENTS / MESSAGES / PROFILE + native stack for push screens. - Palette: navy `#001323` / `#002C4F`, cyan `#00DFEB`, blues `#04385D` `#1C5B94` `#0094D4` `#003043`. - Display font **Zen Dots**, UI font **Nunito Sans**; no serif fallbacks anywhere. - Reference board: `dl.vivaed.com/77fdfb3f50ca77f1/submerge-web-vs-mobile-board.html` (Tab-dock mock phones 428×852 = look targets for §1–3 feature ports). ## 1. Web version = full platform Verified against web repo `main` @ `b8972dd` (which already includes "Review and fix responsiveness on all pages" — the two 412px bugs **survive that commit, re-confirmed live**). ### 1.1 Social network / newsfeed - PostFeed (`src/components/PostFeed/Feed.jsx`, 160 lines); post types event / track / mix (`PostFeed.jsx:75-83`). - Likes/comments/pagination = client Firestore utils: `fetchLikes.js`, `toggleLike.js`, `fetchComments.js`, `fetchCommentCount.js`, `addComment.js`, `paginateQuery.js`, `saveMentions.js`. - SinglePostPopup modal, CreatePost composer, TopBubbles topic row. - **NO Stories/Reels on web** (grep: "story" = `history.pushState` only; PostFeed has no story/reel type). Removed from plan. RN has none either — not a gap. ### 1.2 Events + ticketing (Stripe) - `src/components/CreateEvent.jsx` (34 useState fields), event cards + details screens. - `src/app/api/stripe/`: create-payment-intent, update-payment-intent, fulfill-payment-intent, refunds, webhook, connect/{webhook, login-link, account-link} — 9 routes. - `src/app/api/tickets/`: free-checkout, qr-image, waiver-sign, view — 4 routes. - `src/components/Events/TicketQrCard.jsx`, `EventPurchasedTix.jsx`; door scan on web: `src/app/scan/page.jsx` + `src/app/api/qr-scan/`. ### 1.3 Waivers - `src/lib/waivers/eSignatureEvidence.mjs` + api/tickets/waiver-sign; `PublicTicketWaiverScreen.jsx`, `EventAdminWaiversPanel.jsx`. ### 1.4 Silent disco - `src/components/EventAdminSilentDiscoPanel.jsx`; `src/lib/events/headphoneDepositCodes.mjs`. ### 1.5 Messaging - `src/screens/Messages.jsx` — **Firestore realtime** (onSnapshot, `db`), chat rail, ChatDetails.jsx, CreateMessageModal.jsx, MessagePrompt.jsx, `lib/messages/navigation.mjs`. ### 1.6 Profiles / follow graph - `Profile.jsx`, `OfficialProfile.jsx`, `AccountSettings.jsx`, follow graph via `toggleFollow.js`, mentions `parseMentions.js`. ### 1.7 Admin (web) — 5 tabs - From AdminSidemenu.jsx activeView set: **All Users / Beta Users / Events / QR Scans / Upload Sample Packs**. ### 1.8 Monetization (non-ticket) - `PaymentModal.jsx` (web Stripe), merch + sample packs (`SubmergeStore.jsx`, `UploadTrack.jsx`), promoter payouts via connect/* (onboarding stays web). ### 1.9 Radio (already mobile ahead) - `RadioPage.jsx` + `RadioContext.jsx` (724 lines): trackInfo polling, favorites/recent, RTDB setChannel, station descriptions. ### 1.10 Misc plumbing (corrected) - **betaCheck API = `src/pages/api/users/betaCheck.js`** (legacy pages/api dir — also posts/list.js, hello.js). Called by `SignIn.jsx:29` via fetch("/api/users/betaCheck"). - **middleware.js: DOES NOT EXIST** (repo-wide find). Root config = `firebase.json` only (hosting targets test + prod, frameworksBackend us-central1). No rewrites/middleware. - Push: `Firebase.js` config exists; **no web FCM client (no getMessaging)** — push is RN work. - Firestore: client-side utils only; **no security-rules files in repo** (console-managed). - `GetApp.jsx` promo: App Store 6463235608 / Play `com.submergenative`.## 2. RN repo today - `main`: radio-only app; **versionCode 10** (`android/app/build.gradle:24`); **trackInfo: 0 hits**. - `dev` extras: `src/hooks/useAndroidAuto.ts` ✓, `src/carplay/CarPlayProvider.tsx` ✓, `src/scripts/patch-track-player.js` ✓ — these exist (v1 wrongly placed files in navigation/). - `src/screens/radio/shared/RadioScreenBase.tsx` + `useRadioStations.ts` + `services/audioPlayer.ts` = reuse points. - Firebase: `android/app/google-services.json` ✓, iOS `GoogleService-Info.plist` ✓, `services/firebaseAuth.ts` ✓ — auth ready; no RN firestore screens yet. ## 3. Gap report (web → mobile) | Area | Web | Mobile | Plan | |---|---|---|---| | Social feed | ✅ | ❌ | Full | | Messaging | ✅ | ❌ | Full | | Events browse+create | ✅ | ❌ | Full | | Ticket wallet + door scan | ✅ | ❌ | Full | | Purchases (Stripe) | ✅ | ❌ | Full | | Waivers | ✅ | ❌ | Sign | | Silent disco | ✅ | ❌ | Scan | | Admin | ✅ | ❌ | Web-only (read-only badges on phone) | | Radio | ✅ | ✅ | Done (v0.10) | | Stories/Reels | ❌ | ❌ | Out of scope (neither has it) | | Wearables/AA/CarPlay | ❌ | partial | Value-add, post-parity | ## 4. Plan — 9 phases (implementation detail) Standing laws kept: MRs→dev, authored as Ian, no AI mentions; merge only with human approval (Ian's chat approval counts for urgent fixes); PAT 0600; no token echoes; never delete data; >50MB→link; terse; Telegram delivery. ### Phase 0 — Foundation (prereq for everything) - Sync RN from origin/dev; merge MR !14 (radio work) → dev baseline. - **Design tokens module**: palette §0 + Zen Dots/Nunito Sans (RN font files, no serif anything). - **Navigation skeleton**: bottom-tab dock (FEED/RADIO/EVENTS/MESSAGES/PROFILE) + native stack — matches approved mock: dock bar `#002C4F`, active-tab accent `#00DFEB`. - **API layer**: RN calls the SAME Next.js app/api endpoints (web stays API server — no backend rewrite). Auth via existing `services/firebaseAuth.ts`. - Firebase configs already in RN (google-services.json ✓, plist ✓) — **no rules porting (none exist in web repo; security is console-managed)**. - **Web quick-fix branch** (independent, small): fix the two 412px bugs from the board — `(a) app/welcome/landing.module.css` tagline: `width:80%` + Syncopate clips → add `<821px` rule (font-size clamp + word-break safe); `(b) .landingSocialFeatureCardGroup`: no media query → add column direction `<821px` so RADIO/DMS stop 2-across. Ship as MR → dev. ### Phase 1 — Social feed *(highest user value)* - Feed screen w/ composer (camera + gallery, caption, postType), infinite scroll, topic TopBubbles row, SinglePost modal, likes/comments via SAME API+utils port. - Discover-people modal from feed header. ### Phase 2 — Messaging - Conversations list (Firestore onSnapshot) + chat screen; unread badge on dock; FCM push. - Mobile pattern: single chat view; no persistent rail. ### Phase 3 — Events (browse + create) - EventsPage (near/city filter), EventDetails + GetTickets (paid + free), CreateEvent field set on mobile. ### Phase 4 — Ticket wallet + door scanning - Ticket wallet: native QR render (react-native-qrcode-svg). - Door scanner (EventAdmin): react-native-vision-camera + MLKit → check-in API; sound on valid/duplicate. ### Phase 5 — Purchases (Stripe) - PaymentSheet native (react-native stripe sdk), free checkout via same API, merch/sample packs, SubmergeStore cart, UploadTrack. - Payouts: view-summary only on mobile; onboarding stays web. ### Phase 6 — Waivers + silent disco - Waiver e-sign on mobile (same evidence API); admin panel stays web. - Silent disco: headphone-deposit scanner on mobile (variant of door scanner). ### Phase 7 — Admin - Console stays web-only. Phone: read-only badges for own events (attendance, revenue). ### Phase 8 — Notifications + realtime hardening - FCM (message/reply/like/follow/ticket-bought), deep-links to post/chat/ticket. - Beta gating: RegisterScreen calls betaCheck first. ### Phase 9 — Ship pipeline - Per phase: assembleRelease APK → DHU/device smoke → TG (sha-verified). GetApp promo page already points to stores — keep in sync as versions bump. **Est. size**: Ph1-2 ≈ 6 screens; Ph3-5 ≈ 8; Ph6-7 ≈ 4 → ~18-20 screens + services. ## 5. Pre-build environment checklist (verified live 2026-10-06) - Phone R5CR20WZFHT on fix8e (versionCode 10); DHU live25 (pid 56083); HU server LISTEN 5277. - Build: JAVA_HOME openjdk-21, ANDROID_HOME set, debug.keystore override flags (creds redacted). - APK >50MB → dl.vivaed.com link (never TG attach). - DHU: screen/UI only — NO audio work (standing user stop). ## 6. v1→v2 correction log (fine-tooth comb, 2026-10-06) 1. middleware.js: claimed root file in v1 (×2) → find() proves ABSENT. Removed; replaced with firebase.json hosting-targets (test/prod, frameworksBackend) reality. 2. "Stories & Reels web-only": FALSE — web has no stories/reels at all. Removed; marked out of scope both platforms. 3. betaCheck route: v1 said "app/api"; actual = `src/pages/api/users/betaCheck.js` (legacy pages dir). Corrected §1.10. 4. Component paths: CreateEvent/TicketQrCard/SilentDiscoPanel → actual homes (components/, components/Events/, EventAdminSilentDiscoPanel.jsx). Fixed. 5. "Port web firebase rules → RN": web repo has NO rules files (console-managed) — phase 0 step rewritten. RN configs verified instead. 6. 412px bugs: v1 listed findings w/o locations. Now mapped precisely: tagline Syncopate clamp + FeatureCardGroup missing media query (landing.module.css). 7. Admin labels: verified from JSX activeView keys (5 tabs) — v1 was from memory. 8. v1 path slip `scripts/patch-track-player.js` → actually `src/scripts/…`; CarPlayProvider under `src/carplay/`. Fixed §2. ## 7. Approval gate - Phase 0 web quick-fix is cosmetic, isolated, reversible — start after ✅. - Larger phases queue behind approval. Reply: ✅ / ✏️ / ❌.