npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ecom-atelier/shopify-buy-box

v0.2.0

Published

Reusable Shopify + Discount Kit buy box for Ecom Atelier landing pages.

Readme

@ecom-atelier/shopify-buy-box

Reusable React Buy Box for Shopify storefronts managed by the Ecom Atelier central Buy Box backend.

The package gets the Shopify storefront connection and the page-specific Buy Box configuration from the central Supabase Edge Function by siteKey + pagePath. Shopify remains the pricing authority. Discount Kit metadata defines available quantity offers, while real prices and checkout URLs come from Shopify Cart API evaluation.

Install

npm install @ecom-atelier/shopify-buy-box

Recommended Lovable setup

Configure the store once at app level:

import {
  BuyBoxProvider,
} from "@ecom-atelier/shopify-buy-box";

import "@ecom-atelier/shopify-buy-box/style.css";

<BuyBoxProvider siteKey="adventure-shop">
  <App />
</BuyBoxProvider>

Then any page can add the Buy Box with:

import {
  BuyBoxSection,
} from "@ecom-atelier/shopify-buy-box";

<BuyBoxSection />

BuyBoxSection automatically uses the current browser pathname, so each page resolves its own central configuration by:

siteKey + pagePath

It also defaults to a full-width landing-page section so common narrow Lovable content wrappers do not squeeze the Buy Box.

For another Shopify storefront, configure that project once with a different registered site key:

<BuyBoxProvider siteKey="ergowohl">
  <App />
</BuyBoxProvider>

The corresponding buy_box_sites row must already exist in the central Supabase project.

Short Lovable prompts

First Buy Box in a new project:

Install and set up @ecom-atelier/shopify-buy-box for this project using site key "adventure-shop". Follow the package's recommended Lovable setup, and add the Buy Box at the main purchase point of this page.

That one-time setup should install the package, import its stylesheet, wrap the app in BuyBoxProvider, and insert BuyBoxSection on the current page.

Additional pages in the same project:

Add the Ecom Atelier Buy Box at the main purchase point of this page.

Direct usage

The lower-level component remains available:

import {
  BuyBox,
} from "@ecom-atelier/shopify-buy-box";

<BuyBox siteKey="adventure-shop" />

Optional section overrides

<BuyBoxSection
  pagePath="/summer-sale"
  productHandle="fallback-product-handle"
  size="large"
  fullBleed={true}
/>

productHandle is only a fallback for pages that do not yet have a saved central configuration.

Central API URL

The Ecom Atelier API URL is built in as the default and is normally inherited from BuyBoxProvider.

Editor

With editorMode="auto", the settings editor is visible in the embedded Lovable editor preview and on localhost, but hidden on normal customer-facing pages.

The editor key is verified and writes are authorized by the central Supabase Edge Function. Never put the editor key or Supabase service-role key into this package.

Architecture

Lovable / React project
        ↓
<BuyBoxProvider siteKey="..." />
        ↓
<BuyBoxSection />
        ↓
Central Supabase Buy Box API
        ↓
buy_box_sites + buy_box_configs
        ↓
Shopify Storefront API
        ↓
Discount Kit metadata + Shopify Cart pricing
        ↓
Shopify checkout