mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
add premium plans + new pricing
This commit is contained in:
96
dashboard/components/pricing/PricingCardGeneric.vue
Normal file
96
dashboard/components/pricing/PricingCardGeneric.vue
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
|
||||||
|
|
||||||
|
export type PricingCardProp = {
|
||||||
|
title: string,
|
||||||
|
price: string,
|
||||||
|
subs: string[],
|
||||||
|
features: string[],
|
||||||
|
cta: string,
|
||||||
|
link?: string,
|
||||||
|
isDowngrade: boolean,
|
||||||
|
active: boolean,
|
||||||
|
planId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = defineProps<{ datas: PricingCardProp[] }>();
|
||||||
|
|
||||||
|
const activeProject = useActiveProject();
|
||||||
|
|
||||||
|
const currentIndex = ref<number>(0);
|
||||||
|
|
||||||
|
const data = computed(() => {
|
||||||
|
return props.datas[currentIndex.value];
|
||||||
|
})
|
||||||
|
|
||||||
|
async function onUpgradeClick() {
|
||||||
|
const res = await $fetch<string>(`/api/pay/${activeProject.value?._id.toString()}/create`, {
|
||||||
|
...signHeaders({ 'content-type': 'application/json' }),
|
||||||
|
method: 'POST',
|
||||||
|
body: JSON.stringify({ planId: data.value.planId })
|
||||||
|
})
|
||||||
|
if (!res) alert('Something went wrong');
|
||||||
|
window.open(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="relative bg-[#151515] outline outline-[1px] outline-[#262626] py-8 px-10 rounded-lg w-full max-w-[30rem]">
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-3 text-center">
|
||||||
|
<div class="poppins text-xl font-light"> {{ data.title }} </div>
|
||||||
|
<div v-if="data.active" class="absolute right-6 top-3 poppins text-[.75rem] bg-[#222A42] outline outline-[1px] outline-[#5680F8] px-3 py-[.1rem] rounded-xl">
|
||||||
|
Active
|
||||||
|
</div>
|
||||||
|
<div class="poppins text-4xl font-medium"> {{ data.price }} </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sep bg-[#262626] h-[1px] my-8"></div>
|
||||||
|
|
||||||
|
<div class="flex flex-col text-center h-[6rem] justify-center gap-2">
|
||||||
|
<div v-if="datas.length > 1">
|
||||||
|
<URange :ui="{
|
||||||
|
thumb: {
|
||||||
|
color: 'text-[#5680f8]'
|
||||||
|
},
|
||||||
|
progress: {
|
||||||
|
background: '!bg-[#5680f8]'
|
||||||
|
}
|
||||||
|
}" :min="0" :max="datas.length - 1" v-model="currentIndex">
|
||||||
|
</URange>
|
||||||
|
</div>
|
||||||
|
<div class="poppins" v-for="sub of data.subs"> {{ sub }} </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sep bg-[#262626] h-[1px] my-8"></div>
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-2">
|
||||||
|
<div class="flex gap-2" v-for="feature of data.features">
|
||||||
|
<div class="h-6 w-6">
|
||||||
|
<img class="w-full h-full" :src="'check.png'" alt="Check">
|
||||||
|
</div>
|
||||||
|
<div>{{ feature }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-10 flex">
|
||||||
|
<div class="w-full" v-if="data.planId > -1">
|
||||||
|
<div @click="onUpgradeClick()" v-if="!data.active && !data.isDowngrade"
|
||||||
|
class="cursor-pointer text-[1rem] font-semibold bg-[#3a3af5] rounded-md py-2 text-center">
|
||||||
|
Upgrade
|
||||||
|
</div>
|
||||||
|
<div @click="onUpgradeClick()" v-if="!data.active && data.isDowngrade"
|
||||||
|
class="w-full cursor-pointer text-[1rem] font-semibold bg-[#1f1f22] text-red-400 rounded-md py-2 text-center">
|
||||||
|
Downgrade
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<NuxtLink v-if="data.planId === -1" :to="data.link || 'https://dashboard.litlyx.com'"
|
||||||
|
class="bg-[#222A42] cursor-pointer outline outline-[1px] outline-[#5680F8] w-full !rounded-md text-center text-[.9rem] !py-2 ">
|
||||||
|
{{ data.cta }}
|
||||||
|
</NuxtLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -1,71 +1,188 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PricingCardProp } from './PricingCard.vue';
|
import type { PricingCardProp } from './PricingCardGeneric.vue';
|
||||||
|
|
||||||
|
|
||||||
const activeProject = useActiveProject();
|
const activeProject = useActiveProject();
|
||||||
|
|
||||||
const props = defineProps<{ currentSub: number }>();
|
const props = defineProps<{ currentSub: number }>();
|
||||||
|
|
||||||
|
const freePricing: PricingCardProp[] = [
|
||||||
const starterTierCardData = ref<PricingCardProp>({
|
{
|
||||||
title: 'STARTER',
|
title: 'Free',
|
||||||
cost: '0',
|
price: '€0 / mo',
|
||||||
features: [
|
subs: [
|
||||||
"3K visits/events per month",
|
'Up to 5000 visits/events per month',
|
||||||
"10 AI Interaction per month",
|
'CPM 0€ per visit/event'
|
||||||
"1 month data retention",
|
|
||||||
"Limited reports",
|
|
||||||
"1 Team member",
|
|
||||||
"Limited Automatic Email Report",
|
|
||||||
"Shared Server & DB",
|
|
||||||
"Low priority email support",
|
|
||||||
],
|
],
|
||||||
desc: `Free project are not reliable and sometimes
|
features: [
|
||||||
can experience some data loss.To have a
|
'Email support',
|
||||||
dedicated server we suggest to upgrade the
|
'Unlimited domains',
|
||||||
plan to an higher one!`,
|
'Unlimited reports',
|
||||||
active: activeProject.value?.premium === false,
|
'AI Tokens: 10',
|
||||||
|
'Server type: SHARED',
|
||||||
|
'Projects: max 2',
|
||||||
|
'Data retention: 2 Months'
|
||||||
|
],
|
||||||
|
cta: 'Start For Free now!',
|
||||||
|
active: props.currentSub == 0,
|
||||||
isDowngrade: props.currentSub > 0,
|
isDowngrade: props.currentSub > 0,
|
||||||
planId: 0
|
planId: 0
|
||||||
});
|
},
|
||||||
|
]
|
||||||
|
|
||||||
const accelerationTierCardData = ref<PricingCardProp>({
|
const customPricing: PricingCardProp[] = [
|
||||||
title: 'ACCELERATION',
|
{
|
||||||
cost: '9,99',
|
title: 'Enterprise',
|
||||||
features: [
|
price: 'Custom',
|
||||||
"150K visits/events per month",
|
subs: [
|
||||||
"100 AI Interaction per month",
|
'Unlimited visits/events per month',
|
||||||
"6 months data retention",
|
'Service Tailor-made on needs'
|
||||||
"Limited reports",
|
|
||||||
"1 Team member",
|
|
||||||
"Limited Automatic Email Report",
|
|
||||||
"Shared Server & DB",
|
|
||||||
"Low priority email support"
|
|
||||||
],
|
],
|
||||||
desc: `Your project is entering a growth phase. We simplify data analysis for you. For more support, try our Expansion plan—it's worth it!`,
|
features: [
|
||||||
active: activeProject.value?.premium_type === 1,
|
'Priority support',
|
||||||
isDowngrade: props.currentSub > 1,
|
'Server type: DEDICATED',
|
||||||
planId: 1
|
'DB instance: DEDICATED',
|
||||||
});
|
'Dedicated operator',
|
||||||
|
'White label',
|
||||||
|
'Custom Charts',
|
||||||
|
'Custom Data Aggregation'
|
||||||
|
],
|
||||||
|
cta: 'Let\'s Talk!',
|
||||||
|
link: 'mailto:help@litlyx.com',
|
||||||
|
active: false,
|
||||||
|
isDowngrade: false,
|
||||||
|
planId: -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
const expansionTierCardData = ref<PricingCardProp>({
|
const slidePricings: PricingCardProp[] = [
|
||||||
title: 'EXPANSION',
|
{
|
||||||
cost: '39,99',
|
title: 'Incubation',
|
||||||
features: [
|
price: '€4,99 / mo',
|
||||||
"500K visits/events per month",
|
subs: [
|
||||||
"5000 AI Interaction per month",
|
'Up to 50.000 visits/events per month',
|
||||||
"2 years data retention",
|
'CPM 0,10€ per visit/event'
|
||||||
"Unlimited reports",
|
|
||||||
"10 Team member",
|
|
||||||
"Unlimited Automatic Email Report",
|
|
||||||
"Dedicated Server & DB",
|
|
||||||
"high priority email support"
|
|
||||||
],
|
],
|
||||||
desc: `We will support you with everything we can offer and give you the full power of our service. If you need more space and are growing, contact us for a custom offer!`,
|
features: [
|
||||||
active: activeProject.value?.premium_type === 2,
|
'Discord support',
|
||||||
isDowngrade: props.currentSub > 2,
|
'Unlimited domains',
|
||||||
planId: 2
|
'Unlimited reports',
|
||||||
});
|
'AI Tokens: 30',
|
||||||
|
'Server type: SHARED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 6 Months'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 101,
|
||||||
|
isDowngrade: props.currentSub > 101,
|
||||||
|
planId: 101
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Acceleration',
|
||||||
|
price: '€9,99 / mo',
|
||||||
|
subs: [
|
||||||
|
'Up to 150.000 visits/events per month',
|
||||||
|
'CPM 0,06€ per visit/event'
|
||||||
|
],
|
||||||
|
features: [
|
||||||
|
'Discord support',
|
||||||
|
'Unlimited domains',
|
||||||
|
'Unlimited reports',
|
||||||
|
'AI Tokens: 100',
|
||||||
|
'Server type: SHARED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 9 Months'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 102,
|
||||||
|
isDowngrade: props.currentSub > 102,
|
||||||
|
planId: 102
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Growth',
|
||||||
|
price: '€29,99 / mo',
|
||||||
|
subs: [
|
||||||
|
'Up to 500.000 visits/events per month',
|
||||||
|
'CPM 0,059€ per visit/event'
|
||||||
|
],
|
||||||
|
features: [
|
||||||
|
'Discord support',
|
||||||
|
'Unlimited domains',
|
||||||
|
'Unlimited reports',
|
||||||
|
'AI Tokens: 3.000',
|
||||||
|
'Server type: SHARED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 1 Year'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 103,
|
||||||
|
isDowngrade: props.currentSub > 103,
|
||||||
|
planId: 103
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Expansion',
|
||||||
|
price: '€59,99 / mo',
|
||||||
|
subs: [
|
||||||
|
'Up to 1.000.000 visits/events per month',
|
||||||
|
'CPM 0,059€ per visit/event'
|
||||||
|
],
|
||||||
|
features: [
|
||||||
|
'Discord support',
|
||||||
|
'Unlimited domains',
|
||||||
|
'Unlimited reports',
|
||||||
|
'AI Tokens: 5.000',
|
||||||
|
'Server type: SHARED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 1 Year'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 104,
|
||||||
|
isDowngrade: props.currentSub > 104,
|
||||||
|
planId: 104
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Scaling',
|
||||||
|
price: '€99,99 / mo',
|
||||||
|
subs: [
|
||||||
|
'Up to 2.500.000 visits/events per month',
|
||||||
|
'CPM 0,039€ per visit/event'
|
||||||
|
],
|
||||||
|
features: [
|
||||||
|
'Discord support',
|
||||||
|
'Unlimited domains',
|
||||||
|
'Unlimited reports',
|
||||||
|
'AI Tokens: 10.000',
|
||||||
|
'Server type: DEDICATED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 2 Years'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 105,
|
||||||
|
isDowngrade: props.currentSub > 105,
|
||||||
|
planId: 105
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Unicorn',
|
||||||
|
price: '€149,99 / mo',
|
||||||
|
subs: [
|
||||||
|
'Up to 5.000.000 visits/events per month',
|
||||||
|
'CPM 0,029€ per visit/event'
|
||||||
|
],
|
||||||
|
features: [
|
||||||
|
'Discord support',
|
||||||
|
'Unlimited domains',
|
||||||
|
'Unlimited reports',
|
||||||
|
'AI Tokens: 20.000',
|
||||||
|
'Server type: DEDICATED',
|
||||||
|
'Projects: max 3',
|
||||||
|
'Data retention: 3 Years'
|
||||||
|
],
|
||||||
|
cta: 'Go to Cloud Dashboard',
|
||||||
|
active: props.currentSub == 106,
|
||||||
|
isDowngrade: props.currentSub > 106,
|
||||||
|
planId: 106
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
@@ -83,9 +200,9 @@ const emits = defineEmits<{
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-8 mt-10 h-max xl:flex-row flex-col">
|
<div class="flex gap-8 mt-10 h-max xl:flex-row flex-col">
|
||||||
<PricingCard class="flex-1" :data="starterTierCardData"></PricingCard>
|
<PricingCardGeneric class="flex-1" :datas="freePricing"></PricingCardGeneric>
|
||||||
<PricingCard class="flex-1" :data="accelerationTierCardData"></PricingCard>
|
<PricingCardGeneric class="flex-1" :datas="slidePricings"></PricingCardGeneric>
|
||||||
<PricingCard class="flex-1" :data="expansionTierCardData"></PricingCard>
|
<PricingCardGeneric class="flex-1" :datas="customPricing"></PricingCardGeneric>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-between items-center mt-10 flex-col xl:flex-row">
|
<div class="flex justify-between items-center mt-10 flex-col xl:flex-row">
|
||||||
|
|||||||
BIN
dashboard/public/check.png
Normal file
BIN
dashboard/public/check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -2,7 +2,18 @@ import { CustomPremiumPriceModel } from "../schema/CustomPremiumPriceSchema";
|
|||||||
|
|
||||||
export type PREMIUM_TAG = typeof PREMIUM_TAGS[number];
|
export type PREMIUM_TAG = typeof PREMIUM_TAGS[number];
|
||||||
|
|
||||||
export const PREMIUM_TAGS = ['FREE', 'PLAN_1', 'PLAN_2', 'CUSTOM_1'] as const;
|
export const PREMIUM_TAGS = [
|
||||||
|
'FREE',
|
||||||
|
'PLAN_1',
|
||||||
|
'PLAN_2',
|
||||||
|
'CUSTOM_1',
|
||||||
|
'INCUBATION',
|
||||||
|
'ACCELERATION',
|
||||||
|
'GROWTH',
|
||||||
|
'EXPANSION',
|
||||||
|
'SCALING',
|
||||||
|
'UNICORN'
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
|
||||||
export type PREMIUM_DATA = {
|
export type PREMIUM_DATA = {
|
||||||
@@ -16,7 +27,7 @@ export type PREMIUM_DATA = {
|
|||||||
export const PREMIUM_PLAN: Record<PREMIUM_TAG, PREMIUM_DATA> = {
|
export const PREMIUM_PLAN: Record<PREMIUM_TAG, PREMIUM_DATA> = {
|
||||||
FREE: {
|
FREE: {
|
||||||
ID: 0,
|
ID: 0,
|
||||||
COUNT_LIMIT: 3_000,
|
COUNT_LIMIT: 5_000,
|
||||||
AI_MESSAGE_LIMIT: 10,
|
AI_MESSAGE_LIMIT: 10,
|
||||||
PRICE: 'price_1POKCMB2lPUiVs9VLe3QjIHl',
|
PRICE: 'price_1POKCMB2lPUiVs9VLe3QjIHl',
|
||||||
PRICE_TEST: 'price_1PNbHYB2lPUiVs9VZP32xglF'
|
PRICE_TEST: 'price_1PNbHYB2lPUiVs9VZP32xglF'
|
||||||
@@ -41,7 +52,49 @@ export const PREMIUM_PLAN: Record<PREMIUM_TAG, PREMIUM_DATA> = {
|
|||||||
AI_MESSAGE_LIMIT: 100_000,
|
AI_MESSAGE_LIMIT: 100_000,
|
||||||
PRICE: 'price_1POKZyB2lPUiVs9VMAY6jXTV',
|
PRICE: 'price_1POKZyB2lPUiVs9VMAY6jXTV',
|
||||||
PRICE_TEST: ''
|
PRICE_TEST: ''
|
||||||
}
|
},
|
||||||
|
INCUBATION: {
|
||||||
|
ID: 101,
|
||||||
|
COUNT_LIMIT: 50_000,
|
||||||
|
AI_MESSAGE_LIMIT: 30,
|
||||||
|
PRICE: 'price_1PdsyzB2lPUiVs9V4J246Jw0',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
|
ACCELERATION: {
|
||||||
|
ID: 102,
|
||||||
|
COUNT_LIMIT: 150_000,
|
||||||
|
AI_MESSAGE_LIMIT: 100,
|
||||||
|
PRICE: 'price_1Pdt5bB2lPUiVs9VhkuCouEt',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
|
GROWTH: {
|
||||||
|
ID: 103,
|
||||||
|
COUNT_LIMIT: 500_000,
|
||||||
|
AI_MESSAGE_LIMIT: 3_000,
|
||||||
|
PRICE: 'price_1PdszrB2lPUiVs9VIdkT3thv',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
|
EXPANSION: {
|
||||||
|
ID: 104,
|
||||||
|
COUNT_LIMIT: 1_000_000,
|
||||||
|
AI_MESSAGE_LIMIT: 5_000,
|
||||||
|
PRICE: 'price_1Pdt0xB2lPUiVs9V0Rdt80Fe',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
|
SCALING: {
|
||||||
|
ID: 105,
|
||||||
|
COUNT_LIMIT: 2_500_000,
|
||||||
|
AI_MESSAGE_LIMIT: 10_000,
|
||||||
|
PRICE: 'price_1Pdt1UB2lPUiVs9VUmxntSwZ',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
|
UNICORN: {
|
||||||
|
ID: 106,
|
||||||
|
COUNT_LIMIT: 5_000_000,
|
||||||
|
AI_MESSAGE_LIMIT: 20_000,
|
||||||
|
PRICE: 'price_1Pdt2LB2lPUiVs9VGBFAIG9G',
|
||||||
|
PRICE_TEST: ''
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomPremiumPriceModel.find({}).then(custom_prices => {
|
CustomPremiumPriceModel.find({}).then(custom_prices => {
|
||||||
|
|||||||
Reference in New Issue
Block a user