feat: implement free/pro plan system with monitor and interval limits

This commit is contained in:
2026-03-18 22:40:45 +04:00
parent 11e6c593ad
commit c89b63bd97
11 changed files with 119 additions and 26 deletions
+25
View File
@@ -0,0 +1,25 @@
export type Plan = "free" | "pro" | "lifetime";
export interface PlanLimits {
maxMonitors: number;
minIntervalS: number;
}
const PLANS: Record<Plan, PlanLimits> = {
free: {
maxMonitors: 5,
minIntervalS: 30,
},
pro: {
maxMonitors: 500,
minIntervalS: 2,
},
lifetime: {
maxMonitors: 500,
minIntervalS: 2,
},
};
export function getPlanLimits(plan: string): PlanLimits {
return PLANS[plan as Plan] || PLANS.free;
}