============================================================
 LearnWithBitto.com - June 2026 Final Deploy Package
============================================================

WHAT THIS PACKAGE DOES
----------------------
Drop-in replacement for the cPanel app root. Overwrites the app files and
the entire static site (public/). Your secrets (.env) and node_modules stay
untouched on the server. No database change is required - the Supabase
schema is already in sync (the 3 migrations below were run previously and
are included only for reference).

WHAT'S IN THIS ZIP
------------------
- app.js                  Express server (Supabase + Certifier + waitlist APIs, SPA routing)
- seo.js                  SEO helper (article prev/next nav + sitemap data)
- passenger_app.cjs       Passenger entry point (Namecheap Node)
- package.json / package-lock.json
- .htaccess               Cache rules + SPA routing (no-cache on index.html)
- .env.example            Template ONLY - lists the env var names you need (no secrets)
- public/                 ENTIRE static site
    index.html              Hub (hero video + image fixed for ALL languages,
                            Foundation breadcrumb, 7-flag language switcher)
    advanced/               Advanced track - re-themed to light + shared nav + breadcrumbs
    blockchain/             Blockchain track - breadcrumbs standardized
    products/               Product modules - breadcrumbs standardized
    articles/               +7 new GEO articles (3 x Australian AFSL, 4 x IPO Prime / bSPCX)
    leaderboard.html, certificate.html, images/, videos/, sitemap.xml, robots.txt
- supabase-migration-*.sql  Reference only - already applied on prod

WHAT IS NOT IN THIS ZIP (intentionally)
---------------------------------------
- .env            Your secrets stay on the server, untouched.
- node_modules/   Already on the server. package.json did NOT change, so no
                  reinstall is needed. (If you ever do need it: cPanel ->
                  Setup Node.js App -> Run NPM Install.)

============================================================
 INSTALL ON cPANEL  (File Manager only - no shell needed)
============================================================

STEP 1 - BACKUP CURRENT app.js (optional but recommended)
   In File Manager, rename:  app.js -> app.js.bak-2026-06-29

STEP 2 - UPLOAD + EXTRACT
   Upload this zip to:  /home/loveqbyx/learnwithbitto.com/
   Right-click -> Extract -> "Overwrite all files: YES".
   Overwrites: app.js, seo.js, .htaccess, package.json, package-lock.json,
   passenger_app.cjs, public/, the migration SQL files, this README.
   Does NOT touch: .env, node_modules/, tmp/, your .bak files.

STEP 3 - CONFIRM ENV VARS (one time only - skip if already set)
   The app reads these from .env (or the cPanel Node app "Environment
   variables" panel). They are ALREADY on your server from prior deploys:
     SUPABASE_URL, SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY
     CERTIFIER_API_KEY, CERTIFIER_GROUP_ID   (certificate feature)
   See .env.example for the full list. The app degrades gracefully if any
   are missing (it will NOT crash) - cert endpoints just return "not configured".

STEP 4 - RESTART THE NODE APP
   A) cPanel -> "Setup Node.js App" -> learnwithbitto.com -> "Restart", OR
   B) In File Manager, create/touch:  tmp/restart.txt

STEP 5 - VERIFY (use a private/incognito window to bypass cache)
   https://learnwithbitto.com/                       Hub: hero video + image,
                                                      switch language -> hero
                                                      carries over in every language.
   https://learnwithbitto.com/advanced/module/7      Light theme + shared nav +
                                                      breadcrumb (Home > Advanced
                                                      Track > Module 7).
   https://learnwithbitto.com/blockchain/module/13   Breadcrumb present.
   https://learnwithbitto.com/products/module/21     Breadcrumb present.
   https://learnwithbitto.com/articles/              Filter by "Compliance" and
                                                      "Tokenized IPO" - 7 new cards.
   https://learnwithbitto.com/articles/bitmart-australian-financial-services-licence
   https://learnwithbitto.com/articles/bitmart-ipo-prime-spacex-spcx-allocation

============================================================
 WHAT CHANGED vs the previous (2026-06-24) deploy
============================================================
- Homepage hero: fixed broken image in all non-English languages (the React
  component pointed at a removed asset); background video now plays in every
  language (the injector was English-only). Chunk renamed for cache-busting.
- Breadcrumbs (Home > Track > Module > Lesson) standardized across all four
  areas, translated into all 7 languages.
- Advanced track fully re-themed from dark to the light style used by the
  other tracks, with the shared full-menu header.
- Fixed a translation bug: Advanced lesson bodies were silently falling back
  to English in all 6 non-English languages (content key-mismatch).
- Added 7 GEO-structured articles (Article + FAQPage JSON-LD), wired into the
  articles index (2 new categories), sitemap.xml, and seo.js.

============================================================
 TROUBLESHOOTING
============================================================
- 502 / "Application failed to start": check stderr.log - usually a .env typo.
- Hub looks unchanged: hard-refresh (Cmd+Shift+R / Ctrl+F5). index.html is
  no-cache via .htaccess but the browser may hold the old copy.
- Certificate page "not configured": CERTIFIER_* env vars missing or app not
  restarted after editing .env.
