Full Audit + Rebuild for a Large Specialty Beverage Brand
An anonymized technical field note from a large Shopify theme cleanup and modernization project for a specialty beverage brand operating in a compliance-sensitive category.
The short version
This was not a redesign for the sake of redesign.
The goal was to rebuild the current Shopify theme into a cleaner version of itself: easier to audit, easier to maintain, easier to share across related storefronts, and safer for future developers and AI coding tools to work inside.
The challenge was that the codebase had years of accumulated theme files, unused templates, generated pages, app surfaces, one-off landing pages, historical snippets, and legacy assets.
Instead of estimating against the entire historical repository, we created an active-template audit.
That audit separated:
That changed the project from "this theme is huge and scary" to "this is the active working surface."
Why this kind of cleanup matters
A large Shopify theme can become expensive to change long before it looks broken.
The storefront may still work. Customers may still place orders. Campaigns may still launch. Apps may still run. But every update becomes slower because nobody fully trusts the codebase.
A developer opens the repo and sees hundreds of templates, sections, snippets, generated pages, old experiments, app embeds, and assets. Some are active. Some are historical. Some are system-related. Some are app-adjacent. Some look unused but still matter.
That uncertainty creates risk.
When nobody can tell what is live, simple changes become expensive.
The first step: stop guessing
The first step was to stop treating every file in the repository as equal.
The team provided a list of templates that were actually assigned in Shopify Admin across products, collections, pages, blogs, and articles.
From there, I traced the active theme surface:
- Active templates
- Sections used by those templates
- Snippets used by those active sections
- Assets referenced by active Liquid files
- App and integration surfaces that required manual review
This gave the project a defensible scope.
Instead of asking, "How many files exist?" the better question became: which files are actually part of the live storefront?
What the active-template audit found
The first-pass audit identified a large but understandable active footprint.
It also identified removal-review candidates:
Those numbers mattered because they gave the team a shared way to discuss scope.
Before the audit, the codebase felt like a giant historical pile. After the audit, there was a working map.
A big Shopify repo needs a map before it needs a rewrite.
An active-template audit separates live storefront code from historical files, generated pages, app surfaces, and removal candidates.
Start with Shopify Detox ScanRemoval candidates are not automatic deletes
One of the most important parts of this kind of cleanup is restraint.
An inactive-looking file is not automatically safe to remove.
Shopify themes often contain system templates, app-adjacent code, customer account surfaces, cart behavior, search behavior, password pages, gift card templates, tracking surfaces, and generated landing-page artifacts that require manual review.
For this project, removal candidates were treated as review items, not a delete list.
Each file needed a decision:
That prevented cleanup work from becoming reckless.
The goal was not to make the repo smaller at any cost. The goal was to make the theme cleaner without breaking real storefront behavior.
Turning cleanup into a shared tracker
The audit produced a practical removal-candidate tracker that could be reviewed in Notion or a spreadsheet.
The tracker included:
This gave the brand and development team a shared place to make decisions.
That part matters. Theme cleanup is not just a code task. It is also a communication task.
A good cleanup process gives everyone a way to understand what is being kept, what is being removed, what needs review, and why.
Handling generated landing pages and app-driven surfaces
The theme included generated or app-driven surfaces that needed to be handled carefully.
Generated landing-page code can look strange inside a theme repo. It may include many chunks, repeated structures, and files that do not look like normal hand-authored theme code.
But that does not mean it can be blindly removed.
For this project, generated landing-page files and app-adjacent surfaces were reviewed in context. Some needed to come over as-is. Others were candidates for cleanup later. Some were tied to campaign pages or specialized experiences.
The important part was separating "generated and ugly" from "unused and safe to remove."
Those are not the same thing.
Keeping related storefronts aligned
The broader ecosystem included multiple related Shopify storefronts and brand expressions.
The goal was not to force every storefront into one rigid codebase. Each storefront still needed to own its own templates, content, settings, and business rules.
But the related repos needed to stay structurally close enough that future work could move faster.
The strategy was:
This made the system cleaner without pretending every storefront had identical needs.
Modernizing the active theme
The modernization focused on the parts of the theme that mattered most to the business.
Key areas included:
This was not about chasing a visually new theme. It was about cleaning and modernizing the theme areas that affected commerce, trust, education, and maintainability.
Compliance-sensitive storefront work
In a specialty beverage category, storefront cleanup is not only technical.
Product language, educational content, ingredient details, nutrition information, and compliance-sensitive copy all matter.
The theme needed to support different storefront contexts without relying on broad, risky global logic. Some surfaces required safer fallback copy or storefront-specific handling.
The goal was to make the shared theme patterns easier to reuse while still allowing each storefront to respect its own content, compliance, and conversion needs.
That kind of work requires more care than a normal visual cleanup because a small copy or template mistake can create a bigger business problem.
Finding hidden issues during the audit
The active-template audit also surfaced hidden issues that would have been easy to miss in a normal cleanup.
For example, one active section referenced a snippet that was not present in the repository.
That kind of missing snippet reference is exactly why an audit matters.
A theme can continue functioning in many places while still carrying broken references, historical assumptions, or edge-case issues that only appear under certain templates or page states.
The audit made those issues visible before the modernization work moved too far forward.
Handling live-site changes during the rebuild
The live site continued changing during the rebuild.
That is normal for a real ecommerce business. Campaigns continue. Content changes continue. Apps get adjusted. Fixes happen. Teams cannot freeze the storefront for weeks just because cleanup is underway.
So the process included launch reconciliation.
Live changes were reviewed and classified as:
- Port now
- Important fixes, active content, app updates, or launch-critical changes that needed to be brought into the cleaned theme.
- Defer
- Temporary campaign or landing-page changes that did not need to block launch.
- Ignore
- Changes touching code already confirmed as inactive or scheduled for removal.
This kept the cleaned theme close enough to production without letting every live-site change derail the rebuild.
Making the theme easier for AI-assisted development
A major goal of the cleanup was making future AI-assisted development safer.
AI coding tools work better when the codebase has clear patterns, smaller working areas, consistent naming, and less historical noise.
This cleanup helped by:
The point was not to let AI blindly edit the theme.
The point was to make the codebase easier for a developer to guide, review, and maintain with AI assistance.
That is a big difference.
Why this changed the estimate
Before the active-template audit, estimating the rebuild against the entire historical codebase would have been misleading.
The repo contained too much history. Pricing against every file would have punished the brand for years of accumulated code, generated pages, and inactive surfaces.
The active audit made the estimate more responsible.
The scope could be based on:
That gave the team a more honest way to plan the work.
The bigger lesson
Large Shopify cleanup projects should start with a map.
When a theme has years of history, the first question should not be: what can we delete?
The better question is: what is actually active?
Once you know the active templates, sections, snippets, assets, and app surfaces, the project becomes much easier to reason about.
You can estimate better. You can remove more safely. You can modernize the right parts. You can avoid breaking system surfaces. You can keep related repos aligned. You can make future development safer.
The biggest win is clarity.
How Storefront Detox can help
Shopify Detox Scan is a lightweight first step if you are not sure how much technical debt your storefront is carrying.
For larger cleanup work, the next step may be a deeper Shopify Rehab or Cleanup Sprint.
A deeper audit can help identify:
The goal is not to shame the old codebase. The goal is to make it safer to work on.
Next step
Not sure what parts of your Shopify theme are actually active?
Start with a Shopify Detox Scan or a deeper Shopify Rehab. I can help separate the live storefront from years of historical templates, app code, generated pages, and technical debt.
Start with Shopify Detox Scan