I kept rebuilding the same thing in every SaaS: tracking usage, enforcing limits, gating features by plan.
Better Auth handles auth/orgs well, but not this layer. So I made a plugin for it.
The basic idea is for you to define features (api calls, credits, seats, clicks, anything really) set limits per plan and some functionality if you're sharing quotas with other accounts, track usage, and block when limits are hit (or surcharge, up to you)
So instead of scattering checks across your app, it lives in one place.
It's in early development so any takes are welcome. Would appreciate feedback! (PS, there's a demo in the repo, you can use it, it's not the fastest because I didn't set it up right though, not using the ws you'd get in local)
eggermarc•1h ago
The basic idea is for you to define features (api calls, credits, seats, clicks, anything really) set limits per plan and some functionality if you're sharing quotas with other accounts, track usage, and block when limits are hit (or surcharge, up to you)
So instead of scattering checks across your app, it lives in one place.
It's in early development so any takes are welcome. Would appreciate feedback! (PS, there's a demo in the repo, you can use it, it's not the fastest because I didn't set it up right though, not using the ws you'd get in local)