Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prooflane

Prooflane is an embedded Shopify app for dropshippers who want to prevent item not received chargebacks before they happen.

It does one job:

  • sync recent Shopify orders
  • store fulfillment and tracking snapshots locally
  • score which orders look risky
  • open intervention cases with a recommended next action
  • let an operator log what they did next

MVP scope

Prooflane intentionally stays small:

  • Shopify OAuth and embedded app shell
  • initial Shopify order bootstrap on install / first app load
  • webhook-assisted order and fulfillment refresh from the Shopify Admin GraphQL API
  • manual backfill for repair and reconciliation
  • local order, case, action, and timeline-event storage with Prisma
  • two configurable thresholds:
    • risk age threshold
    • stale tracking threshold
  • one dashboard page with:
    • summary cards
    • monitoring status
    • order risk table
    • intervention case queues
    • action logging, snooze, and dismiss controls

It does not include:

  • automatic refunds
  • automatic reships
  • background jobs
  • external carrier APIs
  • machine learning

Current risk logic

The MVP opens intervention cases when:

  • an order is still unresolved and older than the configured threshold
  • a fulfillment exists but no tracking number is present
  • tracking has gone stale beyond the configured stale-tracking window
  • the estimated delivery window has already passed

The app recommends one of these next steps:

  • monitor
  • message_customer
  • manual_review
  • refund_review

Stack

  • React Router embedded Shopify app
  • TypeScript
  • Shopify Admin GraphQL API
  • Shopify App Bridge / App Provider
  • Polaris App Home web components
  • Prisma
  • SQLite by default

Requirements

  • Node 22.12+ recommended
  • npm
  • Shopify CLI
  • a Shopify Partner account
  • a Shopify development store

Environment variables

Set these locally:

  • SHOPIFY_API_KEY
  • SHOPIFY_API_SECRET
  • SHOPIFY_SCOPES
  • DATABASE_URL

Common local values:

SHOPIFY_SCOPES=read_orders
DATABASE_URL="file:./dev.sqlite"

For SQLite, Prisma resolves the path relative to prisma/schema.prisma, so the local database file lives at prisma/dev.sqlite.

During local Shopify development, the Shopify CLI may also inject:

  • SHOPIFY_APP_URL
  • SCOPES

The app should prefer SHOPIFY_SCOPES and fall back to SCOPES.

Local setup

  1. Link the repo to your own Shopify app config if you cloned the public repo:
npm run config:link

If you already have multiple linked app configs locally, you can switch between them with:

npm run config:use
  1. Generate the Prisma client and apply migrations:
npm run setup
  1. Start local development:
npm run dev
  1. Install the app into your Shopify dev store through the Shopify CLI flow.

Shopify dev-store behavior

The committed shopify.app.toml intentionally uses public-safe placeholders for the Shopify app client_id, the application_url, and any dev-store binding.

During npm run dev, Shopify CLI runs shopify app dev, opens a tunnel, and replaces the app URL and redirect URLs for the selected dev store because automatically_update_urls_on_dev = true.

If the dev store still opens the Example Domain page, then one of these is true:

  • npm run dev is not currently running
  • the dev preview is stale or linked to the wrong store
  • the app was opened from the store without an active local preview

To recover the local preview:

shopify app dev --reset

Then select the correct app and dev store, let Shopify CLI create a fresh preview URL, and press p in the terminal to open that preview.

Using Prooflane

  1. Open the embedded app.
  2. Let the initial bootstrap finish on first load. This seeds the first local order snapshot automatically.
  3. Review:
    • total synced orders
    • at-risk orders
    • open intervention cases
  4. Let Shopify webhooks keep orders fresh as new order and fulfillment updates arrive.
  5. Use Backfill recent orders only when you want to repair or reconcile the last 14 days of Shopify data manually.
  6. Open the intervention inbox and log what you did:
    • customer update sent
    • reviewed
    • refund reviewed
    • snooze 24h
    • dismiss

Project structure

app/
  db.server.ts
  shopify.server.ts
  features/
    fulfillment-risk.server.ts
    fulfillment-risk-webhooks.server.ts
    fulfillment-risk-ui.tsx
  routes/
    app._index.tsx
    app.tsx
    webhooks.orders.create.tsx
    webhooks.orders.updated.tsx
    webhooks.fulfillments.create.tsx
    webhooks.fulfillments.update.tsx
prisma/
  schema.prisma
  migrations/

Scripts

  • npm run dev — start Shopify local development
  • npm run build — build the app
  • npm run typecheck — run React Router typegen and TypeScript checks
  • npm run setup — generate Prisma client and apply migrations

Notes

  • This version is a webhook-assisted operator tool with manual backfill as a repair path.
  • Fulfillment and tracking data come from Shopify order snapshots.
  • SQLite is fine for local MVP work. Hosted deployment would need a production database and a background sync strategy.

About

Embedded Shopify app that scores orders for 'item not received' chargeback risk and opens intervention cases

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages