This SaaS app has three plans with varying prices and features, including API and browser checks that are volume limited, team members feature that is either enabled or not, and CI/CD trigger feature that is either enabled or not. The app also handles trial users differently, providing them with a trial version of the public dashboard only after they become paying customers. To enforce and keep track of these features and limits, the app categorizes them into four types: trial vs. non-trial, paying vs. lapsing, plan-based feature toggles, and plan-based volume limits. The app uses a data model to store account information and checks for user access rights using a function called `hasAccess`. It also checks for features using another function called `hasFeature`, which returns true if the feature is enabled in the account's set of string constants. The app asserts plan-based volume limits by polling its database and counting specific resources on each request, returning whether the new total amount fits into the plan limit. To be nice about it on the front end, especially in an SPA type setup, the app uses a combination of client-side and server-side logic to check for plan limits before allowing users to create new things.