- The only unscoped public package is
addon-pay. - Every other public package must use the
@addon-pay/*scope. - The Nx project name of every published package must exactly match its
package.jsonname so release tags and GitHub Release titles remain user-facing package names. addon-payis the single installable facade and the Addon Bone-first developer experience. It owns the publicaddonPayfacade, its configuration-plugin entry point, and convenience subpath exports such asaddon-pay/react.- The
addon-payfacade may compose and re-export scoped packages, but must not own their low-level implementation. Browser, mobile, DOM, framework, API-transport, and messaging implementations belong in scoped packages. - The default Addon Bone flow imports its configuration plugin from
addon-pay/pluginand configures it once withplugins: [addonPay("addon-id")]. Afterwards all extension contexts use the runtime facade throughimport addonPay from "addon-pay"; the plugin/service runtime supplies the messaging bridge. - Scoped packages implement the actual capabilities: the platform-neutral runtime SDK, UI adapters, platform transports, and the server-only
@addon-pay/clientcontrol-plane API. They may depend on one another, whileaddon-paycomposes the supported default experience. @addon-pay/sdkis the server-facing runtime SDK. It owns AddonPay API access, entitlements, offerings, paywall data, and checkout actions; UI packages must not duplicate those models or business rules.- Framework UI integrations are separate scoped packages and are exposed through the facade only as convenience subpaths. Do not create a public headless paywall package unless it later gains an independent, non-duplicative responsibility.
- A non-Addon Bone extension needs an explicit platform transport/configuration. Its scoped package is named
@addon-pay/extension; the facade may offer an ergonomic configuration path for it. - Build-tool plugins, such as Vite or Rspack integrations, are separate scoped packages only when they provide a useful standalone integration.
@addon-pay/clientis the server-only control-plane API client. Never expose its privileged credentials or operations through the extension-facing facade.- Use Conventional Commits. Nx Release owns version changes, tags, changelogs, GitHub Releases, and publishing.
- After bootstrap, do not manually edit package versions, create release tags, or run
npm publish/pnpm publish. - Keep each package's
repository.urlandrepository.directoryaccurate so npm provenance links back to this repository.