From fb78dba24450f9250fbe8bbd09fc15d09cc5c316 Mon Sep 17 00:00:00 2001 From: Advait <76993204+777advait@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:30:59 +0530 Subject: [PATCH 1/5] feat(features): add a pricing page --- apps/docs/content/features/pricing.mdx | 103 +++++++++++++++++++++++++ apps/docs/sidebars.js | 9 +++ 2 files changed, 112 insertions(+) create mode 100644 apps/docs/content/features/pricing.mdx diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx new file mode 100644 index 00000000..fe746863 --- /dev/null +++ b/apps/docs/content/features/pricing.mdx @@ -0,0 +1,103 @@ +--- +title: Pricing +description: Detailed pricing description for deployment on zerops. +--- + +Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. + +## Projects + +A [project](/features/infrastructure#project) is the internal **infrastructure**, dedicated for your **services**. Think of it as a private network where you can deploy your services inside and interact with each other. + +You need a project even if you plan on spinning up a single small node.js service, as this internal infrastructure is what allows most of the functionalities on Zerops. + +Zerops offers two project core packages: + +### Lightweight project core package (Less RAM and CPU usage) + +- Core services (L3 balancer with firewall, logger, statistics), HTTP routing and load balancers all on single container +- Proxy / Load balancer +- Unique IPv6 address +- 15 hours of build time +- 5 GB space for automated backups +- 100 GB of egress + +### Serious project core package (Highly available setup) + +- Highly available core services (L3 balancer with firewall, logger, statistics) +- Highly available HTTP routing & load balancer +- Proxy / Load balancer +- Unique IPv6 address +- 150 hours of build time +- 25 GB space for automated backups +- 3 TB of egress + +:::info +Project core is refundable, for eg. if you create a serious project, pay $10 and then delete it after 15 days, you'll get $5 back +::: + +## Resources & Costs + +The pricing model is based on the amount of resources allocated to your services inside a project. + +:::info +Pricing is minute based, but credit is deducted once per hour based on the usage throughout the hour. +::: + +### Resource pricing + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourceCost
Shared CPU$0.60 per CPU / 30 days
Dedicated CPU$6.00 per CPU / 30 days
RAM$0.75 per 0.25 GB / 30 days
Disk space$0.05 per 0.5 GB / 30 days
+ +### Other features + + + + + + + + + + + + + + + + + + +
FeatureCost
Unique IPv4 address$3.00 / 30 days
Object Storage$0.01 / GB
+ +## Hitting the limits + +If you hit the limits of **backup/build/egress** in a project you'll pay: + +- **$0.50** - per **5 GB** of backup space +- **$0.50** - per **15 hours** of build time +- **$0.10** - per **1 GB** of egress diff --git a/apps/docs/sidebars.js b/apps/docs/sidebars.js index 6a64e907..59461f9f 100644 --- a/apps/docs/sidebars.js +++ b/apps/docs/sidebars.js @@ -88,6 +88,15 @@ module.exports = { }, className: 'homepage-sidebar-item', }, + { + type: 'doc', + id: 'features/pricing', + label: 'Pricing', + customProps: { + sidebar_icon: 'currency-dollar', + }, + className: 'homepage-sidebar-item', + }, // { // type: 'doc', // id: 'features/remote-dev', From 46c77fc49dd9030ccfd3917b5fae325c578f7feb Mon Sep 17 00:00:00 2001 From: Advait <76993204+777advait@users.noreply.github.com> Date: Sun, 24 Nov 2024 11:26:05 +0530 Subject: [PATCH 2/5] feat(features): add a calculator on the pricing page --- apps/docs/content/features/pricing.mdx | 6 + .../components/PricingCalculator/index.tsx | 278 ++++++++++++++++++ 2 files changed, 284 insertions(+) create mode 100644 apps/docs/src/components/PricingCalculator/index.tsx diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx index fe746863..73a4be60 100644 --- a/apps/docs/content/features/pricing.mdx +++ b/apps/docs/content/features/pricing.mdx @@ -3,6 +3,8 @@ title: Pricing description: Detailed pricing description for deployment on zerops. --- +import PricingCalculator from "@site/src/components/PricingCalculator" + Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. ## Projects @@ -94,6 +96,10 @@ Pricing is minute based, but credit is deducted once per hour based on the usage +## Pricing Calculator + + + ## Hitting the limits If you hit the limits of **backup/build/egress** in a project you'll pay: diff --git a/apps/docs/src/components/PricingCalculator/index.tsx b/apps/docs/src/components/PricingCalculator/index.tsx new file mode 100644 index 00000000..93e0b731 --- /dev/null +++ b/apps/docs/src/components/PricingCalculator/index.tsx @@ -0,0 +1,278 @@ +import React from 'react'; +import { Button, InputText } from 'docs-ui'; + +type ResourcesType = { + cpu: number; + cpuType: 'shared' | 'dedicated'; + ram: number; + disk: number; + storage: number; + ipv4_addr: boolean; + core: 'lightweight' | 'serious'; +}; + +export default function PricingCalculator() { + const [resources, setResources] = React.useState({ + cpu: 1, + cpuType: 'shared', + ram: 0.25, + disk: 0.5, + storage: 0, + ipv4_addr: false, + core: 'lightweight', + }); + + const price = { + cpu: resources.cpuType === 'shared' ? 0.6 : 6, + ram: 0.75, + disk: 0.05, + storage: 0.01, + ipv4_addr: 3, + core: resources.core === 'lightweight' ? 0.0 : 10.0, + }; + + const handleAdjust = (name: string, amount: number) => { + setResources((prev) => { + const newValue = Number( + ((prev[name as keyof typeof prev] as number) + amount).toFixed(2) + ); + const minValue = name === 'cpu' ? 1 : 0; + return { + ...prev, + [name]: Math.max(minValue, newValue), + }; + }); + }; + + const handleChange = (name: string, value: number | string | boolean) => { + setResources((prev) => ({ + ...prev, + [name]: value, + })); + }; + + const calculateTotal = () => { + const total = + resources.cpu * price.cpu + + resources.ram * price.ram + + resources.disk * price.disk + + resources.storage * price.storage + + (resources.ipv4_addr ? price.ipv4_addr : 0) + + price.core; + + return total.toFixed(2); + }; + + const isMinValue = (name: string, value: number) => { + const minValues = { + cpu: 1, + ram: 0.25, + disk: 0.5, + storage: 0, + }; + return value <= minValues[name as keyof typeof minValues]; + }; + + return ( +
+
+
+ +
+ + + +
+
+
+ + +
+
+ +
+ + + +
+
+
+ +
+ + + +
+
+
+ +
+ + + +
+
+ +
+ + +
+
+ +
+
+

+ Total price: ${calculateTotal()} / 30 + days (approx.) +

+
+ ); +} From 94d6a0ea7da821f96f26cfc1775416637de3f8fc Mon Sep 17 00:00:00 2001 From: Advait <76993204+777advait@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:42:56 +0530 Subject: [PATCH 3/5] improve(features): update the project description add a table to differentiate lightweight and serious core --- apps/docs/content/features/pricing.mdx | 83 +++++++++++++++++--------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx index 73a4be60..2ba3e082 100644 --- a/apps/docs/content/features/pricing.mdx +++ b/apps/docs/content/features/pricing.mdx @@ -4,35 +4,62 @@ description: Detailed pricing description for deployment on zerops. --- import PricingCalculator from "@site/src/components/PricingCalculator" +import { CheckCircleSolid } from "@medusajs/icons"; -Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. +Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. The total price of hosting a application is equal to the project's **core package cost** + the **cost of the resources** of the services inside a project(+ extra costs if any). ## Projects -A [project](/features/infrastructure#project) is the internal **infrastructure**, dedicated for your **services**. Think of it as a private network where you can deploy your services inside and interact with each other. +A [project](/features/infrastructure#project) is mandatory for any deployment as it provides fundamental functionality for services inside it to work properly. You can have one or more projects. -You need a project even if you plan on spinning up a single small node.js service, as this internal infrastructure is what allows most of the functionalities on Zerops. +Zerops offers two project core packages - **Lightweight** ($0 / 30 days per project) which is ideal for **small-scale** applications and **Serious** ($10 / 30 days per project) for **high-availability** applications. Below is a brief differentitation between the two core packages: -Zerops offers two project core packages: - -### Lightweight project core package (Less RAM and CPU usage) - -- Core services (L3 balancer with firewall, logger, statistics), HTTP routing and load balancers all on single container -- Proxy / Load balancer -- Unique IPv6 address -- 15 hours of build time -- 5 GB space for automated backups -- 100 GB of egress - -### Serious project core package (Highly available setup) - -- Highly available core services (L3 balancer with firewall, logger, statistics) -- Highly available HTTP routing & load balancer -- Proxy / Load balancer -- Unique IPv6 address -- 150 hours of build time -- 25 GB space for automated backups -- 3 TB of egress + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeaturesLightweight ($0/30d)Serious ($10/30d)
Core ServicesSingle containerHighly available
HTTP Routing & Load BalancerSingle containerHighly available
Proxy / Load Balancer
IPv6 Address
Build Time15 hours150 hours
Backup Space5 GB25 GB
Egress100 GB3 TB
:::info Project core is refundable, for eg. if you create a serious project, pay $10 and then delete it after 15 days, you'll get $5 back @@ -48,7 +75,7 @@ Pricing is minute based, but credit is deducted once per hour based on the usage ### Resource pricing - +
@@ -77,7 +104,7 @@ Pricing is minute based, but credit is deducted once per hour based on the usage ### Other features -
Resource
+
@@ -104,6 +131,6 @@ Pricing is minute based, but credit is deducted once per hour based on the usage If you hit the limits of **backup/build/egress** in a project you'll pay: -- **$0.50** - per **5 GB** of backup space -- **$0.50** - per **15 hours** of build time -- **$0.10** - per **1 GB** of egress +- **$0.50** - per **5 GB** of extra backup space +- **$0.50** - per **15 hours** of extra build time +- **$0.10** - per **1 GB** of extra egress From 50b10f2ef55533b6409b25788596ffc536a098fb Mon Sep 17 00:00:00 2001 From: Advait <76993204+777advait@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:45:38 +0530 Subject: [PATCH 4/5] fix(features): add `per 30 days` in object storage row --- apps/docs/content/features/pricing.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx index 2ba3e082..f389ab9e 100644 --- a/apps/docs/content/features/pricing.mdx +++ b/apps/docs/content/features/pricing.mdx @@ -6,7 +6,7 @@ description: Detailed pricing description for deployment on zerops. import PricingCalculator from "@site/src/components/PricingCalculator" import { CheckCircleSolid } from "@medusajs/icons"; -Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. The total price of hosting a application is equal to the project's **core package cost** + the **cost of the resources** of the services inside a project(+ extra costs if any). +Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. The total price of hosting a application is equal to the project's **core package cost** + the **cost of the resources** of the services inside a project**(+ extra costs if any)**. ## Projects @@ -118,7 +118,7 @@ Pricing is minute based, but credit is deducted once per hour based on the usage - +
Feature
Object Storage$0.01 / GB$0.01 / GB per 30 days
From ab0d393c8eba10f9286735cbff4b27770718a47b Mon Sep 17 00:00:00 2001 From: Arjun Aditya Date: Tue, 26 Nov 2024 15:30:16 +0530 Subject: [PATCH 5/5] chore: improve pricing page & calc --- apps/docs/content/features/pricing.mdx | 87 +++++++++---- apps/docs/sidebars.js | 2 +- .../PricingCalculator/calculator.css | 86 +++++++++++++ .../components/PricingCalculator/index.tsx | 116 +++++++++++------- 4 files changed, 223 insertions(+), 68 deletions(-) create mode 100644 apps/docs/src/components/PricingCalculator/calculator.css diff --git a/apps/docs/content/features/pricing.mdx b/apps/docs/content/features/pricing.mdx index f389ab9e..0661c575 100644 --- a/apps/docs/content/features/pricing.mdx +++ b/apps/docs/content/features/pricing.mdx @@ -1,24 +1,44 @@ --- -title: Pricing +title: Pricing Plans & Usage description: Detailed pricing description for deployment on zerops. --- import PricingCalculator from "@site/src/components/PricingCalculator" import { CheckCircleSolid } from "@medusajs/icons"; -Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. The total price of hosting a application is equal to the project's **core package cost** + the **cost of the resources** of the services inside a project**(+ extra costs if any)**. +:::tip Calculate Your Costs +Use our basic [pricing calculator](#pricing-calculator) below to estimate your monthly costs based on your specific needs. +::: + +Zerops offers a usage based pricing model which can accommodate any **small-scale** or **high-availability** applications. The total price of hosting a application is equal to the project's **core package cost** + the **cost of the resources** of the services inside a project **(+ extra costs if any)**. + +## Project Plans + +Every deployment on Zerops requires a project, which provides essential infrastructure and functionality. Projects are the foundation of your application, handling core services like load balancing, routing, and container orchestration. -## Projects +### Lightweight Plan +- **Cost:** Free +- **Best for:** Development, testing, and small-scale applications +- **Infrastructure:** Single container setup +- **Limitations:** Shared IPv4 address, no high availability -A [project](/features/infrastructure#project) is mandatory for any deployment as it provides fundamental functionality for services inside it to work properly. You can have one or more projects. +### Serious Plan +- **Cost:** $10 / 30 days +- **Best for:** Production and high-availability applications +- **Infrastructure:** Multi-container, highly available setup +- **Benefits:** Ready for production workloads with automatic failover -Zerops offers two project core packages - **Lightweight** ($0 / 30 days per project) which is ideal for **small-scale** applications and **Serious** ($10 / 30 days per project) for **high-availability** applications. Below is a brief differentitation between the two core packages: +:::info Billing +Project costs are calculated based on actual usage. You're only charged for the time your project is active, calculated down to the minute. +::: + +### Plan Comparison - + @@ -61,19 +81,39 @@ Zerops offers two project core packages - **Lightweight** ($0 / 30 days per proj
FeaturesLightweight ($0/30d)Lightweight (Free) Serious ($10/30d)
-:::info -Project core is refundable, for eg. if you create a serious project, pay $10 and then delete it after 15 days, you'll get $5 back -::: +### Additional Costs + +The following costs apply when you exceed the plan limits of a project: + + + + + + + + + + + + + + + + + + + + + + +
ResourceCost
Backup Space$0.50 per 5 GB
Build Time$0.50 per 15 hours
Egress Traffic$0.10 per 1 GB
-## Resources & Costs -The pricing model is based on the amount of resources allocated to your services inside a project. +## Service Resources -:::info -Pricing is minute based, but credit is deducted once per hour based on the usage throughout the hour. -::: +Resources are allocated per service and billed by the minute, though credit is deducted hourly based on actual usage. -### Resource pricing +### Resource Pricing @@ -102,7 +142,7 @@ Pricing is minute based, but credit is deducted once per hour based on the usage
-### Other features +### Additional Features @@ -123,14 +163,15 @@ Pricing is minute based, but credit is deducted once per hour based on the usage
-## Pricing Calculator +:::info IPv4 and Cloudflare +By default, projects start with a shared IPv4 address. If you plan to use Cloudflare's proxy features, you'll need to purchase a unique IPv4 address for your project. +::: - +:::info Object Storage +External storage solution ideal for storing files, backups, and static assets outside your main storage. Perfect for scalable content delivery and backup strategies. +::: -## Hitting the limits +## Pricing Calculator -If you hit the limits of **backup/build/egress** in a project you'll pay: + -- **$0.50** - per **5 GB** of extra backup space -- **$0.50** - per **15 hours** of extra build time -- **$0.10** - per **1 GB** of extra egress diff --git a/apps/docs/sidebars.js b/apps/docs/sidebars.js index 59461f9f..db321e9a 100644 --- a/apps/docs/sidebars.js +++ b/apps/docs/sidebars.js @@ -91,7 +91,7 @@ module.exports = { { type: 'doc', id: 'features/pricing', - label: 'Pricing', + label: 'Pricing Plans & Usage', customProps: { sidebar_icon: 'currency-dollar', }, diff --git a/apps/docs/src/components/PricingCalculator/calculator.css b/apps/docs/src/components/PricingCalculator/calculator.css new file mode 100644 index 00000000..bd1f5f83 --- /dev/null +++ b/apps/docs/src/components/PricingCalculator/calculator.css @@ -0,0 +1,86 @@ +.calculator { + border: 1px solid #e2e8f0; +} + +.calculator-select { + appearance: none; + background-color: #ffffff; + border: 1px solid #e2e8f0; + border-radius: 0.5rem; + padding: 0.5rem 2rem 0.5rem 1rem; + width: 100%; + font-size: 1rem; + line-height: 1.5; + background-image: url("data:image/svg+xml,..."); + /* Add dropdown arrow icon */ + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 1rem; +} + +.calculator-select:focus { + outline: none; + border-color: #3182ce; + box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); +} + + +.number-input { + /* Remove spinner arrows for all browsers */ + -moz-appearance: textfield; + /* Firefox */ + appearance: textfield; +} + +.number-input::-webkit-outer-spin-button, +.number-input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +/* Rest of input styling */ +.number-input { + width: 100%; + padding: 0.5rem 1rem; + border: 1px solid #e2e8f0; + border-radius: 0.5rem; + font-size: 1rem; + line-height: 1.5; + background-color: #ffffff; +} + +.number-input:focus { + outline: none; + border-color: #3182ce; + box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); +} + +input[type="checkbox"] { + width: 1.5rem; + height: 1.5rem; + border: 1px solid #e2e8f0; + border-radius: 0.5rem; + background-color: #ffffff; + cursor: pointer; +} + +input[type="checkbox"]:checked { + background-color: #3182ce; + border-color: #3182ce; + padding: 0.25rem; + background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); + background-size: 1.25rem; +} + +input[type="checkbox"]:focus { + outline: none; + border-color: #3182ce; + box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); +} + +.calculator-label { + padding-bottom: 1rem; + display: block; + font-weight: 500; + color: #4A5568; +} \ No newline at end of file diff --git a/apps/docs/src/components/PricingCalculator/index.tsx b/apps/docs/src/components/PricingCalculator/index.tsx index 93e0b731..5c2f5010 100644 --- a/apps/docs/src/components/PricingCalculator/index.tsx +++ b/apps/docs/src/components/PricingCalculator/index.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { Button, InputText } from 'docs-ui'; +import './calculator.css'; type ResourcesType = { cpu: number; @@ -24,7 +25,7 @@ export default function PricingCalculator() { const price = { cpu: resources.cpuType === 'shared' ? 0.6 : 6, - ram: 0.75, + ram: 3, disk: 0.05, storage: 0.01, ipv4_addr: 3, @@ -33,9 +34,8 @@ export default function PricingCalculator() { const handleAdjust = (name: string, amount: number) => { setResources((prev) => { - const newValue = Number( - ((prev[name as keyof typeof prev] as number) + amount).toFixed(2) - ); + const currentValue = Number(prev[name as keyof typeof prev]); + const newValue = Number((currentValue + amount).toFixed(2)); const minValue = name === 'cpu' ? 1 : 0; return { ...prev, @@ -74,10 +74,10 @@ export default function PricingCalculator() { }; return ( -
-
-
-