Your backend.
Not ours.
One command drops a complete ecommerce backend into your Supabase project. Schemas, edge functions, RLS policies, Postgres RPCs, and a typed query client. Every file lands in your repo and becomes yours.
The same idea as shadcn/ui — but for your backend instead of your UI. No black box. No vendor lock-in. No abstraction sitting between you and your database. Delete @supacommerce/client and nothing breaks except your convenience wrappers.
What you get
14 Drizzle schemas
Products, variants, cart, orders, inventory, pricing, promotions, tax, fulfillment, payments, sales channels, and admin. Fully typed.
7 edge functions
Checkout, order confirmation, payment webhooks, admin invitations, and storage. Clear TODO markers where your payment provider goes.
RLS policies
Products are publicly readable. Carts and orders are own-data-only. Admin tables are role-gated. Fully idempotent.
Postgres RPCs
Checkout, order confirmation, and inventory reservation run as atomic Postgres transactions. Partial failures are impossible.
Typed query client
commerce.cart.addItem(), commerce.catalog.listProducts(). Ecommerce methods that speak your domain instead of raw SQL.
You own everything
Every file lands in your repo. Read it. Modify it. Delete what you don't need. No abstraction to fight.
How it works
Run the CLI
Copies all schemas, edge functions, SQL files, and config into your project.
npx @supacommerce/cli initGenerate and apply migrations
The schemas are plain Drizzle ORM TypeScript files. Generate SQL and push to your Supabase project.
pnpm drizzle:generate && supabase db pushApply RLS and Postgres functions
Paste rls.sql and functions.sql into the Supabase SQL Editor. These are not applied by db push.
Use the query client
Install @supacommerce/client and start building your storefront.
pnpm add @supacommerce/clientPackages
@supacommerce/cliThe init command. Copies schemas, edge functions, SQL files, and config into your project. Detects your package manager automatically.
@supacommerce/clientTyped ecommerce query client. commerce.cart.addItem(), commerce.catalog.listProducts(), commerce.orders.list() — and more.
@supacommerce/utilsShared utilities. Currency helpers, typed error classes, Result<T>, pagination, ID generation, and date helpers.