Skip to content

Split site into public landing (/) + game Mini App (/game)#279

Merged
chiliec merged 1 commit into
mainfrom
feat/public-landing-game-split
Jul 6, 2026
Merged

Split site into public landing (/) + game Mini App (/game)#279
chiliec merged 1 commit into
mainfrom
feat/public-landing-game-split

Conversation

@chiliec

@chiliec chiliec commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Serves a crawler-friendly investor/user landing at the root and moves the Vue Mini App under /game, so cubeworlds.club link previews / SEO work while the game keeps running inside Telegram.

URL Serves
/ Static landing (src/landing/index.html) + root tonconnect-manifest.json & logo.png
/game Vue Mini App (Vite base: '/game/')
/api/* Backend API (unchanged)

Changes

  • src/landing/ — self-contained landing: hero pitch, feature grid, economy/investor section, screen gallery of every Mini App screen and state, FAQ. No playable mechanics.
  • Vite base: '/game/'; vue-router uses import.meta.env.BASE_URL (route paths stay base-relative, so the /mint gate logic is unchanged).
  • server.ts — landing static at /, frontend/dist at /game/, path-split SPA fallback (/api→404, /game*→game, else→landing) in both dev (Vite appType: 'custom') and prod.
  • Bot launch URLs (help, removed-commands, menu button) open ${WEB_APP_URL}/game. WEB_APP_URL itself stays root — it's also the API/webhook base and ton-proof host.
  • Menu button update is now guarded + idempotent: getChatMenuButton → compare URL/label → set only when different → logs the / → /game migration.

⚠️ Required manual deploy step

Update BotFather's Direct Link Mini App URL (t.me/cube_worlds_bot/…) to https://cubeworlds.club/game. This is not settable via the Bot API. The menu button and inline buttons auto-migrate on the next boot; the Direct Link app does not.

Verification

  • npm run lint clean
  • npm run typecheck clean
  • npm run test:backend752/752 pass (+3 new menu-button guard tests)
  • npm --prefix src/frontend run build emits /game/ base

Serve a crawler-friendly investor/user landing at the root and move the
Vue Mini App under /game, so cubeworlds.club previews and SEO work while
the game keeps running inside Telegram.

- src/landing/: static landing (index.html) + root-served tonconnect
  manifest and logo; screen gallery of every Mini App screen and state
- vite base '/game/'; vue-router uses import.meta.env.BASE_URL
- server.ts serves landing at /, frontend/dist at /game/, with a
  path-split SPA fallback (/api -> 404, /game* -> game, else -> landing)
  in both dev (Vite appType 'custom') and prod
- bot Mini App launch URLs (help, removed-commands, menu button) now open
  ${WEB_APP_URL}/game; WEB_APP_URL itself stays root for the API/webhook
- menu button update is now guarded + idempotent: getChatMenuButton,
  compare URL/label, set only when different, log the / -> /game migration

Requires a one-time BotFather change of the Direct Link Mini App URL to
https://cubeworlds.club/game (not settable via Bot API).
@chiliec chiliec merged commit 75c9005 into main Jul 6, 2026
2 checks passed
@chiliec chiliec deleted the feat/public-landing-game-split branch July 6, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant