A subscription check often starts as a small condition in a service method. Then you add another plan, a monthly allowance, an exception for one customer, and a second application that needs the same rules.
That is the problem we’re working on with Pmitz , short for Plans and Limits. I’m part of the team behind it. It’s an Apache 2.0 project for managing subscription feature access, usage limits, and usage recording.
The aim is to make what a plan includes easier to manage as your product grows. Any application that can call an HTTP API can integrate with the remote service.
Two questions before allowing an action
Imagine a document application with an export feature. A customer’s plan includes 100 exports per month.
Before allowing an export, your application needs to answer two questions:
Does this subscription include exports?
Is there enough allowance left for this export?
Those are separate decisions. A customer can have access to a feature and still have used up their allowance.…