Install
The command also installs updated-at, memberships, permissions, organizations, seeds, the modules it needs.
npx better-supabase add entitlementsConfigure
The blocks entries in your config, with the default mode.
import { defineConfig } from "better-supabase/config";
export default defineConfig({
blocks: {
// Required by entitlements; add installs them too.
"updated-at": {},
memberships: {},
permissions: {},
organizations: {},
seeds: {},
// Modes: "managed". The default is "managed".
entitlements: { mode: "managed" },
},
});Migrations
The files
npx better-supabase add entitlements writes into your declarative schema with the default layout.Client
Events
With the outbox installed, the module writes these in the same transaction as the change.
This module writes no outbox events.
Dependencies
Recipes
More in Billing & commerce
- Usage metering and quotasusageUsage counters per tenant, meter and day with idempotent increments, quotas per tenant or plan, within_quota() for policies and consume_quota(), which raises quota_exceeded. unreported_usage() feeds reportUsageToStripe.React hooks
- Stripe billingbillingEach tenant's Stripe customer, seat counts (options.seatRoles) and the active subscription item from the Stripe Sync Engine, for createBilling(): checkout, the customer portal, seat sync and Stripe webhook handling.React hooks
- CatalogcatalogProducts with options, variants and prices in minor units, price lists, a category tree, collections, sales channels, translations per locale, product media and an optional public storefront.
- InventoryinventoryStock per catalog variant and location in a unit with decimals: movements posted to the ledger block, lots, serial numbers, expiry, bins, weighted average cost, reservations with expiry, allocations with backorders, transfers, purchase requisitions with approval, and purchase orders with partial receiving into goods receipts.
- OrdersordersCarts on anonymous or signed-in users, checkout priced from the catalog, confirmed orders from lines or an accepted quote with stock allocations, gapless order and invoice numbers, payments, fulfillments, returns and refunds, with an optional kitchen display. With invoices, a paid order gets an issued, paid invoice.
- PromotionspromotionsPercentage, fixed and free-shipping promotions, automatic or by code, with usage limits and stacking rules, priced into orders carts.