@vardenus/entitlements
v0.2.0
Published
Shared plan/feature/limit matrix for Vardenus — mirrors src/constants/featureMatrix.js and lambda/dashboard/feature-matrix.js in the main repo.
Maintainers
Readme
@vardenus/entitlements
TypeScript mirror of the production Vardenus feature matrix. Pure logic + types — no runtime dependencies, no React.
Sources of truth:
umitkavak/redditus:src/constants/featureMatrix.js(frontend)umitkavak/redditus:lambda/dashboard/feature-matrix.js(backend)
This package re-exports the same constants and the same can(user, key) decision logic, so any of the eight Vardenus repos can:
import { can, upsellFor, landlordFeePct } from '@vardenus/entitlements';
if (can(user, 'ai_listing_description')) {
/* show the AI panel */
} else {
const upgrade = upsellFor(user, 'ai_listing_description');
/* render "Upgrade to ${upgrade.meta.name}" */
}Plans, prices, features
- 10 plans across 3 tracks:
consumer,agent,contractor. - 21 features keyed by snake_case constants. Each feature declares which plan unlocks it on which track.
- Prices in
PLAN_META[plan].monthly/.annualas cents. - Landlord-side rental fee in
LANDLORD_FEE_PCT[plan]as integer percent.
Update protocol (read this before changing plans)
The matrix lives in three places. They MUST stay aligned:
umitkavak/redditus:src/constants/featureMatrix.js(frontend)umitkavak/redditus:lambda/dashboard/feature-matrix.js(backend)@vardenus/entitlements/src/matrix.ts(this package)
Mismatch silently grants/denies access. There is no automated parity test yet — change carefully.
Install
npm install @vardenus/entitlementsBuild
npm install
npm run build