Brainerce Docs

Headless commerce backend for vibe-coded storefronts. Ship a real store in 5 minutes.

Brainerce is a headless, API-first commerce platform. You bring the storefront, and we handle products, carts, checkout, payments, orders, customers, inventory, discounts, and apps. Everything you can do in the dashboard, you can do over the API.

Quickstart

Spin up a full storefront against a live Brainerce store:

npm create brainerce-store@latest

That scaffolds a Next.js storefront wired to your store, with checkout, cart, accounts, and payments working out of the box.

Want to integrate from an existing app instead?

npm install brainerce
import { BrainerceClient } from 'brainerce';

const client = new BrainerceClient({ salesChannelId: 'vc_YOUR_SALES_CHANNEL_ID' });
const { data, meta } = await client.getProducts({ page: 1, limit: 20 });

The exported class is BrainerceClient, and every call is a flat method on it (getProducts(), addToCart(), createCheckout()). There are no client.products.* sub-namespaces. Paginated reads return { data, meta: { page, limit, total, totalPages } }, and every price is a string, so parseFloat() before any math.

Your sales channel ID (vc_…) is in the dashboard under Sales Channels. The other two credentials, a public storeId or a server-side apiKey, are in Authentication.

Two different SDKs

brainerce is the storefront SDK, the one above. Every method it exposes is in the Storefront SDK Reference; the guided version is the Integration Guide. @brainerce/app-sdk is a separate package for building marketplace apps (connectors, payment and shipping providers), and that is what App SDK Reference covers.

Explore

API-first by design

Every dashboard action is an API call. SDKs in TypeScript today, more on the way. Built-in MCP server lets AI tools (Cursor, Claude Code, Lovable) query your store and write integration code directly.

AI-friendly docs

Building a storefront with a coding agent? Point it at /skill.md, a cold-start entry that routes to the right skill for the job. For general doc discovery, point it at our llms.txt or install our MCP server with npx @brainerce/mcp-server. Every guide on this site is then one fetch away.

Get help

  • Read the Critical Rules before building, because they prevent the top integration mistakes.
  • Hit an error? Check the Error Catalog for any code you see.
  • Stuck? Email [email protected] with your request ID from the X-Request-Id response header.