Add Meta Horizon platform support to PWABuilder#5884
Conversation
Introduces a new backend service that packages PWAs as Trusted Web Activity Android packages targeting Meta Quest headsets, using Meta's fork of Bubblewrap (@meta-quest/bubblewrap-core). Mirrors the Google Play service: async job queue backed by Redis in production and an in-memory queue in dev, with results uploaded to Azure Blob Storage. Exposes /enqueuePackageJob, /getPackageJob, and /downloadPackageZip, plus /ping and /health endpoints.
Mirrors the existing Google Play attach config: a task that runs npm install + npm run dev for the Meta Horizon service, and a launch entry that attaches the Node debugger to inspect port 5859 (matching the --inspect=5859 flag in the service's dev script). Also adds the new attach to the "Launch All PWABuilder (Local)" compound so F5 brings up the full local stack.
Wires the new Meta Horizon packaging service into the PWABuilder UI: - Adds a Meta Quest card to the publish-pane store selector and the Meta icon to the "Available stores" strip on the landing and report pages. - Implements <oculus-form> against the Meta Horizon backend, exposing Horizon-specific fields (app mode, Meta Horizon app ID, microphone / WebXR scene permissions, Horizon Billing, Platform SDK, ARCore). - Adds a publish service that enqueues a Meta Horizon job, polls for status, and downloads the resulting zip, mirroring the Google Play flow. - Adds a /meta-horizon-packaging-status page that streams logs and triggers the download when the job completes, with retry and bug report affordances.
|
Thanks @zjm-meta for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
|
@microsoft-github-policy-service agree [company="Meta"] |
|
@microsoft-github-policy-service agree company="Meta" |
|
Thanks for contributing! Discussing with internal stakeholders, will get back to you soon. |
|
@zjm-meta Would Meta be willing to host the server-side code for this? My team is ready to merge the UI changes, but are hesitant to add another server for us to maintain. Would Meta be willing? Let me know either way and I can speak to our stakeholders. |
|
Hello @JudahGabriel. Thanks for the update! Can you elaborate a bit more on what's required to maintain the server side code? Is it just fixing bugs on the server side code or does it include Meta hosting the backend infrastructure as well? |
Yeah, my manager asked if Meta could host the backend infrastructure. Then PWABuilder.com would call your server endpoint, which Meta would maintain. |
I'm wondering what is the current backend infra setup for the google play path? Is it a serverless setup or did they host a long-lasting server for continuous calls? Also, do you have a high level estimate on the traffic/cost of hosting the backend? |
It's a NodeJS web app + Redis queue for the jobs. That's pretty much it! 😄 It's a long-lasting server, though one could imagine a serverless setup. Cloud cost is about $200 USD/mo. |
|
Thanks so much for the additional context @JudahGabriel. I have discussed with my team and the infra cost and maintenance is too much for our team. Is there any way we could still merge this PR without us owning the infra? |
|
That's unfortunate. I'll go back to my team and see how they want to proceed. |
fixes #[issue number]
PR Type
Feature
Describe the current behavior?
Currently Meta Horizon platform is not supported by PWABuilder.
Describe the new behavior?
Adds support for packaging PWAs as Meta Horizon Store apps targeting Meta Quest headsets. Introduces a new apps/pwabuilder-meta-horizon Node service that wraps Meta's Bubblewrap fork (@meta-quest/bubblewrap-core) to generate signed TWA-based .apk / .aab packages, with the same async job-queue + Azure Blob Storage flow as the existing Google Play service (in-memory queue in dev, Redis in production); exposes /enqueuePackageJob, /getPackageJob, /downloadPackageZip, plus /ping and /health.
Integrates the service into the PWABuilder frontend by adding a Meta Quest card to the publish-pane store selector, a Meta icon to the "Available stores" strip on the landing and report pages, an component exposing Horizon-specific fields (app mode, Meta Horizon app ID, microphone / WebXR scene permissions, Horizon Billing / Platform SDK / ARCore), a publish service that enqueues a job and polls for completion, and a /meta-horizon-packaging-status page that streams logs and downloads the zip when the job completes.
Also adds a VS Code attach config (mirroring the existing Google Play one) that runs the new service's dev script and attaches the Node debugger on inspect port 5859, and registers it in the "Launch All PWABuilder (Local)" compound so F5 brings up the full local stack including Meta Horizon.
PR Checklist
npm run testand ensure that all tests pass - Note: I'm trying to run npm run test under pwabuilder/Frontend but I'm gettingstart-for-testsscript not found. Looks like it is only defined underapps/pwabuilder/Frontend/playwright.config.ts. Is there any fix/workaround for that?Additional Information
I have finished an E2E manual test to use local dev server and used the default URL to generate a Meta Horizon TWA zip file.