Case study · Built at Edition
Shopify Theme Template
A development and deployment platform for Shopify storefronts: TypeScript web components built with Vite and Tailwind CSS, and a GitHub Actions pipeline that previews every change and deploys safely to one store or many.
CI/CD
a preview theme on every push
Shopify Theme Template
2024–26 · Built at Edition
- Year
- 2024–26
- Role
- Architect & lead developer
- Built at
- Edition
- Type
- Front-end platform · CI/CD
- Status
- Live
- Liquid
- TypeScript
- Vite
- Tailwind CSS
- Web Components
- GitHub Actions
The challenge
Shopify storefronts are often edited straight in the theme, with no build step, no review and no safe way to try a change before customers see it. And a careless deploy can overwrite the content, settings and translations a merchant has set up themselves.
The approach
- 01
A modern front end
TypeScript web components, Vite and Tailwind CSS v4, with a command that scaffolds new components and typed helpers for the cart, storage and events.
- 02
One command to start a project
It validates the store config, pulls the live theme and wires the compiled assets into the layout.
- 03
Branches map to environments
A push to dev creates an unpublished preview theme for client approval; a merge to main deploys to every production store, so multi-market setups update together.
- 04
Dry run before every merge
Before anything merges, CI copies each live theme into a temporary theme, applies exactly what the merge would push, verifies every file and removes the copy again.
- 05
Only changed code ships
Live deploys compare against the live theme and push only changed code. Templates, section settings and theme config belong to the merchant and are never pushed or deleted.
- 06
Merchant translations kept
Locale merging adds new developer translations and never touches the merchant's own, and schema validation fixes or catches invalid theme settings before they ship.
The outcome
It is the starting point for Edition's storefront projects, including multi-store setups that deploy to several markets at once. Every change is previewed and checked before customers see it.
Live deploys push only the files that actually differ from the live theme and never touch the templates, settings or translations the merchant owns. If someone edited a file directly on the live store, the deploy says so.
How it works
Life of a deploy
What happens between a developer pushing a change and the same code running on every live store.
- 01
Built and checked
Every pull request runs lint, type-check and the Vite build, the same steps the deploy uses, so a green check predicts a green deploy.
- 02
Previewed on dev
A push to dev builds an unpublished preview theme with the store's own content, settings and translations pulled in, so the client reviews the real thing.
- 03
Rehearsed on a copy of live
Before a merge to main, each store's live theme is duplicated, exactly the files the merge would push are pushed to the copy, read back and compared byte for byte. The copy is always deleted afterwards.
- 04
One gate to merge
A single "Ready to merge" check passes only when the build and every store's rehearsal have passed, so one ruleset covers every store repository.
- 05
Only what changed ships
On merge, the code is compared byte for byte with each live theme and only the files that differ are pushed. Nothing on the live theme is ever deleted.
- 06
The merchant's work stays theirs
Templates, section settings and theme config are never pushed. Translations are merged so only new developer keys are added, and out-of-range settings are fixed before the push.
- 07
Every store, never half done
The same deploy runs for every store in the setup. A live deploy is never cancelled mid-run: a newer push queues behind it instead.
Key decisions
Why it's built this way
01
Pushing changed files only
over pushing the whole theme
Full pushes overwrote client data and broke templates when a section's settings changed. Now only code that differs from the live theme is sent.
02
Flagging edits made on live
over silently overwriting them
Each live file is checked against every version in git. A file that matches none was edited on the store, so the deploy says so and lists it, and the client can be told.
03
Leaving unknown code alone
over deleting what isn't in the repo
Code added to the live theme by an app or the client is reported, never removed.
04
A rehearsal on a real copy
over trusting the diff
The exact push is tried on a duplicate of each live theme and verified byte for byte, so a merge that passes has already worked once.
05
One "Ready to merge" check
over a required check per store
Per-store checks are named differently in every repository. One fixed gate lets a single organisation-wide rule protect them all.
06
Queueing live deploys
over cancelling the older one
Cancelling a deploy mid-run leaves the live theme half updated. A newer push waits its turn instead.
07
No stored deploy state
over tracking what was deployed
Every run compares against the live theme itself, so a failed or half-finished deploy is fixed by the next one.
08
Fixing settings before the push
over letting Shopify reject them
Shopify rejects saved values that fall outside a changed setting's range, which used to leave a live theme half updated. They are now clamped or reset first.
09
Web components with prefixed Tailwind
over a front-end framework
Components drop into any base theme without a framework runtime, and the tw: prefix keeps their classes from colliding with Dawn or the client's own theme.
Next case study
Tabby