# MasteryClub.ai — challenge funnel + Lobby (frontend v3)

23 October 2026 · Aymane → Yahya · **Design proposal, not yet approved by Ron or Danny.**

Clean HTML, scoped CSS and one small vanilla-JS controller. No framework, no build step, no backend. Accounts, payments, email, referrals and BuddyBoss permissions are **not connected** here: every action is an event your existing WordPress/BuddyBoss stack answers (see `integration-contract.md`). These templates never fake a registration, a payment or an account.

## The journey (unchanged from Danny)

`Signup (name + email) → optional Challenge VIP $47 once / continue free → combined thank-you + getting-ready → existing secure account route → Lobby`

Three funnel pages, plus one BuddyBoss newsfeed page (the Lobby). Free Community and Challenge VIP are **two content rooms on that one page** — in-page tabs, not menu items or separate URLs. The full Club offer stays hidden until the server/admin Day 4 release.

## Package map

| Path | What it is |
|---|---|
| `templates/index.html` | Registration. Danny’s 16-section order; two `data-mc-form="register"` forms (hero + final). |
| `templates/vip.html` | Optional $47 one-time VIP: video + benefits beside one offer card, free path, five-day comparison. |
| `templates/welcome.html` | Thank-you + onboarding merged: account first, personal link, dates, workbook, Lobby. |
| `templates/lobby.html` | Visual reference for the customised BuddyBoss newsfeed page: hotel cover, room switcher, free feed + upsells, locked VIP preview, owned VIP room. Sample posts are draft copy only. |
| `styles/tokens.css` | Colours, type, radii (Light direction). Load first. |
| `styles/base.css` | Reset, type, buttons, forms, header/footer, media slot, toast — all scoped to `.mc-site`. |
| `styles/landing.css` · `steps.css` · `lobby.css` | Page layers (`steps.css` = VIP + welcome). |
| `scripts/ui.js` | The integration controller: state, events, room switching, redirect guard. Required on every page. |
| `scripts/funnel.js` | Presentation only for the three funnel pages: reveals, scroll-stack, December rail, sticky mobile CTA, confetti. Never registers or grants anything. |
| `assets/` | Proposed logo (compact for headers, stacked, reverse), favicons, the Lobby cover art. |
| `wordpress/fragments/` | The main blocks cut from the templates (generated, see `wordpress/README.md`). |
| `integration-contract.md` | Hooks, state/config objects, events, required backend outcomes. **Read first.** |
| `buddyboss-mapping.md` | How to wrap the native activity feed without replacing it. |
| `placeholder-register.csv` | Every pending asset/decision and who owns it. |
| `acceptance-checks.md` | Ten staging checks — all NOT RUN until you run them on staging. |
| `frontend-qa.md` | What was actually checked on this static package, and how. |

Open any template through a local web server (`python3 -m http.server` in this folder, then `/templates/index.html`). Buttons show “unavailable / coming soon” messages until handlers are attached — that is intended.

## What you connect

1. Map the four templates to approved routes; repoint `../styles`, `../scripts`, `../assets` and the `.html` links.
2. Enqueue `tokens.css` → `base.css` → the page layer, then print `window.MasteryClubConfig` and server-verified `window.MasteryClubState` **before** `ui.js`.
3. Attach handlers for `mc:register`, `mc:checkout`, `mc:account`, `mc:resource`, `mc:skip-vip`, `mc:membership`, `mc:lobby-entered` (contract §Events). Each claims with `preventDefault()` and calls `respond()` once.
4. Lobby: keep BuddyBoss’s native activity loop, pagination, comments, notifications and moderation. Put the cover, room switcher, banners and widgets around it; scope the selected room’s query server-side.

## Rules that must survive integration

- **Challenge VIP is $47 one time.** No recurring billing. Core additions: live Q&A Days 1–3, every challenge replay, extended workbook, VIP room.
- VIP is granted **only** from a verified payment on the server — never from `?vip=1`, a hash, a click, `MasteryClubUI.apply()` or browser storage. “Continue free” never removes owned VIP.
- Free members read the Lobby and reply to team posts. Only the team publishes new posts — deny post creation on the server, not just in the UI.
- Free members see Challenge VIP as a locked room with an in-page offer; no VIP content is sent to them.
- After a Lobby upgrade, return to the same Lobby page with the Challenge VIP room open (`returnTo: lobby.html#challenge-vip`).
- Keep the Day 4 Club offer behind the server/admin release flag.
- Don’t publish anything marked pending in `placeholder-register.csv` as if it were real (guests, times, recordings, workbook, proof).

**Next action for Yahya:** inspect the installed BuddyBoss newsfeed template and groups on staging, then confirm the route/config/handler mapping in `integration-contract.md` §Page mapping with Aymane before styling.
