Set Up a Headless Storefront for Under $50/Month

by Emma Rodriguez
Set Up a Headless Storefront for Under $50/Month

You've probably heard the word "headless" thrown around in e-commerce circles and assumed it was something only Walmart-sized companies could afford. A dedicated frontend team, a six-figure platform contract, a DevOps engineer on retainer — that's the picture most people have.

Here's the thing: that picture is about three years out of date.

Right now, a solo operator or a two-person shop can wire together a genuinely headless storefront — fast page loads, full design control, no theme limitations — for somewhere between $30 and $50 a month. I know because I've done it twice, and I've helped a handful of readers do the same. This tutorial walks you through exactly how.

What "Headless" Actually Means (Plain English Version)

A traditional e-commerce setup bundles everything together: the product database, the checkout logic, and the thing customers actually see (the storefront) all live inside one platform. Change the design? You're working within whatever the platform allows. Want a custom layout for a product page? Hope the theme supports it.

Headless just means you split those two jobs apart. Your backend (inventory, orders, checkout, payments) lives in one place. Your frontend (every page the customer sees) lives somewhere else — a framework you control completely. The two talk to each other through an API.

The practical result: your site can load in under a second, look exactly how you want, and pull product data from wherever makes sense — all without fighting a theme editor.

Why This Setup Makes Sense for Small Stores Right Now

Three things have changed that make headless accessible at the SMB level.

1. Managed API backends got cheap. Platforms like Medusa.js (open-source, self-hostable) and Swell let you run a full commerce backend for free or near-free at small volume. Even Shopify's Storefront API is included in the basic $39/month plan — you're just not forced to use their frontend.

2. Frontend hosting is practically free. Vercel and Netlify both have generous free tiers. A store doing under 100k monthly page views will likely never pay more than $20/month for hosting a Next.js or Astro frontend.

3. No-code CMS options closed the content gap. One real headache with early headless setups was updating content — you needed a developer to change a banner. Tools like Sanity (free up to 10 users) and Contentful's free tier plug into your frontend and give you a visual editor for copy, images, and landing pages.

Add those up: $39 backend + $0–$20 frontend hosting + $0 CMS at small scale = $39–$59/month total, with room to optimize down.

The Stack I'd Recommend Starting With

There's no single right answer here, but if you asked me to pick one beginner-friendly combination today, I'd say:

  • Backend: Shopify Basic ($39/month) — familiar checkout, reliable payments, Storefront API included
  • Frontend framework: Next.js (free, open-source) — huge community, great docs, React-based
  • Hosting: Vercel free tier — deploys from GitHub in about 90 seconds
  • CMS: Sanity free tier — visual editing, real-time previews, generous limits

Total monthly cost: $39. That's it, unless you scale past Vercel's free bandwidth cap (100 GB/month — most small stores never touch it).

If you'd rather skip Shopify entirely, swap the backend for Medusa.js deployed on Railway's $5/month hobby plan. You lose the Shopify ecosystem but gain full open-source control and drop to about $5–$10/month total.

Step-by-Step: Getting Your First Headless Page Live

Let's make this concrete. Here's how to go from zero to a working product page in an afternoon — no DevOps background required.

Step 1: Enable the Storefront API on your Shopify store. In your Shopify admin, go to Settings → Apps and sales channels → Develop apps. Create a new app, then under API credentials, enable the Storefront API and check the scopes you need: unauthenticated_read_product_listings and unauthenticated_read_checkouts cover most use cases. Copy your Storefront API access token — you'll need it in a minute.

Step 2: Scaffold a Next.js project. Open your terminal and run:

npx create-next-app@latest my-storefront

Choose the App Router option when prompted. This gives you a working Next.js app in about two minutes.

Step 3: Fetch your products from Shopify. Inside your project, create a file called lib/shopify.js. Paste in a simple fetch function that hits the Storefront API's GraphQL endpoint:

