Get in touch

Log 055 · 10 September 2025 · 1 min read

App or Theme Code: Where Shopify Logic Belongs

Decide where to put custom Shopify functionality. When to use apps, when to use theme code, and the trade-offs.

The Architecture Decision

Custom Shopify functionality can live in theme code or in apps. The choice affects maintainability, performance, and capability. Making the wrong choice creates problems later.

Theme Code

What it is

Liquid templates, CSS, and JavaScript that live in the theme. Modified through theme editor or direct code changes.

Good for

  • Presentation and layout
  • Simple client-side interactivity
  • Theme-specific customization
  • Quick changes by theme developers

Limitations

  • Cannot access external APIs server-side
  • Cannot store custom data
  • Lost when theme changes
  • No admin configuration UI

Apps

What they are

External applications that connect to Shopify via API. Include backend logic, database, and optional storefront components.

Good for

  • External integrations
  • Custom data storage
  • Complex business logic
  • Admin interfaces
  • Functionality that survives theme changes

Trade-offs

  • More complex to build
  • Requires hosting
  • Ongoing maintenance
  • Separate deployment from theme

App Extensions

Middle ground

App extensions (theme blocks, checkout extensions) provide app functionality integrated into themes. Portable across themes, maintainable by app developers.

Use cases

  • Custom sections that should survive theme changes
  • Checkout customization
  • Widgets that need backend data

Decision Framework

Needs external API?

App. Theme code cannot reliably call external APIs server-side.

Needs custom data storage?

App with database, or metafields if data fits Shopify’s model.

Should survive theme changes?

App or app extension. Theme code is theme-dependent.

Purely presentational?

Theme code is simpler and faster to implement.

For development guidance, see custom Shopify apps.

Working with Starcodia

Starcodia advises on architecture for custom Shopify functionality. We choose the right approach for your requirements.

To discuss, get in touch.

More on Applications & AI

All articles →
  1. Log 01 · 12 December 2025How AI Can Identify CRO Failures in Shopify Stores3 min read →
  2. Log 02 · 4 December 2025AI Pricing Optimization for Ecommerce2 min read →
  3. Log 03 · 1 December 2025Shopify App Security Best Practices2 min read →
  4. Log 04 · 13 November 2025AI Sentiment Analysis for Customer Feedback2 min read →

Countdown open

What are you working on?

Tell us what you'd like to build, improve or hand over.