Migrate extension to Manifest V3 and make store self-contained#2
Open
Blakew316 wants to merge 1 commit into
Open
Migrate extension to Manifest V3 and make store self-contained#2Blakew316 wants to merge 1 commit into
Blakew316 wants to merge 1 commit into
Conversation
Extension: - manifest.json MV2 -> MV3 (service_worker, action, host_permissions, structured web_accessible_resources, wasm-unsafe-eval CSP for the ZK circuits) - Fix placeholder description Store: - Add lib/shopconnect-demo.js: self-contained demo backend (promotions/verify/ issue) so the store deploys as a single Next.js app with no separate Express API - Routes use the inline demo by default; proxy only when SHOPCONNECT_API_URL is set - Drop the localhost:3001 default from next.config.js Enables deploying the store (with working /api routes) to Vercel, which GitHub Pages could not host. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Makes the ShopConnect extension load on current Chrome and lets the demo store deploy as a single app to a real host (Vercel), fixing the two blockers that kept the extension from working with the live site.
Extension → Manifest V3 (
packages/extension)manifest.jsonMV2 → MV3:background.service_worker,action(wasbrowser_action),host_permissions, structuredweb_accessible_resources.wasm-unsafe-eval(MV3 forbidsunsafe-eval; the Polygon ID ZK circuits run as WebAssembly, so this is what's actually needed).description.background.js/contentScript.jsneeded no changes — they only usechrome.windows/chrome.tabs/chrome.runtime, all service-worker-safe.Store made self-contained (
packages/store)lib/shopconnect-demo.js: inlined demo backend (promotions / verify / issue), dependency-free vianode:crypto.app/api/shopconnect/*/route.jsnow use the inline demo by default and only proxy to a separate Express API whenSHOPCONNECT_API_URLis set.localhost:3001default fromnext.config.js.This lets the store deploy to Vercel with working
/api/shopconnect/*routes — which GitHub Pages (static-only) could not host.Verification
npm run buildsucceeds; loads unpacked with no MV2 warning.https://store-five-sable.vercel.app—/api/shopconnect/promotionsreturns 200 (was 404 on GitHub Pages),/verifyreturnsapproved: true.🤖 Generated with Claude Code