Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 50 additions & 3 deletions apps/site/src/app/pricing/pricing-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type PricingPlan = {
title: string;
subtitle: string;
points: PlanPoint[];
acceleratePoints?: PlanPoint[];
price: CurrencyMap;
};

Expand All @@ -76,10 +77,9 @@ export function formatAmountForAllCurrencies(amountUsd: number, digits: number):
const config = currencyConfig[typedCode];
const isMicroPrice = digits > config.decimals;
const effectiveDigits = isMicroPrice ? config.microDecimals : digits;
const displayValue = isMicroPrice ? converted : Math.round(converted);
return [
code,
`${symbol}${displayValue.toLocaleString("en-US", {
`${symbol}${converted.toLocaleString("en-US", {
minimumFractionDigits: effectiveDigits,
maximumFractionDigits: effectiveDigits,
})}`,
Expand Down Expand Up @@ -118,6 +118,11 @@ export const plans: Record<PricingPlanKey, PricingPlan> = {
"<b>5</b> databases",
"No credit card required",
],
acceleratePoints: [
"<b>60,000</b> operations<span>*</span> included",
"Cache tag invalidations <b>not</b> included",
"First <b>1 KiB per query</b> egress",
],
price: formatAmountForAllCurrencies(0, 0),
},
starter: {
Expand All @@ -135,6 +140,18 @@ export const plans: Record<PricingPlanKey, PricingPlan> = {
"<b>10</b> databases",
"Includes spend limits <br/><b>Daily backups</b> stored for <b>7 days</b>",
],
acceleratePoints: [
"First <b>60,000</b> operations<span>*</span> <b>free</b>",
{
text: "<b><price></b> per 1,000 operations",
price: formatAmountForAllCurrencies(0.018, 3),
},
"Cache tag invalidations <b>not</b> included",
{
text: "First <b>1 KiB per query</b> egress free<br/>then <b><price></b> per GiB",
price: formatAmountForAllCurrencies(0.09, 2),
},
],
price: formatAmountForAllCurrencies(10, 0),
},
pro: {
Expand All @@ -152,6 +169,21 @@ export const plans: Record<PricingPlanKey, PricingPlan> = {
"<b>100</b> databases",
"Includes spend limits <br/><b>Daily backups</b> stored for <b>7 days</b>",
],
acceleratePoints: [
"First <b>60,000</b> operations<span>*</span> <b>free</b>",
{
text: "<b><price></b> per 1,000 operations",
price: formatAmountForAllCurrencies(0.008, 3),
},
{
text: "<b><price></b> per 1,000 cache tag invalidations",
price: formatAmountForAllCurrencies(0.008, 3),
},
{
text: "First <b>1 KiB per query</b> egress free<br/>then <b><price></b> per GiB",
price: formatAmountForAllCurrencies(0.09, 2),
},
],
price: formatAmountForAllCurrencies(49, 0),
},
business: {
Expand All @@ -169,6 +201,21 @@ export const plans: Record<PricingPlanKey, PricingPlan> = {
"<b>1000</b> databases",
"Includes spend limits <br/><b>Daily backups</b> stored for <b>30 days</b>",
],
acceleratePoints: [
"First <b>60,000</b> operations<span>*</span> <b>free</b>",
{
text: "<b><price></b> per 1,000 operations",
price: formatAmountForAllCurrencies(0.006, 3),
},
{
text: "<b><price></b> per 1,000 cache tag invalidations",
price: formatAmountForAllCurrencies(0.006, 3),
},
{
text: "First <b>2 KiB per query</b> egress free<br/>then <b><price></b> per GiB",
price: formatAmountForAllCurrencies(0.08, 2),
},
],
price: formatAmountForAllCurrencies(129, 0),
},
};
Expand Down Expand Up @@ -298,7 +345,7 @@ export const faqs: Array<{ question: string; answer: string }> = [
{
question: "Can I get the power of Prisma with my own database?",
answer:
"<p>You can also connect your own database to Prisma's global caching and connection pooling, also known as Prisma Accelerate.</p><p>Click the &quot;Bring your own database&quot; toggle at the top of this page to see more<br />detail.</p>",
"<p>You can also connect your own database to Prisma's global caching and connection pooling, also known as Prisma Accelerate.</p><p>The plan cards on this page include a dedicated Prisma Accelerate section with temporary pricing details for bring-your-own-database setups.</p>",
},
{
question: "I'm an early stage startup, do you offer any discounts?",
Expand Down
82 changes: 58 additions & 24 deletions apps/site/src/app/pricing/pricing-hero-plans.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ export function PricingHeroPlans({
return `${planKey}-${item.text}-${index}`;
};

const renderPlanPointList = (planKey: string, items: PlanPoint[]) => (
<ul className="list-none p-0 m-0 mt-3 space-y-2">
{items.map((item, index) => (
<li
key={getPlanPointKey(planKey, item, index)}
className="flex items-start gap-2 text-base"
>
<span className="text-foreground-ppg mt-1">
<i className="fa-solid fa-circle-check text-xs" />
</span>
<span
className="[&_b]:font-semibold [&_span]:text-foreground-neutral-weak"
dangerouslySetInnerHTML={{
__html: renderPlanPoint(item, currency),
}}
/>
</li>
))}
</ul>
);

return (
<>
<section className="hero h-full relative -mt-24 flex items-end justify-center px-4 pt-40">
Expand Down Expand Up @@ -85,9 +106,7 @@ export function PricingHeroPlans({
<article
key={planKey}
className={`relative rounded-2xl border ${
highlighted
? "border-stroke-ppg mt-4 md:mt-0"
: "border-stroke-neutral-weak"
highlighted ? "border-stroke-ppg mt-4 md:mt-0" : "border-stroke-neutral-weak"
} bg-background-default p-5 text-foreground-neutral shadow-[0px_18px_42px_0px_rgba(23,43,77,0.08)]`}
>
{highlighted && (
Expand All @@ -103,7 +122,11 @@ export function PricingHeroPlans({
</p>
{(planKey === "pro" || planKey === "business") && (
<Button asChild variant="default" size="lg" className="gap-2 px-2">
<a href="https://pris.ly/pay-via-aws" target="_blank" rel="noopener noreferrer">
<a
href="https://pris.ly/pay-via-aws"
target="_blank"
rel="noopener noreferrer"
>
Pay via
<Image
src="/icons/companies/aws.svg"
Expand All @@ -121,29 +144,40 @@ export function PricingHeroPlans({
{plan.price[currency]}
<span className="text-2xl text-foreground-neutral-weak"> / month</span>
</p>
<Button asChild variant={highlighted ? "ppg" : "default-strong"} size="xl" className="mt-4 w-full">
<a href="https://console.prisma.io/login?utm_source=website&utm_medium=pricing" target="_blank" rel="noopener noreferrer">
<Button
asChild
variant={highlighted ? "ppg" : "default-strong"}
size="xl"
className="mt-4 w-full"
>
<a
href="https://console.prisma.io/login?utm_source=website&utm_medium=pricing"
target="_blank"
rel="noopener noreferrer"
>
{planActions[planKey]}
</a>
</Button>
<ul className="list-none p-0 m-0 mt-5 space-y-2">
{plan.points.map((item, index) => (
<li
key={getPlanPointKey(planKey, item, index)}
className="flex items-start gap-2 text-base"
>
<span className="text-foreground-ppg mt-1">
<i className="fa-solid fa-circle-check text-xs" />
</span>
<span
className="[&_b]:font-semibold [&_span]:text-foreground-neutral-weak"
dangerouslySetInnerHTML={{
__html: renderPlanPoint(item, currency),
}}
/>
</li>
))}
</ul>
<div className="mt-5 space-y-5">
<div>
<p className="m-0 text-xs uppercase tracking-[1.2px] text-foreground-neutral-weak">
Prisma Postgres
</p>
{renderPlanPointList(`${planKey}-postgres`, plan.points)}
</div>

{plan.acceleratePoints && (
<div className="border-t border-stroke-neutral-weak pt-5">
<p className="m-0 text-xs uppercase tracking-[1.2px] text-foreground-neutral-weak">
Prisma Accelerate
</p>
<p className="m-0 mt-1 text-sm text-foreground-neutral-weak">
Bring your own database
</p>
{renderPlanPointList(`${planKey}-accelerate`, plan.acceleratePoints)}
</div>
)}
</div>
</article>
);
})}
Expand Down
Loading