agentsclimarketplace

Shopify reference architecture

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/shopify-pack/skills/shopify-reference-architecture

425 plugins, 2,810 skills, 200 agents for Claude Code. Open-source marketplace at tonsofskills.com with the ccpi CLI package manager.

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill shopify-reference-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

'Implement Shopify app reference architecture with Remix, Prisma session storage,

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.7 KB, as published. Nobody here has run it

Shopify Reference Architecture

Overview

Production-ready architecture based on Shopify's official Remix app template. Covers project structure, session storage with Prisma, extension architecture, and the recommended app patterns.

Prerequisites

  • Understanding of Remix framework basics
  • Shopify CLI 3.x installed
  • Familiarity with Prisma ORM

Instructions

Step 1: Official Project Structure (Remix Template)

my-shopify-app/
├── app/
│   ├── routes/
│   │   ├── app._index.tsx          # Main app dashboard
│   │   ├── app.products.tsx        # Product management page
│   │   ├── app.settings.tsx        # App settings
│   │   ├── auth.$.tsx              # OAuth catch-all route
│   │   ├── auth.login/
│   │   │   └── route.tsx           # Login page
│   │   └── webhooks.tsx            # Webhook handler
│   ├── shopify.server.ts           # Shopify API config (singleton)
│   ├── db.server.ts                # Database connection
│   └── root.tsx
├── extensions/
│   ├── theme-app-extension/        # Theme blocks for Online Store
│   ├── checkout-ui/                # Checkout UI extension
│   └── product-discount/           # Shopify Function
├── prisma/
│   ├── schema.prisma               # Database schema
│   └── migrations/
├── shopify.app.toml                # App configuration
├── shopify.web.toml                # Web process config
├── remix.config.js
└── package.json

Step 2: Core App Configuration

The shopify.server.ts singleton configures the API client, session storage, webhooks, and auth hooks. It uses LATEST_API_VERSION from @shopify/shopify-api and exports all auth/session helpers.

See Core App Configuration for the complete implementation.

Step 3: Session Storage with Prisma

The Prisma schema defines the required Session model (matching Shopify's session fields) plus your app's custom models. Use SQLite for dev and PostgreSQL for production.

See Prisma Session Storage for the complete schema.

Step 4: Route Pattern — Authenticated Admin Page

Each app route calls authenticate.admin(request) to get a pre-authenticated GraphQL client, then renders with Polaris components. Data flows through Remix loaders.

See Authenticated Admin Route for the complete implementation.

Step 5: Theme App Extension

Theme app extensions add customizable blocks to the Online Store. Each block defines a Liquid template with a {% schema %} JSON block for merchant-facing settings.

See Theme App Extension for the complete implementation.

Output

  • Remix app with Shopify authentication
  • Prisma session storage (production-ready)
  • Authenticated admin routes with GraphQL data loading
  • Theme app extension for Online Store customization

Error Handling

IssueCauseSolution
Session not foundDB not migratedRun npx prisma migrate dev
Auth redirect loopMissing APP_UNINSTALLED handlerImplement webhook to clean sessions
Extension not showingNot deployedRun shopify app deploy
Polaris styles missingMissing providerWrap app in <AppProvider>

Examples

Quick Scaffold

# Fastest way to start — uses official template
shopify app init --template remix

# Or clone directly
npx degit Shopify/shopify-app-template-remix my-shopify-app
cd my-shopify-app
npm install
shopify app dev

Resources

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.