How to Build a Shopify App in 2025: A Complete Guide (With Code Structure & Best Practices)

Deepak Kharware

November 28th, 2025

266 views
How to Build a Shopify App in 2025: A Complete Guide (With Code Structure & Best Practices)

If you want to build a Shopify app in 2025, you’re entering one of the most profitable developer ecosystems. Shopify apps power custom features like product bundles, checkout extensions, upsells, subscriptions, analytics dashboards, and much more. This guide will help you understand everything step-by-step — from setup to deployment — with clean explanations and real code.

Whether you're a beginner or a front-end developer moving into Shopify app development, this blog is the perfect place to start.


Why Build a Shopify App?

Shopify app development is trending because:

  • Shopify has grown into a leader in global e-commerce.

  • Store owners rely heavily on apps to upgrade their stores.

  • Developers can earn through freelancing, client projects, or publishing apps on the Shopify App Store.

  • Shopify provides open APIs, modern frameworks, and powerful tools (CLI, Polaris, Admin API, App Bridge).


Part 1 — Understanding Shopify App Types

Before starting development, you must know the two main app types:

1. Public Apps

Apps listed on the Shopify App Store. Anyone can install them.

2. Custom/Private Apps

Built for a single merchant or internal use.

3. Sales Channel Apps

Used for integrations like Facebook, Pinterest, or custom storefronts.


Part 2 — Technologies You Will Use

To build a modern Shopify app, you’ll work with:

  • Node.js + Express (backend)

  • React + Polaris (UI component library)

  • Shopify CLI 3+

  • Admin API / GraphQL API

  • App Bridge for iframe communication

  • Session handling + OAuth


Part 3 — Project Setup

Install Shopify CLI


npm install -g @shopify/cli @shopify/app

Create a new app


shopify app create node

Choose:

  • Node

  • App name

  • Store URL for installation

This automatically generates a working Shopify app with authentication and folder structure.


Part 4 — Folder Structure Explained

Your app will look like this:


/web /routes /middleware server.js shopify.js /frontend /components /pages App.jsx shopify.app.toml
  • web/ = Node backend

  • frontend/ = React UI using Vite

  • shopify.app.toml = app configuration

  • shopify.js = handles sessions + API interaction


Part 5 — Creating Your First API Route

Example: Fetch products using the Admin GraphQL API.

Create route: web/routes/products.js


import { Router } from "express"; const router = Router(); router.get("/products", async (req, res) => { const { admin } = req.shopify; const response = await admin.graphql( `#graphql { products(first: 10) { edges { node { id title variants(first: 1) { edges { node { price } } } } } } } ` ); const json = await response.json(); res.send(json); }); export default router;

Add this route to server.js:


import productRoutes from "./routes/products.js"; app.use("/api", productRoutes);

Now visit:


https://your-app-url/api/products

Part 6 — Adding a Frontend Page (React + Polaris)

Example: Display products inside the Admin.

Create: frontend/pages/Products.jsx


import { useEffect, useState } from "react"; import { Page, Card, Text } from "@shopify/polaris"; export default function Products() { const [products, setProducts] = useState([]); useEffect(() => { async function getData() { const res = await fetch("/api/products"); const data = await res.json(); setProducts(data.data.products.edges); } getData(); }, []); return ( <Page title="Product List"> {products.map((item) => ( <Card key={item.node.id}> <Text variant="headingMd">{item.node.title}</Text> <Text>Price: {item.node.variants.edges[0].node.price}</Text> </Card> ))} </Page> ); }

Add route in App.jsx:


import Products from "./pages/Products"; <Route path="/products" element={<Products />} />

Part 7 — Using App Bridge for Navigation

Shopify App Bridge allows your app to:

  • Access Shopify admin styling

  • Use authenticated requests

  • Open modals, navigation, redirects

Example:


import { useNavigate } from "@shopify/app-bridge-react"; const navigate = useNavigate(); navigate("/products");

Part 8 — Handling Billing (Paid Apps)

If you want to charge users, enable billing in shopify.app.toml:


[app] billing = { chargeName = "Pro Plan", amount = 10.0, currencyCode = "USD", interval = "EVERY_30_DAYS" }

Shopify will automatically redirect merchants to approve the subscription.


Part 9 — Deploying Your Shopify App

1. Deploy Backend on Railway / Render / Fly.io / AWS

Example using Railway:


railway up

2. Deploy Frontend on Vercel / Netlify

Build frontend:


cd frontend npm run build

Upload the build folder to Vercel.

3. Add Production URL to Shopify Partner Dashboard

Make sure:

  • App URL points to your backend server

  • Redirect URLs are correct

  • Vercel URL is whitelisted in Allowed Redirection URLs


Part 10 — App Store Submission Checklist

  • Write clean description

  • Add screenshots

  • Provide doc link

  • Setup billing

  • Enable mandatory features (GDPR webhooks)


Final Thoughts

Shopify app development in 2025 is easier and faster thanks to Shopify CLI, Polaris, App Bridge, and improved APIs. Whether you're building a custom project or planning to launch a public app, the opportunities are huge. Start with simple features, learn how the Admin API works, and gradually upgrade your app with billing or advanced automation.

Share:

Join the Discussion

2 Comments

J

Jane Doe

This was such a helpful article, thank you for sharing!

J

John Smith

Great insights on headless Shopify. I'm planning to use Next.js for my next project.