Why @xtandard/entitlements
Every SaaS ends up writing if (user.plan === "pro"), then limits, then usage counters, then trials,
then “can you comp this customer 1 000 extra API calls until Friday?”. The products that solve it —
Stigg, Schematic, Autumn Cloud — are hosted services. The open ones are billing services (Lago,
Flexprice: AGPL; OpenMeter: Go + Kafka + ClickHouse), and the embeddable libraries are each boxed in:
PayKit is Stripe + Postgres + Next.js only, Subscrio is Postgres-only, byo-oss/entitlements is a
better-auth plugin (research).
@xtandard/entitlements is the missing piece: billing-provider-agnostic, storage-pluggable,
framework-agnostic, with a typed catalog, atomic metering, grants and overrides, an admin UI and a
customer portal — and it plugs into @xtandard/flags so rollouts and plan gates share one decision.
Invoicing, tax, dunning and payments stay with your provider (non-goals).