feat(vk): embed the game as a VK Mini App #140
Reference in New Issue
Block a user
Delete Branch "feature/vk-embedding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mirror the Telegram Mini App wrapper for VK — the minimum to run the game in VK test mode. The SPA loads at a new
/vk/entry, authenticates from VK's signed launch parameters, and provisions avkplatform identity.What
internal/vkauth: HMAC-SHA256 over the sortedvk_*params underGATEWAY_VK_APP_SECRET, base64url — a pure offline check, no side-service). Newauth.vkop (gated on the secret),backendclient.VKAuth,/vk/SPA mount.KindVK+ProvisionVK/vkSeed,/sessions/vkhandler, identitieskindwidened to'vk'(migration 00005, expand-contract).src/lib/vk.ts(VK Bridge, lazy-imported),bootVK+ the/vk/boot dispatch,encodeVKLogin+authVK. The display name is read client-side viaVKWebAppGetUserInfo(VK omits it from the signed params) — unsigned, cosmetic seed only./vkin the edge Caddyfile;GATEWAY_VK_APP_SECRETthrough compose +.env.example+ CI (TEST_) + prod-deploy (PROD_)..claude/.Verified
Signature confirmed against dev.vk.com + independent Node/Python references (+ a
%2Cedge-case vector). Local: full Go suite (39 pkgs),ProvisionVKintegration (migration applies,'vk'accepted, confirmed=true), UI check/test(342)/build/bundle-gate(95.7/100), gofmt, compose validate.Owner actions to exercise VK on the contour
TEST_GATEWAY_VK_APP_SECRET(+PROD_) — without itauth.vkstays unregistered./vk/; add yourself as a tester.Deferred (out of this MVP)
VK theme/viewport/swipe fine-tuning (needs the live VK client),
VKWebAppShare, deep-links, payments,VITE_VK_APP_ID, vk-identity account-linking.