Native apps on Solidus: why one Rails application makes it simpler

TL;DR

Difficulty: Intermediate

  • On a Solidus shop the app is a new front door, not a second shop: prices, stock, promotions, taxes, customers and orders live once, in one Rails application and one database.
  • So a promotion created once works in the app, stock never drifts, a customer has one account and one order history, and a data protection request is answered from one place.
  • Hosted platforms offer sound app routes (Shopify's Storefront API and Checkout Kit, app builders), but on their API calendar and within their extension points.
  • Rails helps with Turbo and Hotwire Native, Action Cable, Active Storage image sizes, background jobs and Action Push Native. You still design sign in for native screens, rate limits, versioning and parity tests.
  • In the example a Hotwire Native app takes 20 days to build and 12 a year to run, with zero days on the shop's own rules. Whether it pays still depends on purchase frequency.

An app needs every rule your shop already has: prices, stock, promotions, taxes, customers. On Solidus those rules live once, in one Rails application, so the app becomes a second front door instead of a second shop. In this chapter I show what that means in practice, how hosted platforms handle apps, what Rails gives you, what you still build, and what it costs in developer days.

The short answer: an app is a new front door, not a second shop

You have decided, or nearly decided, that an app might be worth it. The first chapter did the sums, and the third showed what an app can do that a website cannot. The next question is a practical one. How much work is it, and why do people keep saying it is easier on Solidus?

The honest answer is that most of a shop is not what the customer sees. It is the rules underneath. What does this table cost today, is there a promotion on it, how much VAT is in the price, is one left in the warehouse, who is this customer and what have they bought before. Those rules took years to get right. A shop app needs every one of them, and it needs them to give exactly the same answer as the website, because the same customer uses both, often on the same day.

On a Solidus shop those rules already live in one place: one Ruby on Rails application with one database. The app does not need its own copy. It becomes a second front door into the same building. That is the whole reason it is simpler, and the rest of this chapter shows what it means in practice, where hosted platforms do the same job differently, what Rails gives you for free, what you still have to build, and what it costs in developer days.

I do not repeat the API walkthrough here. The article on headless and API first Solidus covers what the Solidus API ships with, a checkout over the API step by step, idempotency and the app store fees. This chapter sits one level up: the architecture, and why one application changes the size of the job.

Example: the question Priya is really asking. Priya runs Wrenfield Home, an online homeware shop in Leeds (wrenfieldhome.example), on Ruby on Rails and Solidus. Her developer, Callum, has been asked for an app. Priya's worry is not the screens. It is that she has 1,400 products, 110,000 sessions and 1,980 orders a month, promotions that change every few weeks and a warehouse that ships every day, and she does not want to run two shops. On her setup she will not have to. The app reads the same price rows, the same stock rows and the same promotions her website reads. Callum builds a front door. He does not rebuild the shop.

What one Solidus application contains

Solidus is an open source eCommerce framework for Ruby on Rails. When you install the solidus gem you get several parts in one application, all versioned together1. At the end of October 2026 the current release was 4.8.0. The parts are:

  • The core. The models and rules: products, variants, prices, stock, promotions, taxes, shipping, orders, payments, returns, customers.
  • The storefront. The web shop your customers see, server rendered HTML that lives in your own application code, so it is yours to change.
  • The API. The solidus_api gem, a JSON API over the same core models. Requests carry a user's API key as a bearer token, or a guest order's token in a header2.
  • The admin. The back office where the shop owner manages products, orders and promotions.

All four share one PostgreSQL database. The storefront and the API are two sets of controllers calling the same models. A native app is a third client of the same rules, alongside the storefront and the admin.

Tap or click to open full screen and move around

The important part is the middle of that diagram. There is no box labelled "app backend". The app has no database of its own for products, prices or orders. It asks the shop.

Example: the Hollin oak side table, followed through the system

Take Wrenfield's Hollin oak side table, SKU WH-1042, £189. Here is where each fact about it lives, and who reads it.

FactWhere it lives in SolidusRead by the websiteRead by the app
The price, £189a row in spree_prices for the variantyesyes, the same row
How many are in stockcount_on_hand on a row in spree_stock_itemsyesyes, the same row
The autumn promotionthe promotion tables, applied when the order is recalculatedyesyes, the same code
The VAT inside the pricespree_tax_rates, applied to the orderyesyes, the same code
The customer and their past ordersspree_users, spree_orders, spree_addressesyesyes, the same rows

When a customer adds the table to the basket on the website, Solidus writes a row to spree_line_items on an order in spree_orders. When another customer does it in the app, Solidus writes a row to the same table, through the same code. The warehouse, the accounts and Priya's reports see one stream of orders. Nothing has to be copied, merged or reconciled at night.

Four things that cannot drift apart

"One application" sounds like an engineer's preference. It is really a list of problems that never happen. Here are the four that matter most to a shop owner, each with what goes wrong when the website and the app keep separate copies. The wider case for running a shop as one coherent system applies to apps with extra force.

A promotion created once works in the web shop and in the app

In Solidus a promotion is not a banner. It is a rule attached to the order. The current promotion system applies promotions inside the order updater: every time the order is recalculated, a service class applies the promotion configuration and adds or removes discounts as needed3. The older system that Solidus still installs by default works the same way in principle: promotion adjustments are recalculated every time the order is updated4. Either way, it does not matter which front door changed the order. The rule runs.

Example: the autumn furniture promotion. Priya creates "10% off furniture until 30 November" once, in the admin. A customer opens the Hollin oak side table on the website and adds it to the basket. The order is recalculated, the promotion applies:

189×(1−0.10)=170.10189 \times (1 - 0.10) = 170.10

where 189189 is the table's price in pounds and 0.100.10 is the 10% discount, so the basket shows £170.10. A second customer does the same in the app. The same order code runs, the same promotion applies, the basket shows £170.10. Priya did not create the promotion twice, nobody had to remember to switch it on in the app, and on 1 December it ends everywhere at once. The Foundations section on percentages explains the calculation if it is new to you.

Now picture the opposite. The app has its own product feed, synced from the shop, and its own discount logic. Priya creates the promotion in the shop admin. The app shows £189 until someone builds the same promotion in the app's system. A customer sees £170.10 on the website and £189 in the app and does what any of us would do: assumes the app is broken, or buys on the website and wonders what the app is for.

Stock is counted in one place

Solidus keeps the count for each variant at each stock location in spree_stock_items. Every order from every front door reduces the same number.

Example: the last three tables. Wrenfield has three Hollin tables left. At 10:00am a customer buys one on the website: the count goes from 3 to 2. At 10:04am a customer buys one in the app: from 2 to 1. At 10:06am a third customer buys the last one on the website: from 1 to 0. At 10:07am a fourth customer opens the table in the app and sees it as sold out, because the app read the same row.

With a separate copy that syncs every 15 minutes, an invented but common setup, the fourth customer at 10:07am would still see "1 in stock" in the app, because the copy was last updated at 10:00am. They would pay, and Priya would spend the afternoon refunding a £189 order and writing an apology. One oversold table is an annoyance. A busy week of them is a reputation.

One customer, one account, one order history

A customer who has bought from Wrenfield on the website signs into the app with the same email and password and sees every past order. A return started in the app shows up in the same admin screen as a return started on the website. Customer service has one place to look.

Example: a returning customer. Wrenfield gets 680 orders a month from returning customers. Take one of them. She bought the Hollin table on the website in March, installs the app in October and wants to order matching cushions. In the app she signs in, opens "My orders", sees the March order and the table she bought, and reorders. Her October order lands in spree_orders against the same user_id as March. Priya's repeat purchase figures, her cohort reports and her customer lifetime value calculations count her once, as one customer with two orders, rather than as two customers with one order each.

That matters more than it sounds. Wrenfield already knows from its data cleaning work that 3.1% of its customer accounts are duplicates: the same person with an email in different upper and lower case, or a guest checkout next to an account. A second customer store for the app would add a new way to create exactly that problem.

One place to answer a data protection request

Under the UK GDPR, a customer can ask for a copy of the personal data you hold about them, and in many cases ask you to erase it5. You have to answer without undue delay and at the latest within one month6. The right to erasure has exceptions, for example where the law requires you to keep a record7, such as the order records you keep for tax. The regulator, the Information Commission (until 30 September 2026 the Information Commissioner's Office, ICO), publishes practical guidance on handling these requests8. This is general information, not legal advice.

With one application, the shop's own part of the answer is one database.

Example: an access request at Wrenfield. A customer emails Priya asking for everything Wrenfield holds about her. She has used the website and the app. Callum runs two queries against the shop's PostgreSQL database. The first finds her orders, matching the email without regard to upper and lower case, because of the known duplicates:

-- PostgreSQL: every order for one customer, from any front door
SELECT o.number, o.completed_at, o.total, o.channel
FROM spree_orders o
JOIN spree_users u ON u.id = o.user_id
WHERE lower(trim(u.email)) = lower(trim('customer@example.com'))
  AND o.completed_at IS NOT NULL
ORDER BY o.completed_at;

The second finds the phones registered for push notifications, which live in the same database (more on that table later):

-- PostgreSQL: devices registered for push by the same customer
SELECT d.platform, d.name, d.created_at
FROM action_push_native_devices d
WHERE d.owner_type = 'Spree::User'
  AND d.owner_id = 4711;  -- the customer's id from spree_users

The result might look like this:

numbercompleted_attotalchannel
R48201937714 March 2026189.00spree
R93011824521 October 202654.00app

The channel column is a small Solidus detail worth knowing. Every order has one, it defaults to spree, and the API only lets an admin set it9. Callum sets it to app for orders placed in the app (the code is in the Hotwire Native section below), so every report can split web and app orders from the same table.

Priya still has to ask her payment providers, her analytics and her newsletter tool for their part. But the shop's part is two queries, not three systems and a spreadsheet.

How hosted platforms handle apps, and what they do well

Solidus is not the only way to give a shop an app, and it is not the only sensible one. If your shop runs on a hosted platform, the platform has its own answer, and the fair comparison is about where the logic lives and who sets the pace of change.

Shopify's own route for apps

Shopify's Storefront API is a GraphQL API for building custom storefronts on any platform, including apps, and it has a public access token meant for use from a browser or a mobile app10. Shopify maintains a Mobile Buy SDK for iOS and Android that connects an app to the Storefront API; its version numbers follow Shopify's quarterly API releases11. Shopify shut down its older Checkout APIs on 1 April 2025 and pointed app developers to the Storefront Cart API, or to its Checkout Sheet Kit12. That kit presents Shopify's own full checkout inside a native iOS or Android app, with the store's checkout customisations kept, and Shopify was renaming it to Checkout Kit at the time of writing13.

What this does well is real. Checkout, including Shop Pay and Apple Pay, is maintained by Shopify, not by you. Promotions and prices live in Shopify, so the app and the online store agree, the same way they do on Solidus. For a Shopify shop that wants an app, this is a sound route.

The difference is the clock and the walls. Shopify releases a new API version every three months and supports each stable version for at least 12 months14. Your app must keep up with that calendar, and so must the old versions of your app still on customers' phones. And the logic lives in a system you configure rather than one you own: you can do what the platform and its extension points allow, and the checkout in your app is Shopify's checkout.

App builders

A second option on hosted platforms is an app builder. Tapcart, for example, describes itself as a mobile app platform for Shopify stores, with a drag and drop editor for building the app and push notifications for engaging customers15. The appeal is speed: an app without a developer.

The trade is that the app is built from the builder's components and can do what the builder supports, and its logic is split three ways: the platform's rules, the builder's features and whatever the two can say to each other. That suits a shop that wants a standard shop app quickly. It suits a shop with its own rules (a hamper configurator, trade pricing, a measured to fit product) less well.

A separate headless backend

The third pattern is to run the shop on one system and the app on another: a separate commerce backend sold as a service, or an app backend built for the purpose, fed by syncs from the shop. This is where the drift problems from the previous section come from. Prices, stock, promotions and customers exist twice, and every sync is a place where they can disagree.

Where the logic lives, side by side

QuestionHosted platform with its own APIApp builder on a hosted platformSeparate backend for the appOne Solidus application
Where do prices and promotions live?in the platformin the platform, read by the buildertwice, kept in step by syncsonce, in your application
Where does stock live?in the platformin the platformtwiceonce, in spree_stock_items
Who owns the checkout in the app?the platformthe platformwhoever built ityou, the same checkout as the web
Who sets the pace of API change?the platform, every three monthsthe builder and the platformyou, plus every system you sync withyou
Can a custom rule reach the app?where the platform's extension points allowwhere the builder supports ityes, if you build it twiceyes, it is the same code
What is the main strength?maintained checkout and paymentsfastest startfreedom of technologyone set of rules, owned

Example: a custom rule. Wrenfield sells cushions individually and in "any three for £60" bundles, built as a rule on the order in Solidus. On one Solidus application that rule already runs for every order, so the app inherits it the day it ships. On a separate backend, Callum would build it a second time and test that both versions agree. On a hosted platform, Priya's first question would be whether the platform's discount features can express "any three for £60" at all, and if not, how much custom work it takes. None of those answers is wrong. They are different amounts of work, and on Solidus the amount is zero.

Where Rails already helps

The second reason an app is simpler on Solidus is Rails itself. A Rails 8 application ships with several pieces an app needs, and 37signals, the company behind Rails, maintains a framework made for exactly this kind of app.

Turbo and Hotwire Native reuse the screens you have

Hotwire Native is the framework 37signals announced in September 2024 by merging Turbo Native and Strada into one library for iOS and Android16. Its idea fits in one line from its own documentation: content is all web, navigation is all native17. The app shows the pages your Rails server already renders, inside native navigation, and you can replace specific screens or parts of screens with native Swift or Kotlin code where it earns its place17. Small native touches on a web screen, such as a native button in the top bar, are done with bridge components: a small piece of JavaScript on the web side and its native counterpart in the app18. A JSON file called the path configuration tells the app how to present each URL, for example as a modal, and a copy on your server lets you change that behaviour without a new store release19.

At the end of October 2026 the current releases were 1.3.1 for iOS and 1.3.2 for Android20. The iOS library integrates with a Hotwire web app, manages a single web view across its screens, and lists Turbo 7 or later as a requirement21.

On the Rails side, the turbo-rails gem recognises the app by its user agent and gives you a helper, hotwire_native_app?, in every controller and view22. That is enough to hide the website's own header inside the app, where native navigation replaces it:

<%# app/views/layouts/storefront.html.erb: the website header, but not inside the app %>
<% unless hotwire_native_app? %>
  <%= render "shared/header" %>
<% end %>

The path configuration can be a plain Rails action, so it is versioned, tested and deployed with the shop:

# config/routes.rb
get "/configurations/ios_v1", to: "configurations#ios_v1"

# app/controllers/configurations_controller.rb
class ConfigurationsController < ApplicationController
  def ios_v1
    render json: {
      settings: {},
      rules: [
        # Default: every page is pushed onto the stack, pull to refresh on
        { patterns: [".*"], properties: { context: "default", pull_to_refresh_enabled: true } },
        # Basket and checkout open as a modal sheet over the page
        { patterns: ["/cart$", "/checkout"], properties: { context: "modal" } },
        # The room view of a product is a native screen
        { patterns: ["/products/[^/]+/room$"], properties: { context: "modal", view_controller: "room_view" } }
      ]
    }
  end
end

Every property in that file comes from the path configuration reference: context is default or modal, pull_to_refresh_enabled is a boolean, and view_controller names a native iOS screen19. Android has its own equivalent, uri, in its own file.

To tag app orders, one small concern, included in the storefront's StoreController, sets the order's channel whenever the request comes from the app:

# app/controllers/concerns/app_channel.rb
module AppChannel
  extend ActiveSupport::Concern

  included do
    before_action :tag_app_channel, if: :hotwire_native_app?
  end

  private

  # current_order comes from Solidus's order helpers and never creates an order unless asked to
  def tag_app_channel
    order = current_order
    order.update_column(:channel, "app") if order && order.channel != "app"
  end
end

One honest catch. The storefront that ships with Solidus 4.8 sets data-turbo="false" on the page body in its layout, which switches Turbo Drive off23. Hotwire Native needs Turbo21, so turning it on and checking every screen of the storefront with it is part of the first days of work, not an afterthought.

Example: how many screens Wrenfield reuses. Callum counts the page types in Wrenfield's storefront (an invented but typical list): home, category, product, search, basket, the four checkout steps (address, delivery, payment, confirm), sign in, account, order history, order detail and returns. That is 14. On the Hotwire Native route, 14 are reused as they are, inside native navigation, and one new screen is native: the room view, where the customer places the Hollin oak side table in their own living room with the phone's camera. On a route that rebuilds every screen natively, all 14 are new code, twice, once for iOS and once for Android, plus the room view. Next week's chapter in this series, on the four ways to build a shop app, compares those routes properly.

Action Cable keeps a screen up to date

Action Cable integrates WebSockets with the rest of a Rails application, so live updates are written in Ruby like everything else24. With turbo-rails, a model can broadcast a fresh piece of HTML to every page that subscribes to it, using methods such as broadcast_replace_later_to, and a view subscribes with turbo_stream_from25. Because the app shows the same web screens, the same broadcast updates the website and the app.

# app/models/concerns/stock_item_broadcast.rb
# When the stock count of a variant changes, replace its availability badge
# on every open product page, on the website and in the app.
module StockItemBroadcast
  def self.prepended(base)
    base.after_update_commit :broadcast_availability, if: :saved_change_to_count_on_hand?
  end

  private

  def broadcast_availability
    broadcast_replace_later_to variant.product,
      target: "availability_#{variant.id}",
      partial: "products/availability",
      locals: { variant: variant }
  end
end

Spree::StockItem.prepend(StockItemBroadcast)
<%# app/views/products/show.html.erb %>
<%= turbo_stream_from @product %>
<%= render "products/availability", variant: @product.master %>

Example: the last table, live. Back to 10:06am, when the last Hollin table sells on the website. The stock row changes from 1 to 0, the broadcast job runs, and the customer who has the product page open in the app sees "In stock" turn into "Sold out" without touching the screen. One piece of code, two front doors.

Active Storage already makes the image sizes

Solidus stores product images through Active Storage and defines named sizes for them, by default mini (48 pixels), small (400), product (680) and large (1,200)26. Active Storage creates those variants on demand27. An app needs images in sizes that suit phone screens, and the shop already makes them. If the app needs another size, it is one more entry in the product_image_styles setting, not an image pipeline.

Example: the product screen. The app's product screen for the Hollin table shows the large image at full width and the small image in the "you might also like" row. Both URLs come back in the API response and in the web page, from the same stored file. Callum checks Wrenfield's analytics for the screen widths its customers actually use before adding a size, rather than guessing.

Background jobs and Action Push Native send the notifications

Rails 8 includes Solid Queue, a database backed job queue, as the default backend for background jobs28. Sending push notifications is exactly the kind of work that belongs in a job: it talks to Apple's and Google's servers, it can fail and retry, and the customer should never wait for it.

Action Push Native is a gem from the Rails organisation for sending push notifications to Apple's push service (APNs) and to Firebase Cloud Messaging (FCM) for Android29. It installs a device model, a notification class and a job, stores device tokens in a table called action_push_native_devices, links each device to any record through a polymorphic owner, and recommends sending with deliver_later_to so that errors and retries are handled in the background29. At the end of October 2026 its current release was 0.3.1, from January 202629, so it is young, and I would pin the version and read its changelog at every upgrade.

Solidus already announces the moments worth a notification. It publishes events on its own event bus, Spree::Bus, and a subscriber is a small class that handles an event by name30. When a carton leaves the warehouse, Solidus publishes carton_shipped with the carton as its payload31. So "your order is on its way" is one subscriber:

# app/subscribers/wrenfield/shipped_push_subscriber.rb
module Wrenfield
  class ShippedPushSubscriber
    include Omnes::Subscriber

    handle :carton_shipped, with: :notify_shipped, id: :wrenfield_push_carton_shipped

    def notify_shipped(event)
      carton = event[:carton]
      carton.orders.each do |order|
        next unless order.user # guests have no registered devices

        devices = ApplicationPushDevice.where(owner: order.user).to_a
        next if devices.empty?

        ApplicationPushNotification
          .with_data(path: "/orders/#{order.number}")
          .new(title: "Your order is on its way",
               body: "Order #{order.number} has left our warehouse.")
          .deliver_later_to(devices)
      end
    end
  end
end

# config/initializers/omnes.rb
Rails.application.config.to_prepare do
  Wrenfield::ShippedPushSubscriber.new.subscribe_to(Spree::Bus)
end

The app registers its device token with a small endpoint, rate limited so nobody can flood it:

# app/controllers/push_devices_controller.rb
class PushDevicesController < StoreController
  rate_limit to: 10, within: 1.minute, only: :create

  def create
    device = ApplicationPushDevice.find_or_initialize_by(token: params.require(:token))
    device.update!(
      platform: params.require(:platform), # "apple" or "google"
      name: params[:name],
      owner: spree_current_user
    )
    head :created
  end
end

The Apple key and the Firebase credentials go into Rails credentials, as the gem's configuration file shows, never into the code29.

Example: how many shipping notifications Wrenfield would send. In the app scenario from chapter one, Wrenfield would have 1,100 monthly active app users, of whom 640 (58%) allow push, and 90 app orders a month. If the customers who allow push place app orders at the same rate as everyone else, an assumption for the example, then about

90×6401100=90×0.582=52.490 \times \frac{640}{1100} = 90 \times 0.582 = 52.4

of those 90 orders a month would get a "your order is on its way" notification, where 9090 is the number of app orders a month, 640640 the number of active users who allow push and 11001100 the number of monthly active users. That is about 52 notifications a month, sent by the same job queue that already sends Wrenfield's emails. The Foundations section on ratios and rates covers the share calculation. A later chapter in this series covers push notifications in depth, including consent and how often is too often.

What still needs work

One application removes the biggest job, duplicating the shop. It does not remove all of the work. Four things need real design before an app ships, and I would rather list them plainly than let anyone discover them in month three.

A sign in flow that gives the app a token

Inside Hotwire Native, the web screens run in a web view, and the customer's normal shop session works there as it does in a browser. The moment a native screen calls the API, though, it needs a token of its own. Solidus authenticates API calls with a user's API key as a bearer token2, but by default it only generates API keys automatically for admins: the setting roles_for_auto_api_key defaults to admin, and generate_api_key_for_all_roles defaults to off32. Solidus's own guide shows how to add a JSON sign in endpoint with solidus_auth_devise that returns the user's key33.

Example: Wrenfield's room view. The room view is the one native screen. It needs to add the Hollin table to the customer's basket after they have placed it in their room. Callum adds a sign in endpoint following the Solidus guide, generates keys for customers when they first sign in from the app, stores the key in the phone's secure storage, and has the native screen send it as Authorization: Bearer ... when it adds the line item. The basket the customer then sees in the web view is the same order. A later chapter in this series covers token design for apps in depth, including refresh tokens and what happens when a phone is lost.

Rate limits

An app's API endpoints are public addresses, and not everything that calls them will be your app. Rails controllers have a built in rate_limit method: by default it counts requests per IP address, stores the counts in the application's cache, and answers with "429 Too Many Requests" when the limit is reached34.

# app/controllers/api_sessions_controller.rb
class ApiSessionsController < StoreController
  # Ten sign in attempts per IP address per three minutes
  rate_limit to: 10, within: 3.minutes, only: :create
end

Example: a password guessing script. Someone points a script at Wrenfield's app sign in endpoint and tries 500 passwords a minute from one address. With the limit above, the first 10 attempts in each three minute window get an answer and the rest get a 429. Over an hour that is at most 200 guesses instead of 30,000, and the shop's server barely notices. The headless article covers Rack::Attack for finer rules.

Versions, because old apps live for years

A website updates for everyone the moment you deploy. An app does not. Some customers update the day a new version appears, some months later, some never. Every version you ever shipped can still call your server.

Hotwire Native softens this a great deal, because most screens are web screens: deploy the shop, and every installed app shows the new screens at the next visit17. What still needs versioning is the small native surface: the path configuration (which is why the documentation suggests versioned files such as ios_v119), the bridge components and any API endpoint a native screen calls.

Example: changing the room view. Callum wants the room view to send the chosen colour of the Hollin table as well. The 1.0 app does not send it. So the endpoint accepts the colour when it is present and falls back to the default when it is not, and the 1.1 app sends it. Both versions keep working. If one day the old behaviour has to go, the path configuration can send old versions to a web screen that asks the customer to update.

Tests that prove the app and the web agree

"The same code" is a claim, and a claim needs a test. The useful tests here are the ones that call the API the way the app does and compare the answer with what the shop itself calculates. I write them first, before the feature, as I do everything; the article on TDD and BDD for APIs shows the method.

# spec/requests/app_order_parity_spec.rb
require "rails_helper"

RSpec.describe "The app sees the same order as the shop", type: :request do
  let(:user)  { create(:user, :with_api_key) }
  let(:order) { create(:order_with_line_items, user: user, line_items_count: 2) }

  it "returns the order total the shop calculated" do
    get "/api/orders/#{order.number}",
        headers: { "Authorization" => "Bearer #{user.spree_api_key}" }

    expect(response).to have_http_status(:ok)
    expect(response.parsed_body["total"]).to eq(order.reload.total.to_s)
  end
end

The :with_api_key trait and the order_with_line_items factory both come with Solidus's own test support35.

Example: the promotion test. Before the autumn promotion goes live, Callum adds one more case to that file: an order with the Hollin table and the promotion active, checked through the API and through the storefront. Both must show £170.10. If anyone ever changes the promotion code in a way that treats the two front doors differently, the test gate stops the release.

What it costs in developer days

The architecture shows up in the effort. The figures below are the fixed example estimates used across this series, in developer days, the same for both example shops. They assume the shop already runs on one Solidus application with its rules in one place.

RouteFirst releaseEach year after
Progressive web app (PWA), web push and a wallet pass8 days4 days
Hotwire Native, iOS and Android20 days12 days
React Native with Expo70 days25 days
Flutter75 days25 days
Fully native, Swift and Kotlin130 days45 days
Invented example estimates for a shop on one Solidus application. First release and yearly running effort: PWA with web push and a wallet pass 8 and 4 days, Hotwire Native 20 and 12, React Native with Expo 70 and 25, Flutter 75 and 25, fully native Swift and Kotlin 130 and 45. Tap or click to open full screen and move around

To turn days into money, this series uses an assumed market rate of £650 a day. That is an assumed market rate for the example, not my price. My own prices are monthly packages, published on my transparency page. Tooling (crash reporting, a push service, test devices) is £600 a year in the example. The store fees are real: Apple's Developer Program costs 99 US dollars a year36 and a Google Play developer account a one off 25 US dollars37. At the European Central Bank's reference rates for 27 October 2026 (1.1150 US dollars and £0.83658 to the euro)38, that is about £74 a year and £19 once.

Example: the 20 days of Wrenfield's Hotwire Native app

Where do Hotwire Native's 20 days go? Here is an invented but realistic breakdown for Wrenfield, and the line that matters is the last one.

WorkDays (example)
iOS and Android shells, native navigation and tabs5
Rails changes: Turbo on, header hidden in the app, path configuration, channel tagging2
Sign in and an API key for the native screen2
Two bridge components: a native basket button and a share button3
One native screen: the room view for the Hollin oak side table3
Push: device endpoint, shipped notification subscriber2
Tests, TestFlight and the Google Play internal testing track, store submission3
Prices, stock, promotions, taxes, checkout, customer accounts0
Total20
Invented breakdown of the 20 developer days for Wrenfield Home's first Hotwire Native release: app shells and navigation 5 days, Rails changes 2, sign in and API key 2, bridge components 3, the native room view 3, push 2, tests and store submission 3, and zero days for prices, stock, promotions, taxes, checkout and accounts, because the Solidus application already has them. Tap or click to open full screen and move around

Zero days for the shop itself. That is what "simpler on Solidus" means once it is written down.

Example: three years on one application versus a separate backend

Now the comparison that shows the architecture's value in money. Suppose, as an invented example, that Wrenfield's rules were not reachable from an app, so the app needed a separate backend fed by syncs of products, prices, stock, promotions and customers. Call that 15 extra days for the first release and 6 extra days a year to keep the syncs honest. The total cost over nn years is

C(n)=r (db+(n−1) dy)+n T+GC(n) = r\,\big(d_b + (n-1)\,d_y\big) + n\,T + G

where C(n)C(n) is the cost over nn years, rr is the day rate (£650 in the example), dbd_b the developer days for the first release, dyd_y the developer days in each later year, TT the yearly tooling and Apple fee (£600 plus £74, so £674), and GG the one off Google Play fee (£19). The first year is the build, every later year is running work. The Foundations section on ratios and rates explains working with rates like a day rate.

On one Solidus application, Hotwire Native, three years (db=20d_b = 20, dy=12d_y = 12), in pounds:

C(3)=650×(20+2×12)+3×674+19=28,600+2,022+19=30,641C(3) = 650 \times (20 + 2 \times 12) + 3 \times 674 + 19 = 28{,}600 + 2{,}022 + 19 = 30{,}641

With a separate backend (db=35d_b = 35, dy=18d_y = 18):

C(3)=650×(35+2×18)+3×674+19=46,150+2,022+19=48,191C(3) = 650 \times (35 + 2 \times 18) + 3 \times 674 + 19 = 46{,}150 + 2{,}022 + 19 = 48{,}191

That is £30,641 against £48,191. The difference, 48,191−30,641=17,55048{,}191 - 30{,}641 = 17{,}550, is £17,550 over three years, for the same app on the customer's phone.

Invented example at an assumed £650 a day with £674 a year of tooling and Apple fee and a £19 one off Google fee. On one Solidus application the cumulative cost is £13,693 after year one, £22,167 after year two and £30,641 after year three. With a separate backend for the app it is £23,443, £35,817 and £48,191. Tap or click to open full screen and move around

Does it pay? The cost side made concrete

Chapter one asked whether an app pays for itself and answered with the series' example figures. This chapter's contribution is the cost side, so here is the same test with the costs from above.

The yearly value of an app is its incremental contribution: the orders it creates that would not have happened on the website anyway, times the contribution each order leaves after all variable costs.

I=12 q mI = 12\,q\,m

where II is the incremental contribution per year, qq the incremental app orders per month and mm the contribution per order. The Foundations section on ratios and rates covers the arithmetic.

Example: Wrenfield Home. In the app scenario, Wrenfield's app takes 90 orders a month, of which 65 would have been placed on the website anyway, so q=25q = 25. With m=£19.86m = £19.86:

I=12×25×19.86=5,958I = 12 \times 25 \times 19.86 = 5{,}958

That is £5,958 a year. Running the Hotwire Native app from the second year costs £8,474 a year (12×650+674=8,47412 \times 650 + 674 = 8{,}474). The app does not cover its own running costs, let alone the £13,693 of its first year. To cover the running cost alone, Wrenfield would need

q∗=847412×19.86=8474238.32=35.6q^{*} = \frac{8474}{12 \times 19.86} = \frac{8474}{238.32} = 35.6

that is about 36 incremental app orders a month instead of 25, just to cover the running cost, before the build is paid back. Here q∗q^{*} is the number of incremental orders per month at which the yearly running cost is covered. Including the build, spread with three years of running over 36 months, the bar is about 54 incremental orders a month, as chapter one worked out. With a separate backend, the running cost would be £12,374 (18×650+674=12,37418 \times 650 + 674 = 12{,}374) and the bar just to cover the running cost, before the build is paid back, would rise to about 52 incremental orders a month. Worked out the same way as chapter one, with the 35 day build and three years of running over 36 months, it would be about 84. A low frequency homeware shop is a long way from either.

Example: Calder Coffee Roasters. The contrast shop in Halifax runs the same Rails and Solidus stack. Its customers order every three and a half weeks. In its app scenario, the app takes 1,150 orders a month, 900 of which would have happened on the website anyway, so q=250q = 250, with m=£8.40m = £8.40:

I=12×250×8.40=25,200I = 12 \times 250 \times 8.40 = 25{,}200

That is £25,200 a year (II in pounds), more than the whole first year on the Hotwire Native route (£13,693), and roughly three times the yearly running cost after it. For Calder, the app pays in its first year.

Invented example figures. Wrenfield Home's app adds £5,958 a year of incremental contribution against £8,474 a year of running cost, so it does not pay. Calder Coffee Roasters' app adds £25,200 a year against the same £8,474 running cost, so it pays. Tap or click to open full screen and move around

Notice what one application did to both cases. It did not make Wrenfield's app worth building. Purchase frequency decides that, as chapter one showed. What it did was make the cost low enough that a shop like Calder pays back in year one, and keep the bar for a shop like Wrenfield at 36 incremental orders a month rather than 52 just to cover the running cost, before the build is paid back, and at about 54 rather than 84 once the build is included over three years. When Wrenfield's repeat business grows, the app becomes worth it sooner.

My view

My view: if your shop runs on Solidus, the expensive part of an app is already built, and that changes the decision more than any framework choice. The app is a front door to the rules you already have, so a promotion, a stock count, a customer account and a data protection request each exist once. Which route then depends on what the app is. When the app mostly reuses the shop's existing screens, Hotwire Native is the fastest and lowest cost route, and a good first step for a Rails shop. When the app is its own product with its own screens, I build it in React Native, one codebase for iOS and Android, against the shop's own API. Either way, a fully native screen only where it clearly earns its place, such as a room view for furniture or a scanner for reorders. I would not build a separate backend for an app on a shop that has one application, and I would be wary of any plan that copies prices, stock or customers into a second system, because every copy is a promise to keep two things in step forever.

Equally, simpler is not free. The sign in flow, rate limits, versioning and tests are real work, and the yearly running cost, not the first build, is what decides whether an app pays. On every shop I build, the code is the client's once paid, and when I build an app, the client owns the app, its code and the developer accounts, in their own company name. I build shops API ready precisely so that this chapter's sums apply when the day comes.

Conclusion

A native app on a Solidus shop is simpler because the shop is one Rails application. Prices, stock, promotions, taxes, customers and orders live once, and the app reads and writes the same rows as the website through the same code, so nothing drifts and nothing has to be reconciled. Hosted platforms offer sound app routes too, with maintained checkout and payments, but on their API calendar and within their extension points. Rails adds Turbo and Hotwire Native for reusing screens, Action Cable for live updates, Active Storage image sizes, background jobs and Action Push Native for notifications. What remains is a sign in flow for native screens, rate limits, versioning for the small native surface and tests that prove the app and the website agree. In the example, that puts a Hotwire Native app at 20 days to build and 12 a year to run, with nothing spent on the shop's own rules. Whether that pays still depends on how often your customers buy. The next chapter in this series compares the four ways to build the app itself: Hotwire Native, React Native, Flutter and fully native.

If you want to know what an app would really take on your shop, I run a free workshop and the first two weeks of work are on me. I will show you where your shop's rules live today and what the app would reuse.

Sources

  1. 1.

    Solidus, release v4.8.0, GitHub, 9 October 2026, https://github.com/solidusio/solidus/releases/tag/v4.8.0

  2. 2.

    Solidus, API authentication, api/openapi/authentication.md (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/api/openapi/authentication.md

  3. 3.

    Solidus, Solidus Promotions README (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/promotions/README.md

  4. 4.
  5. 5.

    UK GDPR, Article 15 (right of access) and Article 17 (right to erasure), legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/15

  6. 6.

    UK GDPR, Article 12(3), legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/12

  7. 7.

    UK GDPR, Article 17(3)(b), legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/17

  8. 8.

    Information Commission (formerly the Information Commissioner's Office), Right of access, https://ico.org.uk/for-organisations/uk-gdpr-guidance-and-resources/individual-rights/individual-rights/right-of-access/

  9. 9.

    Solidus, Spree::Api::OrdersController, admin_order_attributes include channel (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/api/app/controllers/spree/api/orders_controller.rb

  10. 10.

    Shopify, Storefront API reference, shopify.dev, https://shopify.dev/docs/api/storefront

  11. 11.

    Shopify, Mobile Buy SDK for iOS, README, GitHub, https://github.com/Shopify/mobile-buy-sdk-ios

  12. 12.

    Shopify, Checkout APIs will be shut down April 1, 2025, developer changelog, https://shopify.dev/changelog/checkout-apis-will-be-shut-down-april-1-2025

  13. 13.

    Shopify, Checkout Kit for Swift, README at release 3.9.2 (8 October 2026), GitHub, https://github.com/Shopify/checkout-sheet-kit-swift/blob/3.9.2/README.md

  14. 14.

    Shopify, API versioning, shopify.dev, https://shopify.dev/docs/api/usage/versioning

  15. 15.

    Tapcart, Mobile apps for Shopify stores, https://www.tapcart.com/

  16. 16.

    37signals, Announcing Hotwire Native, 25 September 2024, https://dev.37signals.com/announcing-hotwire-native/

  17. 17.
  18. 18.

    Hotwire Native, Bridge components, https://native.hotwired.dev/overview/bridge-components

  19. 19.

    Hotwire Native, Path configuration reference, https://native.hotwired.dev/reference/path-configuration

  20. 20.

    Hotwire Native for iOS, release 1.3.1 (14 August 2026), GitHub, https://github.com/hotwired/hotwire-native-ios/releases/tag/1.3.1, and Hotwire Native for Android, release 1.3.2 (12 October 2026), https://github.com/hotwired/hotwire-native-android/releases/tag/1.3.2

  21. 21.

    Hotwire Native for iOS, README at release 1.3.1, GitHub, https://github.com/hotwired/hotwire-native-ios/blob/1.3.1/README.md

  22. 22.
  23. 23.

    Solidus, storefront layout template, storefront/templates/app/views/layouts/storefront.html.erb (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/storefront/templates/app/views/layouts/storefront.html.erb

  24. 24.

    Rails Guides, Action Cable overview, https://guides.rubyonrails.org/action_cable_overview.html

  25. 25.

    Hotwire, turbo-rails, Turbo::Broadcastable and Turbo::StreamsHelper, GitHub, https://github.com/hotwired/turbo-rails/blob/main/app/models/concerns/turbo/broadcastable.rb

  26. 26.

    Solidus, Spree::AppConfiguration, product_image_styles (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/core/lib/spree/app_configuration.rb

  27. 27.

    Rails Guides, Active Storage overview, transforming images, https://guides.rubyonrails.org/active_storage_overview.html

  28. 28.

    Rails Guides, Ruby on Rails 8.0 release notes, Solid Queue, https://guides.rubyonrails.org/8_0_release_notes.html

  29. 29.

    Rails, Action Push Native, README and release 0.3.1 (23 January 2026), GitHub, https://github.com/rails/action_push_native

  30. 30.
  31. 31.

    Solidus, Spree::OrderShipping publishes carton_shipped (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/core/app/models/spree/order_shipping.rb

  32. 32.

    Solidus, Spree::AppConfiguration, roles_for_auto_api_key and generate_api_key_for_all_roles (v4.8.0), GitHub, https://github.com/solidusio/solidus/blob/v4.8.0/core/lib/spree/app_configuration.rb

  33. 33.

    Solidus Guides, How to sign in to the Solidus API using solidus_auth_devise, https://guides.solidus.io/how-tos/api/how-to-sign-in-to-the-solidus-api-using-solidus_auth_devise

  34. 34.

    Rails API documentation, ActionController::RateLimiting::ClassMethods, rate_limit, https://api.rubyonrails.org/classes/ActionController/RateLimiting/ClassMethods.html

  35. 35.

    Solidus, testing support factories, user_factory.rb and order_factory.rb (v4.8.0), GitHub, https://github.com/solidusio/solidus/tree/v4.8.0/core/lib/spree/testing_support/factories

  36. 36.

    Apple, Apple Developer Program, https://developer.apple.com/programs/

  37. 37.

    Google, Register for a Google Play Console developer account, Play Console Help, https://support.google.com/googleplay/android-developer/answer/6112435

  38. 38.