Split site into public landing (/) + game Mini App (/game)#279
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Serves a crawler-friendly investor/user landing at the root and moves the Vue Mini App under
/game, socubeworlds.clublink previews / SEO work while the game keeps running inside Telegram./src/landing/index.html) + roottonconnect-manifest.json&logo.png/gamebase: '/game/')/api/*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.base: '/game/'; vue-router usesimport.meta.env.BASE_URL(route paths stay base-relative, so the/mintgate logic is unchanged).server.ts— landing static at/,frontend/distat/game/, path-split SPA fallback (/api→404,/game*→game, else→landing) in both dev (ViteappType: 'custom') and prod.${WEB_APP_URL}/game.WEB_APP_URLitself stays root — it's also the API/webhook base and ton-proof host.getChatMenuButton→ compare URL/label → set only when different → logs the/ → /gamemigration.Update BotFather's Direct Link Mini App URL (
t.me/cube_worlds_bot/…) tohttps://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 lintcleannpm run typecheckcleannpm run test:backend— 752/752 pass (+3 new menu-button guard tests)npm --prefix src/frontend run buildemits/game/base