Car Battery Pro
Technical Reference

Local development & environments

Running the theme locally and understanding the staging and production environments.

Local development & environments

🛠 Dev

Prerequisites

  • Node.js (see README.md for the supported version)
  • Shopify CLI, authenticated against the car-battery-pro store

See README.md for the canonical setup steps.

Common commands

CommandWhat it does
npm run devshopify theme dev -e dev — local preview with hot reload.
npm run pullshopify theme pull — pull theme files down from Shopify.
npm run pushshopify theme push — push local files to a theme.
npm run deployCustom versioned deploy — see Deployment.

The Shopify environments are defined in shopify.theme.toml (default and dev, both pointing at the car-battery-pro store, with theme-editor sync enabled).

Two environments: staging vs production

CBP runs across two backend environments, owned separately (see Who owns what):

EnvironmentBackend APIOwnerUsed for
Productionapi_base_url theme settingCar Battery ProThe live store.
Staging / devapi_dev_base_url theme settingConversion KingsDevelopment and testing.

Which API the store talks to is controlled by the debug mode theme setting — see Debug mode. With debug on, the theme uses the dev/staging API; with it off, production.

The separation is intentional so CBP can change agencies without losing production access. A future maintainer taking over should plan to own or re-create the staging environment, which currently belongs to Conversion Kings.

Branches

The live store syncs to the production branch (the automated theme-pull workflow commits there — see Deployment). Treat production as a reflection of what's live.

On this page