Shopify3 min read

Building a Shopify app with Laravel

An embedded Shopify app on Laravel 13 the way Shopify documents it today: ID tokens and expiring access tokens through the official PHP package, React and Polaris 2 in the admin, webhooks and Events, and a theme app extension. Six parts, every command run against a real store.

By Abhishek Fouzdar · Updated

Shopify's own tutorials assume React Router on Node. The Laravel world has a couple of community packages that wrap the old OAuth flow and a lot of posts that stopped being true when session tokens replaced cookies. This series builds an embedded Shopify app on Laravel 13 the way Shopify documents it today: ID tokens, expiring access tokens exchanged without a redirect, Shopify's official PHP package doing the verification, Polaris web components in the admin, and the newer Events delivery alongside classic webhooks. Everything in it was run against a real development store on 23 October 2026, on the current API version, 2026-10.

The app is small on purpose. ReviewMini lets a merchant collect product reviews, moderate them in the admin, and show them on the storefront with an average rating that lives in Shopify metafields. Small enough to read in full, large enough to touch every surface a real app touches.

The ReviewMini admin inside the Shopify admin: a reviews table with status filter, moderation actions and an add-review modal

Who this is for

You know PHP and Laravel, you can read TypeScript and React, and you have not built for Shopify before, or you did years ago and remember cookies and OAuth redirects. Every Shopify term is explained the first time it appears. Every command is shown with what it prints. Each part ends with the things that went wrong while building it and what each one means, because that is where a first Shopify app loses its afternoon.

What you will end up with

A public repository, shipbytes/laravel-shopify-app-guide, with one commit per part, and an app that does the following.

Surface What ReviewMini does there
App Home (the admin page) A React 19 and Polaris 2 interface: reviews table with filter and pagination, approve, reject, delete, an add-review modal with product search, and a settings page.
Admin API Product search, and a queued job that writes each product's average rating and review count to two app-owned metafields.
Webhooks app/uninstalled and the three privacy topics every app must answer.
Events One subscription: when a product is deleted, its reviews go with it.
App proxy A signed route the storefront calls to read approved reviews and submit new ones.
Theme app extension A block a merchant adds to the product page in the theme editor. Liquid renders the rating from the metafields; a small script loads the reviews.
The review block on a product page: average rating from the metafields, the approved reviews, and a form

The parts

  1. Project, CLI, app record, tunnel. Install the Shopify CLI, log in, create the app record from the terminal, run a fresh Laravel 13 app inside the Shopify admin through a tunnel. Both the CLI's throwaway tunnel and a named Cloudflare tunnel on your own domain.
  2. Authentication. What an ID token is, why there is no OAuth redirect any more, how the official package verifies requests, and how token exchange turns an ID token into an expiring offline access token that refreshes itself.
  3. Data and the Admin API. Reviews and settings scoped by shop, JSON endpoints for the admin UI, product search through GraphQL, and a job that keeps product metafields in sync, with the token-refresh problem jobs have and the package's answer to it.
  4. The admin UI. React 19, TypeScript and Polaris 2 web components, with the places the combination bites and how to get round each.
  5. Webhooks, Events and privacy. One middleware for both delivery mechanisms, deduplication, the privacy topics, and a real uninstall and reinstall.
  6. The storefront. App proxy, theme app extension, the metafields in Liquid, and a review submitted from the product page that ends up approved in the admin and counted on the storefront.

What you need

  • PHP 8.3 or later with Composer, Node 20 or later with npm. The series was built on PHP 8.5 and Node 24.
  • A Shopify dev account at dev.shopify.com. Free. It gives you the Dev Dashboard, where app records and development stores live.
  • A development store. Create one from the Dev Dashboard under Stores if you do not have one; it comes with a storefront password and no fees.
  • A domain on Cloudflare if you want the named tunnel in part 1. Optional; the CLI's tunnel works without it.
  • An afternoon for parts 1 to 3, another for 4 to 6.

A note on what changed

If you last looked at Shopify apps before 2025, three things are different, and all three shaped this series. Embedded apps no longer authenticate the merchant with cookies and an OAuth redirect; the admin hands the app a short-lived signed token on every request, and the app trades it for an access token in the background. Access tokens for public apps now expire after an hour and come with a refresh token, mandatory for new apps since April 2026. And Polaris, Shopify's design system, moved from a React component library to web components that work with any framework, with version 2 released on 22 October 2026, the day before this was written. Shopify's official PHP package, shopify/shopify-app-php, is the piece that makes the first two tractable from Laravel; part 2 shows what it does and what it leaves to you.

Start with part 1.

New posts by email

Get new posts by email. Nothing else, no digests, unsubscribe in one click.

Comments

Comments are GitHub Discussions in shipbytes/discussions. Sign in with GitHub to post.