feat: setup drizzle (#594)
* chore: migration to SvelteKit 2 * stage 1: migrate to svelte 5 and fix rerendering issues * stage 2: fix more $: reactivity across dashboard * fix merge conflicts * chore: migrate code in main to svelte 5 * chore: update preventDefault * chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte * chore: enforce .ts across dashboard * rename from classroomio-com to website * stage-3: Replace carbon icon svelte with lucide icon * update lock file * chore: finish icon replacement * fix: settings and setup page multiple rerender * stage 3: More icon and rerendering fixes * feat: setup drizzle and better auth * fix: onboarding validation error showing translation key #586 (#593) * fix: onboarding validation error showing translation key #586 * fix: remove debug log for profile update errors * chore: add a clean command * fix: remove message from email verification response
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
export const PLAN = {
|
||||
BASIC: 'BASIC',
|
||||
EARLY_ADOPTER: 'EARLY_ADOPTER',
|
||||
ENTERPRISE: 'ENTERPRISE'
|
||||
};
|
||||
|
||||
export const PLAN_NAMES = {
|
||||
[PLAN.BASIC]: 'Free',
|
||||
[PLAN.EARLY_ADOPTER]: 'Early Adopter',
|
||||
[PLAN.ENTERPRISE]: 'Enterprise',
|
||||
}
|
||||
|
||||
export const FEATURES = {
|
||||
BACIC_STUDENTS_50: 'BACIC_STUDENTS_50',
|
||||
EA_STUDENTS_10000: 'EA_STUDENTS_10000',
|
||||
EA_VIDEO_UPLOAD: 'EA_VIDEO_UPLOAD',
|
||||
EA_CERTIFICATE: 'EA_CERTIFICATE',
|
||||
EA_UPCOMING_FEATURES: 'EA_UPCOMING_FEATURES',
|
||||
ENTERPRISE_STUDENTS_UNLIMITED: 'ENTERPRISE_STUDENTS_UNLIMITED',
|
||||
ENTERPRISE_CUSTOM_DOMAIN: 'ENTERPRISE_CUSTOM_DOMAIN'
|
||||
};
|
||||
|
||||
export const BASIC_FEATURES = [FEATURES.BACIC_STUDENTS_50];
|
||||
|
||||
export const EARYL_ADOPTER_FEATURES = [
|
||||
...BASIC_FEATURES,
|
||||
FEATURES.EA_STUDENTS_10000,
|
||||
FEATURES.EA_VIDEO_UPLOAD,
|
||||
FEATURES.EA_CERTIFICATE,
|
||||
FEATURES.EA_UPCOMING_FEATURES
|
||||
];
|
||||
|
||||
export const ENTERPRISE_FEATURES = [
|
||||
...EARYL_ADOPTER_FEATURES,
|
||||
FEATURES.ENTERPRISE_STUDENTS_UNLIMITED,
|
||||
FEATURES.ENTERPRISE_CUSTOM_DOMAIN
|
||||
];
|
||||
|
||||
export const PLANS_BY_FEATURE = {
|
||||
[PLAN.BASIC]: BASIC_FEATURES,
|
||||
[PLAN.EARLY_ADOPTER]: EARYL_ADOPTER_FEATURES,
|
||||
[PLAN.ENTERPRISE]: ENTERPRISE_FEATURES
|
||||
};
|
||||
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"BASIC": {
|
||||
"NAME": "Basic",
|
||||
"DESCRIPTION": "Free tier plan for personal use, no credit card required.",
|
||||
"PRICE": {
|
||||
"CURRENCY": "$",
|
||||
"MONTHLY": "0",
|
||||
"YEARLY": "0",
|
||||
"IS_PREMIUM": false
|
||||
},
|
||||
"FEATURES": [
|
||||
"Unlimited Courses",
|
||||
"Unlimited Q/A",
|
||||
"20 Students",
|
||||
"AI Course Builder (no video upload)",
|
||||
"ClassroomIO branding"
|
||||
],
|
||||
"CTA": {
|
||||
"LABEL": "Signup Now",
|
||||
"LINK": "/signup?plan=free",
|
||||
"DASHBOARD_LABEL": "Downgrade",
|
||||
"DASHBOARD_LINK": "#disabled",
|
||||
"IS_DISABLED": true
|
||||
}
|
||||
},
|
||||
"EARLY_ADOPTER": {
|
||||
"NAME": "Early Adopters",
|
||||
"DESCRIPTION": "For fast growing teaching businesses that aim to scale.",
|
||||
"PRICE": {
|
||||
"CURRENCY": "$",
|
||||
"MONTHLY": "35",
|
||||
"YEARLY": "350",
|
||||
"IS_PREMIUM": false
|
||||
},
|
||||
"FEATURES": [
|
||||
"Everything in Basic",
|
||||
"Unlimited Collaborators",
|
||||
"10K Students",
|
||||
"Advanced AI Course Builder (Video upload & Certificate)",
|
||||
"Custom Branding",
|
||||
"Slack Invite",
|
||||
"Includes all upcoming features"
|
||||
],
|
||||
"CTA": {
|
||||
"LABEL": "I want in 😍",
|
||||
"LINK": "/signup?plan=early-adopter",
|
||||
"DASHBOARD_LABEL": "Upgrade now",
|
||||
"DASHBOARD_LINK": "",
|
||||
"IS_DISABLED": false,
|
||||
"PRODUCT_ID": "1e11ad75-c422-41c1-a541-0e989281276c",
|
||||
"PRODUCT_ID_YEARLY": "a84d3a82-3259-4300-b2bf-dccb7bd7814c"
|
||||
}
|
||||
},
|
||||
"ENTERPRISE": {
|
||||
"NAME": "Enterprise",
|
||||
"DESCRIPTION": "Best suited for larger businesses that need more control",
|
||||
"PRICE": {
|
||||
"CURRENCY": "",
|
||||
"MONTHLY": "Request Pricing",
|
||||
"YEARLY": "Request Pricing",
|
||||
"IS_PREMIUM": true
|
||||
},
|
||||
"FEATURES": [
|
||||
"Everything in Early Adopters plus:",
|
||||
"Unlimited students",
|
||||
"Custom Domain",
|
||||
"24/7 Support"
|
||||
],
|
||||
"CTA": {
|
||||
"LABEL": "Contact Us",
|
||||
"LINK": "https://cal.com/classroomio/enterprise",
|
||||
"DASHBOARD_LABEL": "Contact Us",
|
||||
"DASHBOARD_LINK": "https://cal.com/classroomio/enterprise",
|
||||
"IS_DISABLED": false
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './constants';
|
||||
export * from './utils';
|
||||
|
||||
import * as PLANS from './data.json';
|
||||
|
||||
export { PLANS };
|
||||
@@ -0,0 +1,7 @@
|
||||
import { PLANS_BY_FEATURE } from './constants';
|
||||
|
||||
export function hasFeature(featureName: string, userPlan: string) {
|
||||
const features = PLANS_BY_FEATURE[userPlan];
|
||||
|
||||
return features.includes(featureName);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export function embedSenjaWidget(widgetId: string) {
|
||||
const s = document.createElement('script');
|
||||
|
||||
s.setAttribute('src', `https://widget.senja.io/widget/${widgetId}/platform.js`);
|
||||
s.setAttribute('type', 'text/javascript');
|
||||
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
Reference in New Issue
Block a user