← ALL POSTS
22 NOVEMBER 2025

Superprompt: Create Shopify App

Use with: Claude Code, Cursor

TASK: Build Shopify App that integrates with AIVA Platform

CONTEXT:
Creating a Shopify App that merchants can install from the Shopify App Store.
The app embeds AIVA analytics and tools directly in the Shopify admin.

APP REQUIREMENTS:

- **Shopify App Setup**

   - Embedded app using Shopify App Bridge
   - OAuth authentication flow
   - Webhook subscriptions (orders/create, customers/create)
   - App proxy for customer-facing features

- **Admin Dashboard (Embedded)**

   - Overview: Revenue, MRR, Customers, RFM segments
   - Customer segmentation view
   - At-risk customer alerts
   - Prize draw management
   - Affiliate program dashboard

- **Backend API**

   - Node.js + Express
   - Store Shopify access tokens securely
   - Proxy requests to AIVA API
   - Handle webhooks from Shopify
   - Sync data to AIVA Platform

- **Database**

   - PostgreSQL
   - Store: shop domains, access tokens, AIVA API keys
   - Track: installations, usage metrics

TECH STACK:

- Frontend: React + Shopify Polaris

- Backend: Node.js + Express + TypeScript

- Database: PostgreSQL with Prisma ORM

- Hosting: Vercel (frontend) + Railway (backend)

- Auth: Shopify OAuth 2.0

SHOPIFY WEBHOOKS TO HANDLE:

- orders/create → Sync to AIVA, check for affiliate codes

- customers/create → Add to AIVA customer database

- app/uninstalled → Clean up data

AIVA API INTEGRATION:

- Store AIVA API key per merchant

- Sync customers to AIVA on install

- Sync subscriptions daily

- Track affiliate sales via discount codes

FOLDER STRUCTURE:
/frontend
  /app               # Shopify embedded app pages
  /components        # Polaris components
/backend
  /routes            # API routes
  /services          # Business logic
  /webhooks          # Shopify webhook handlers
  /lib               # AIVA API client
  /prisma            # Database schema
  /middleware        # Auth, validation

DELIVERABLES:

- Complete Shopify App (frontend + backend)

- OAuth flow implementation

- Webhook handlers

- AIVA API integration

- Database schema and migrations

- Deployment instructions

- App listing content (description, screenshots)

SHOPIFY APP SUBMISSION REQUIREMENTS:

- Privacy policy page

- Support email

- App installation flow

- Error handling

- Rate limit handling

- GDPR compliance (data deletion)

START BUILDING NOW.
Create the complete Shopify App ready for submission to Shopify App Store.
`"

**Expected Result:** A production-ready Shopify App with full AIVA integration. - 
Want this working on your store? Aiva does the sales, marketing and service work - in your voice, around the clock.
Get Aiva