DEV Community

Marcus Wright
Marcus Wright

Posted on

🚀 Building a Shopify App Backend in a Weekend with Gadget

I’m a backend dev in Chicago who lives for clean data flows and skipping boilerplate. I recently built a small Shopify app prototype using Gadget, and I honestly haven’t moved this fast on a side project in months.

This post walks through how I got from zero to a working backend in a single weekend, without fighting auth, database setup, or a million YAML configs.

🛠️ The Idea
I’ve been tinkering with Shopify APIs lately. I wanted to build a small app that monitors certain store metrics and alerts merchants when thresholds are hit, kind of like a lightweight store health monitor.

This meant I needed:

  • Auth with Shopify
  • A place to store store-specific data
  • Background jobs for polling or checking thresholds
  • A REST API for a lightweight frontend

đź§± Setting Up in Gadget
I signed up for Gadget and chose the “Shopify App” template. In under 2 minutes, I had a project scaffolded with:

  • Shopify OAuth
  • A PostgreSQL DB
  • File storage
  • Prewired API routes
  • Background job support

Modeling Store Data
I needed a StoreMetrics model that tracks key values over time. Gadget’s data modeling UI is clean and lets you drop into code when needed.

Fields I added:

  • store (relationship to built-in Shopify Shop model)
  • metricName (string)
  • value (number)
  • timestamp (datetime)

Exposing the API
I exposed a GET endpoint at /api/metrics that returns recent metrics for the current store. Gadget auto-authenticates requests and gives you access to the session context (including which store is making the call). No need to build that from scratch.

đź’ˇ Takeaways
As a backend dev, I’m used to spinning up my own stack: Express, Postgres, Redis, SQS, etc. That’s fine for client work, but for side projects? I just want to build the thing.

Gadget let me:

  • Skip 80% of the setup
  • Stay in TypeScript the whole way
  • Focus on logic instead of scaffolding
  • Actually ship something useful

If you’re a backend dev who likes building fast (without giving up control), Gadget is 100% worth checking out.

đź”— Try it yourself: https://gadget.dev
💬 Hit me up on Twitter/X (@marcus_wright3) if you’re building something similar or just want to rant about bad API docs.

Top comments (0)