Initial state for GitNexus analysis
This commit is contained in:
97
apps/web/config/billing-plans.config.ts
Normal file
97
apps/web/config/billing-plans.config.ts
Normal file
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* CMS Billing Plans — Stripe product configuration
|
||||
* Phase 12: Three tiers for the SaaS product
|
||||
*/
|
||||
|
||||
export const CMS_BILLING_PLANS = {
|
||||
starter: {
|
||||
name: 'Starter',
|
||||
description: 'Für kleine Vereine und Organisationen',
|
||||
limits: {
|
||||
modules: 1,
|
||||
records: 100,
|
||||
members: 50,
|
||||
storageGb: 1,
|
||||
users: 3,
|
||||
},
|
||||
features: [
|
||||
'Module Builder (1 Modul)',
|
||||
'Mitgliederverwaltung (bis 50)',
|
||||
'Basisfunktionen',
|
||||
'Deutsche Oberfläche',
|
||||
'E-Mail-Support',
|
||||
],
|
||||
pricing: {
|
||||
monthly: { amount: 1900, currency: 'eur' }, // 19,00 €
|
||||
yearly: { amount: 19000, currency: 'eur' }, // 190,00 € (2 Monate gratis)
|
||||
},
|
||||
},
|
||||
|
||||
professional: {
|
||||
name: 'Professional',
|
||||
description: 'Für aktive Vereine und Volkshochschulen',
|
||||
limits: {
|
||||
modules: -1, // unlimited
|
||||
records: -1,
|
||||
members: -1,
|
||||
storageGb: 10,
|
||||
users: 20,
|
||||
},
|
||||
features: [
|
||||
'Unbegrenzte Module',
|
||||
'Unbegrenzte Mitglieder',
|
||||
'Kursverwaltung',
|
||||
'SEPA-Lastschriften',
|
||||
'Newsletter',
|
||||
'Dokumentengenerierung',
|
||||
'Import/Export',
|
||||
'Prioritäts-Support',
|
||||
],
|
||||
pricing: {
|
||||
monthly: { amount: 4900, currency: 'eur' }, // 49,00 €
|
||||
yearly: { amount: 49000, currency: 'eur' }, // 490,00 €
|
||||
},
|
||||
},
|
||||
|
||||
enterprise: {
|
||||
name: 'Enterprise',
|
||||
description: 'Für große Organisationen mit individuellen Anforderungen',
|
||||
limits: {
|
||||
modules: -1,
|
||||
records: -1,
|
||||
members: -1,
|
||||
storageGb: 100,
|
||||
users: -1,
|
||||
},
|
||||
features: [
|
||||
'Alles aus Professional',
|
||||
'White-Label / eigenes Branding',
|
||||
'REST-API Zugang',
|
||||
'Multi-Mandanten-Verwaltung',
|
||||
'Dedizierte Instanz (optional)',
|
||||
'Individuelle Anpassungen',
|
||||
'Persönlicher Ansprechpartner',
|
||||
'SLA-Garantie',
|
||||
],
|
||||
pricing: {
|
||||
monthly: { amount: 14900, currency: 'eur' }, // 149,00 €
|
||||
yearly: { amount: 149000, currency: 'eur' }, // 1.490,00 €
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export type BillingPlanKey = keyof typeof CMS_BILLING_PLANS;
|
||||
|
||||
/**
|
||||
* Check if a plan allows a given feature/limit.
|
||||
*/
|
||||
export function checkPlanLimit(
|
||||
plan: BillingPlanKey,
|
||||
limit: keyof typeof CMS_BILLING_PLANS.starter.limits,
|
||||
currentUsage: number,
|
||||
): boolean {
|
||||
const planLimits = CMS_BILLING_PLANS[plan].limits;
|
||||
const max = planLimits[limit];
|
||||
if (max === -1) return true; // unlimited
|
||||
return currentUsage < max;
|
||||
}
|
||||
Reference in New Issue
Block a user