const SHOPIFY_DOMAIN = process.env.SHOPIFY_DOMAIN;
const SHOPIFY_TOKEN = process.env.SHOPIFY_STOREFRONT_TOKEN;

export async function getProducts() {
  const res = await fetch(
    `https://${SHOPIFY_DOMAIN}/api/2024-01/graphql.json`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'X-Shopify-Storefront-Access-Token': SHOPIFY_TOKEN,
      },
      body: JSON.stringify({
        query: `{
          products(first: 12) {
            edges {
              node {
                id title handle
                priceRange { minVariantPrice { amount currencyCode } }
                images(first: 1) { edges { node { url altText } } }
              }
            }
          }
        }`,
      }),
    }
  );
  const { data } = await res.json();
  return data.products.edges.map((e) => e.node);
}

Add your Shopify domain and token to a .env.local file (never commit this to GitHub).

Step 4: Build a product grid page. In app/page.js, import getProducts and render a simple grid. Nothing fancy — even an unstyled list proves the connection works. Once you see your real product titles and prices pulling through, you'll know the hard part is done.

Step 5: Deploy to Vercel. Push your project to a GitHub repo, then go to vercel.com, click Add New Project, and import the repo. Add your environment variables in the Vercel dashboard (same .env.local values). Hit deploy. Vercel builds and publishes your site — usually under two minutes.

You now have a live headless storefront. Seriously. That's the whole thing.

A Real Example: How a Candle Shop Cut Load Time by 61%

A reader who runs a small candle brand — about 40 SKUs, $18k/month in revenue — was frustrated that her Shopify theme loaded in 4.2 seconds on mobile. She'd bought a premium theme ($350 one-time) and it was still sluggish because of all the theme app extensions and tracking scripts bundled in.

She migrated her frontend to Next.js over a weekend, kept her Shopify backend untouched, and deployed on Vercel. Her new mobile load time: 1.6 seconds. That's a 61% improvement without touching a single product listing or changing her payment setup.

Her conversion rate went from 2.1% to 2.8% in the first month after launch — which, at her volume, was roughly $1,200 in additional monthly revenue. Her stack cost went up by exactly $0 because she was already on Shopify Basic.

Is every store going to see those exact numbers? No. But slow sites lose sales — Google's own data puts the abandonment rate increase at roughly 32% when page load goes from 1 second to 3 seconds. If your store is in that 3–5 second range, a headless frontend is one of the highest-ROI moves you can make.

Three Things to Do Before You Start Building

Before you open a terminal, spend 20 minutes on these — they'll save you hours of backtracking.

1. Audit your current load time. Run your store through PageSpeed Insights (free, from Google). Screenshot your mobile score. This is your baseline. If you're above 2.5 seconds on mobile, headless is almost certainly worth the effort. If you're at 1.2 seconds already, you might get more mileage fixing images or scripts first.

2. List the customizations that matter most to you. What does your current theme not let you do? Custom product page layouts? A unique homepage section? A specific checkout flow? Write these down. They become your build checklist — and they'll tell you how much frontend work you're actually signing up for.

3. Decide on your content editing story. Who updates your site copy and banners? If it's just you and you're comfortable with code, you can skip a CMS entirely and hardcode content. If you have a team member who needs a visual editor, set up Sanity or Contentful before you build anything else. Retrofitting a CMS later is annoying.

You Can Do This — Here's Your Next Step

Headless commerce sounds intimidating, but once you see your own product data rendering in a Next.js page you built yourself, it clicks fast. The concepts aren't that different from anything else in e-commerce — you're just moving the frontend out of a box you don't fully control and into one you do.

You don't need to rebuild your entire store this weekend. Start smaller: get the scaffold running locally, pull in your products, and deploy a single page to Vercel. That proof-of-concept takes an afternoon and costs nothing. Once you've seen it work, you'll have a much clearer sense of whether a full migration makes sense for your store.

If you get stuck on the GraphQL query or the Vercel environment variables, drop a comment below — I check them and I'm happy to help debug. You've got this.