A metered AI product starts with a working SaaS.
Identity, workspaces, subscriptions and credits share a server-owned boundary. Build your application above it.
Your product
Brand, interface, business logic
The execution layer
Runs, approvals, durable actions
The SaaS foundation
Workspaces, subscriptions, credits
Give every customer a place to work.
Better Auth database sessions and email/password authentication connect to personal and team workspaces. Current persisted membership and roles authorize operations; switching workspaces is navigation, not permission.
Transactional workspace creation · owner invariants · verified invitations
Make paid access come from paid state.
Stripe workspace subscriptions reconcile signed webhooks against authoritative provider state. A browser checkout return does not grant access. Durable checkout intent and idempotent allowances protect the application boundary.
Monthly/annual flat-rate plans · credit allowances · live checkout closed
Account for every unit.
Integer credit lots, immutable ledger entries, reservations and settlement bound agent spending. Usage measurement stays separate from billing, and provider dollars stay separate from application credits.
Idempotent grants · concurrent spending checks · operator adjustments
Keep operations out of user responses.
Transactional email uses an encrypted outbox and Resend. Persisted platform-admin grants gate operational views and credit adjustments. Production needs your recovery schedule, backups and monitoring.
Encrypted outbox · fenced recovery · persisted admin authority
Build on a foundation you own.
$149 USD once. One developer seat. Unlimited owned and client projects. Prelaunch.
FoundryLayer