The "BITBYBIT APPS" Block for Shopify
The BITBYBIT APPS block runs your development team's own application on a Shopify product page. Your application is a single JavaScript file, built with whatever you like, and the block hands it what the shopper picks on the page.
This is a specialised block. It is not a way to build a configurator: for that, use Composer, which needs no code and brings the option panel, pricing and publishing with it. Use this block when you need an application Composer cannot express, and you have people who write and test code. It needs the Pro plan: on any other plan the block is not offered in the theme editor, and its runtime is not loaded.
How it works
Shopify product page ↔ BITBYBIT APPS block ↔ Your application (using the bits-pro package)
The block reads the fields on the product page, in the same way 3D Bits reads them for a configurator, and hands them to your application as a plain object whenever one changes. Your application subscribes with our @bitbybit-dev/bits-pro package and tells the block when it has finished. Block Settings has the code.
From localhost to live
The block's Public Script URL setting decides where your application comes from, and changing it is how you move between three stages. It can be linked to a product metafield if you want to manage it per product, but typically one application serves every product and the setting stays global.
1. Local development
Leave Public Script URL empty. The block then embeds https://localhost:4242 in an iframe, so run your development server there, over HTTPS. Product page interactions reach your running application, and you develop with hot reload on the real page.
npm run dev
2. Preview
Build your application into a single JavaScript file, serve it locally, and point Public Script URL at it, for example https://localhost:4242/assets/index-stable.js. This tests production-like behaviour while keeping quick rebuilds.
npm run watch
A block whose Public Script URL points at localhost, or is left empty, tries to load from the shopper's machine on port 4242, not yours. On a live theme that is at best a broken product page. Develop against a preview or unpublished theme, and never leave the setting empty or pointing at localhost on the theme your shoppers see.
3. Production
Create the final bundle, upload it to Shopify under Content then Files, and put its CDN URL in Public Script URL. The address must start with https://: anything else loads nothing, and the theme editor shows a notice saying so.
npm run build
Technical foundation
We recommend TypeScript with the Vite bundler, and our templates are set up that way. Any front-end technology that bundles into a single JavaScript file can work: alternative bundlers and plain JavaScript are possible, but they are not what we test against, and a heavily customised setup may need work when bits-pro or the templates change.
Your application draws inside the block, in the #root-3d-bits element. The theme decides how much room that has, and we recommend keeping your interface self-contained rather than relying on the theme's classes, which can change with a theme update. The block loads a JavaScript file and nothing else, so styles have to be inlined or bundled into it. That element's id is the same in every APPS block, so use one APPS block per page.
Pricing and backend logic
The block and its workflow cover the front end only. Your application runs in the shopper's browser, inside your product page, with the same reach as your theme's own scripts, and there is no backend, database or server-side rendering included.
- Use configurator pricing where it fits. If what you need is a price built from the options a shopper picks, 3D Bits' own configurator pricing already does this and charges it through Shopify, so you do not have to build or secure it yourself. It is authored in Composer rather than in your application's code.
- Any price your own code works out must be checked. A number calculated in the browser is not a price until something trustworthy has checked it, so it needs a backend or a third-party Shopify pricing app.
- Anything else on a server is yours to build. Saving user configurations, calling the Shopify Admin API or storing data all need infrastructure you develop and host separately.
Getting started
You need:
- An active Pro subscription to the "3D Bits" app.
- Access to our private GitHub repository, which holds the templates and the
bits-propackage. Write to us and we will set you up. - Solid knowledge of TypeScript and modern web development, and a good understanding of Shopify themes.
Then:
- Clone a template from the repository and run
npm install. - Start local development with
npm run dev. - Add the block: in your theme editor, add BITBYBIT APPS to a product template, on an unpublished theme.
- Preview: open a product page where the block is active. You should see your local application embedded and running.
- Test interactivity: change a variant or the quantity, and check your browser's console, where your application logs the inputs it receives.
- Start building, then move through Preview and Production as above.
Support
Write to us at info@bitbybit.dev or join our Discord Server. If you would rather have the work done for you, we also take it on as a development project.
Verified against the product in November 2026