From 7734e920297735042bc201f19c98250689c82249 Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Thu, 22 May 2025 13:34:29 -0500 Subject: [PATCH 1/5] Add pricing page --- src/pages/pricing.astro | 306 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 306 insertions(+) create mode 100644 src/pages/pricing.astro diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro new file mode 100644 index 000000000000000..f21d66060be0245 --- /dev/null +++ b/src/pages/pricing.astro @@ -0,0 +1,306 @@ +--- +import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; +import { Card, Tabs, TabItem } from "@astrojs/starlight/components"; +import { Details } from "~/components"; + +const pricingData = { + compute: [ + { + product: "Workers", + description: "Run serverless code at the edge", + components: [ + { name: "Requests", included: "10 million", unit: "per million requests", price: "$0.30" }, + { name: "CPU time", included: "30 million ms", unit: "per million CPU milliseconds", price: "$0.02" }, + ], + link: "/workers/", + }, + { + product: "Workers for Platforms", + description: "Deploy Workers on behalf of your customers", + components: [ + { name: "Requests", included: "20 million", unit: "per million requests", price: "$0.30" }, + { name: "CPU time", included: "60 million ms", unit: "per million CPU milliseconds", price: "$0.02" }, + { name: "Scripts Deployed", included: "1,000", unit: "per script", price: "$0.02" }, + ], + link: "/cloudflare-for-platforms/workers-for-platforms/", + }, + { + product: "Workflows", + description: "Build durable, scalable applications", + components: [ + { name: "Requests", included: "None", unit: "per million requests", price: "$0.30" }, + { name: "CPU time", included: "None", unit: "per million CPU milliseconds", price: "$0.02" }, + { name: "Storage", included: "None", unit: "per GB-month", price: "$0.20" }, + ], + link: "/workflows/", + }, + ], + storage: [ + { + product: "R2", + description: "Object storage with zero egress fees", + components: [ + { name: "Standard Storage", included: "10 GB-month", unit: "per GB-month", price: "$0.015" }, + { name: "Standard Class A operations", included: "1 million", unit: "per million requests", price: "$4.50" }, + { name: "Standard Class B operations", included: "10 million", unit: "per million requests", price: "$0.36" }, + { name: "Infrequent Access Storage", included: "10 GB-month", unit: "per GB-month", price: "$0.015" }, + { name: "Infrequent Access Class A operations", included: "1 million", unit: "per million requests", price: "$9.00" }, + { name: "Infrequent Access Class B operations", included: "10 million", unit: "per million requests", price: "$0.90" }, + { name: "Infrequent Access Data Retrieval", included: "None", unit: "per GB", price: "$0.10" }, + ], + link: "/r2/", + }, + { + product: "Workers KV", + description: "Low-latency key-value data store", + components: [ + { name: "Stored Data", included: "1 GB", unit: "per GB-month", price: "$0.50" }, + { name: "Read Requests", included: "10 million", unit: "per million requests", price: "$0.50" }, + { name: "Write, Delete, List requests", included: "1 million", unit: "per million requests", price: "$5.00" }, + ], + link: "/kv/", + }, + { + product: "D1", + description: "Serverless SQL database", + components: [ + { name: "Storage", included: "None", unit: "per GB-month", price: "$0.75" }, + { name: "Rows read", included: "None", unit: "per million rows", price: "$0.001" }, + { name: "Rows written", included: "None", unit: "per million rows", price: "$1.00" }, + ], + link: "/d1/", + }, + { + product: "Durable Objects", + description: "Stateful serverless applications", + components: [ + { name: "Rows Read", included: "None", unit: "per million rows", price: "$0.0001" }, + { name: "Rows written", included: "None", unit: "per million rows", price: "$1.00" }, + { name: "SQL Stored data", included: "None", unit: "per GB-month", price: "$0.20" }, + { name: "Read request units", included: "None", unit: "per million", price: "$0.20" }, + ], + link: "/durable-objects/", + }, + { + product: "Hyperdrive", + description: "Database connection pooling", + components: [ + { name: "Queries", included: "Unlimited", unit: "", price: "Free" }, + ], + link: "/hyperdrive/", + }, + { + product: "Workers Analytics Engine", + description: "Time-series analytics at scale", + components: [ + { name: "Data points written", included: "10 million", unit: "per million", price: "$0.25" }, + { name: "Read queries", included: "1 million", unit: "per million", price: "$1.00" }, + ], + link: "/analytics/analytics-engine/", + }, + { + product: "Pipelines", + description: "Transform and route data streams", + components: [ + { name: "Ingestion", included: "None", unit: "per GB", price: "$0.02" }, + { name: "Delivery to R2", included: "None", unit: "per GB", price: "$0.02" }, + ], + link: "/pipelines/", + }, + ], + media: [ + { + product: "Realtime", + description: "Live data streaming platform", + components: [ + { name: "Data Egress", included: "None", unit: "per GB", price: "$0.05" }, + ], + link: "/realtime/", + }, + { + product: "Images", + description: "Resize, optimize, and transform images", + components: [ + { name: "Unique transformations", included: "None", unit: "per 1,000", price: "$0.50" }, + { name: "Images Stored", included: "None", unit: "per 100,000", price: "$5.00" }, + { name: "Images Delivered", included: "None", unit: "per 100,000", price: "$1.00" }, + ], + link: "/images/", + }, + { + product: "Stream", + description: "Video streaming platform", + components: [ + { name: "Minutes Stored", included: "None", unit: "per 1,000 minutes", price: "$5.00" }, + { name: "Minutes Delivered", included: "None", unit: "per 1,000 minutes", price: "$1.00" }, + ], + link: "/stream/", + }, + ], + ai: [ + { + product: "AI Gateway", + description: "Unified API for AI providers", + components: [ + { name: "Logs stored", included: "None", unit: "per 100,000 logs/month", price: "$8.00" }, + ], + link: "/ai-gateway/", + }, + { + product: "Vectorize", + description: "Vector database for AI", + components: [ + { name: "Vector dimensions queried", included: "None", unit: "per million", price: "$0.01" }, + { name: "Vector dimensions stored", included: "None", unit: "per 100 million", price: "$0.05" }, + ], + link: "/vectorize/", + }, + { + product: "Workers AI", + description: "Run AI models at the edge", + components: [ + { name: "Neurons", included: "None", unit: "per 1,000 neurons/day", price: "$0.011" }, + ], + link: "/workers-ai/", + }, + ], + other: [ + { + product: "Queues", + description: "Message queuing service", + components: [ + { name: "Standard Operations", included: "None", unit: "per million operations", price: "$0.40" }, + ], + link: "/queues/", + }, + { + product: "Workers Observability", + description: "Monitor Workers performance", + components: [ + { name: "Events", included: "20 million", unit: "per million events", price: "$0.60" }, + ], + link: "/workers/observability/", + }, + { + product: "Workers Builds", + description: "Build Workers at scale", + components: [ + { name: "Build Minutes", included: "None", unit: "per minute", price: "$0.005" }, + ], + link: "/workers/", + }, + { + product: "Zaraz", + description: "Third-party tool manager", + components: [ + { name: "Events", included: "None", unit: "per million events", price: "$5.00" }, + ], + link: "/zaraz/", + }, + ], +}; + +const categories = [ + { id: "compute", name: "Compute", icon: "🚀", data: pricingData.compute }, + { id: "storage", name: "Storage & Data", icon: "💾", data: pricingData.storage }, + { id: "media", name: "Media", icon: "🎬", data: pricingData.media }, + { id: "ai", name: "AI", icon: "🤖", data: pricingData.ai }, + { id: "other", name: "Other Services", icon: "🔧", data: pricingData.other }, +]; +--- + + + + {categories.map((category) => ( + +
+ {category.data.map((product) => ( + +
+
+

{product.description}

+
+ + Learn more → + +
+
+ + + + + + + + + + {product.components.map((component, idx) => ( + + + + + + ))} + +
ComponentIncludedAdditional usage
{component.name} + + {component.included} + + + {component.price !== "Free" ? ( + <> + {component.price} + {component.unit && {component.unit}} + + ) : ( + Free + )} +
+
+
+ ))} +
+
+ ))} +
+ +
+

Frequently Asked Questions

+ +
+

+ You'll be charged $5/month minimum, which covers included usage across all developer products. Any usage beyond the included amounts is charged at the rates shown above. +

+
+ +
+

+ Class A operations include ListBuckets, PutBucket, ListObjects, PutObject, CopyObject, CompleteMultipartUpload, CreateMultipartUpload, ListMultipartUploads, UploadPart, UploadPartCopy, ListParts, PutBucketEncryption, PutBucketCors, and PutBucketLifecycleConfiguration. Class B operations include HeadBucket, HeadObject, GetObject, UsageSummary, GetBucketEncryption, GetBucketLocation, GetBucketCors, and GetBucketLifecycleConfiguration. +

+
+ +
+

+ Neurons are our way of measuring AI compute usage. Different models consume different amounts of neurons based on their complexity and the input size. Check the Workers AI documentation for detailed neuron counts per model. +

+
+ +
+

+ Yes! The included usage shown above is available with the $5/month subscription. Many developers can run their applications entirely within the included usage. +

+
+ +
+

+ Absolutely! All developer products work seamlessly together. For example, you can use Workers with KV, D1, R2, and Queues all in the same application. +

+
+
+
\ No newline at end of file From 3a1139d4b507098a3b74d1993a1894313e607b6f Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Tue, 27 May 2025 13:04:14 -0500 Subject: [PATCH 2/5] Updates --- src/pages/pricing.astro | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro index f21d66060be0245..aec3989ce0f0822 100644 --- a/src/pages/pricing.astro +++ b/src/pages/pricing.astro @@ -235,19 +235,13 @@ const categories = [ Component - Included - Additional usage + Pricing {product.components.map((component, idx) => ( {component.name} - - - {component.included} - - {component.price !== "Free" ? ( <> @@ -273,12 +267,6 @@ const categories = [

Frequently Asked Questions

-
-

- You'll be charged $5/month minimum, which covers included usage across all developer products. Any usage beyond the included amounts is charged at the rates shown above. -

-
-

Class A operations include ListBuckets, PutBucket, ListObjects, PutObject, CopyObject, CompleteMultipartUpload, CreateMultipartUpload, ListMultipartUploads, UploadPart, UploadPartCopy, ListParts, PutBucketEncryption, PutBucketCors, and PutBucketLifecycleConfiguration. Class B operations include HeadBucket, HeadObject, GetObject, UsageSummary, GetBucketEncryption, GetBucketLocation, GetBucketCors, and GetBucketLifecycleConfiguration. @@ -293,7 +281,7 @@ const categories = [

- Yes! The included usage shown above is available with the $5/month subscription. Many developers can run their applications entirely within the included usage. + Cloudflare offers a generous free tier across many products. Check individual product documentation for specific free tier limits.

From 634187d1a251796566919d1d4bd89dc0ea50eb79 Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Wed, 28 May 2025 08:55:52 -0500 Subject: [PATCH 3/5] Remove AI Gateway --- src/pages/pricing.astro | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro index aec3989ce0f0822..748d6895a928770 100644 --- a/src/pages/pricing.astro +++ b/src/pages/pricing.astro @@ -138,14 +138,6 @@ const pricingData = { }, ], ai: [ - { - product: "AI Gateway", - description: "Unified API for AI providers", - components: [ - { name: "Logs stored", included: "None", unit: "per 100,000 logs/month", price: "$8.00" }, - ], - link: "/ai-gateway/", - }, { product: "Vectorize", description: "Vector database for AI", From 5851c3ca785469cb8e198966f5048f749aac4e9b Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Thu, 29 May 2025 10:12:16 -0500 Subject: [PATCH 4/5] Use content collection for pricing --- src/content.config.ts | 5 + src/content/pricing/ai.yaml | 25 ++++ src/content/pricing/compute.yaml | 50 ++++++++ src/content/pricing/media.yaml | 42 ++++++ src/content/pricing/other.yaml | 39 ++++++ src/content/pricing/storage.yaml | 126 ++++++++++++++++++ src/content/products/pricing.yaml | 10 ++ src/pages/pricing.astro | 207 ++---------------------------- src/schemas/index.ts | 1 + src/schemas/pricing.ts | 22 ++++ 10 files changed, 329 insertions(+), 198 deletions(-) create mode 100644 src/content/pricing/ai.yaml create mode 100644 src/content/pricing/compute.yaml create mode 100644 src/content/pricing/media.yaml create mode 100644 src/content/pricing/other.yaml create mode 100644 src/content/pricing/storage.yaml create mode 100644 src/content/products/pricing.yaml create mode 100644 src/schemas/pricing.ts diff --git a/src/content.config.ts b/src/content.config.ts index 7152ad8da779ae3..5f84f06185a3c20 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -15,6 +15,7 @@ import { compatibilityFlagsSchema, glossarySchema, learningPathsSchema, + pricingSchema, videosSchema, workersAiModelsSchema, warpReleasesSchema, @@ -87,6 +88,10 @@ export const collections = { products: defineCollection({ loader: dataLoader("products"), }), + pricing: defineCollection({ + loader: dataLoader("pricing"), + schema: pricingSchema, + }), "workers-ai-models": defineCollection({ loader: dataLoader("workers-ai-models"), schema: workersAiModelsSchema, diff --git a/src/content/pricing/ai.yaml b/src/content/pricing/ai.yaml new file mode 100644 index 000000000000000..669f53be30cd8b3 --- /dev/null +++ b/src/content/pricing/ai.yaml @@ -0,0 +1,25 @@ +category: ai +name: AI +icon: 🤖 +products: + - product: Vectorize + description: Vector database for AI + link: /vectorize/ + components: + - name: Vector dimensions queried + included: None + unit: per million + price: "$0.01" + - name: Vector dimensions stored + included: None + unit: per 100 million + price: "$0.05" + + - product: Workers AI + description: Run AI models at the edge + link: /workers-ai/ + components: + - name: Neurons + included: None + unit: per 1,000 neurons/day + price: "$0.011" \ No newline at end of file diff --git a/src/content/pricing/compute.yaml b/src/content/pricing/compute.yaml new file mode 100644 index 000000000000000..0e2a141cd3e7cd7 --- /dev/null +++ b/src/content/pricing/compute.yaml @@ -0,0 +1,50 @@ +category: compute +name: Compute +icon: 🚀 +products: + - product: Workers + description: Run serverless code at the edge + link: /workers/ + components: + - name: Requests + included: 10 million + unit: per million requests + price: "$0.30" + - name: CPU time + included: 30 million ms + unit: per million CPU milliseconds + price: "$0.02" + + - product: Workers for Platforms + description: Deploy Workers on behalf of your customers + link: /cloudflare-for-platforms/workers-for-platforms/ + components: + - name: Requests + included: 20 million + unit: per million requests + price: "$0.30" + - name: CPU time + included: 60 million ms + unit: per million CPU milliseconds + price: "$0.02" + - name: Scripts Deployed + included: "1,000" + unit: per script + price: "$0.02" + + - product: Workflows + description: Build durable, scalable applications + link: /workflows/ + components: + - name: Requests + included: None + unit: per million requests + price: "$0.30" + - name: CPU time + included: None + unit: per million CPU milliseconds + price: "$0.02" + - name: Storage + included: None + unit: per GB-month + price: "$0.20" \ No newline at end of file diff --git a/src/content/pricing/media.yaml b/src/content/pricing/media.yaml new file mode 100644 index 000000000000000..dba98a519ada989 --- /dev/null +++ b/src/content/pricing/media.yaml @@ -0,0 +1,42 @@ +category: media +name: Media +icon: 🎬 +products: + - product: Realtime + description: Live data streaming platform + link: /realtime/ + components: + - name: Data Egress + included: None + unit: per GB + price: "$0.05" + + - product: Images + description: Resize, optimize, and transform images + link: /images/ + components: + - name: Unique transformations + included: None + unit: per 1,000 + price: "$0.50" + - name: Images Stored + included: None + unit: per 100,000 + price: "$5.00" + - name: Images Delivered + included: None + unit: per 100,000 + price: "$1.00" + + - product: Stream + description: Video streaming platform + link: /stream/ + components: + - name: Minutes Stored + included: None + unit: per 1,000 minutes + price: "$5.00" + - name: Minutes Delivered + included: None + unit: per 1,000 minutes + price: "$1.00" \ No newline at end of file diff --git a/src/content/pricing/other.yaml b/src/content/pricing/other.yaml new file mode 100644 index 000000000000000..7e4d290805f8c71 --- /dev/null +++ b/src/content/pricing/other.yaml @@ -0,0 +1,39 @@ +category: other +name: Other Services +icon: 🔧 +products: + - product: Queues + description: Message queuing service + link: /queues/ + components: + - name: Standard Operations + included: None + unit: per million operations + price: "$0.40" + + - product: Workers Observability + description: Monitor Workers performance + link: /workers/observability/ + components: + - name: Events + included: 20 million + unit: per million events + price: "$0.60" + + - product: Workers Builds + description: Build Workers at scale + link: /workers/ + components: + - name: Build Minutes + included: None + unit: per minute + price: "$0.005" + + - product: Zaraz + description: Third-party tool manager + link: /zaraz/ + components: + - name: Events + included: None + unit: per million events + price: "$5.00" \ No newline at end of file diff --git a/src/content/pricing/storage.yaml b/src/content/pricing/storage.yaml new file mode 100644 index 000000000000000..81a5650f0bcd83c --- /dev/null +++ b/src/content/pricing/storage.yaml @@ -0,0 +1,126 @@ +category: storage +name: Storage & Data +icon: 💾 +products: + - product: R2 + description: Object storage with zero egress fees + link: /r2/ + components: + - name: Standard Storage + included: 10 GB-month + unit: per GB-month + price: "$0.015" + - name: Standard Class A operations + included: 1 million + unit: per million requests + price: "$4.50" + - name: Standard Class B operations + included: 10 million + unit: per million requests + price: "$0.36" + - name: Infrequent Access Storage + included: 10 GB-month + unit: per GB-month + price: "$0.015" + - name: Infrequent Access Class A operations + included: 1 million + unit: per million requests + price: "$9.00" + - name: Infrequent Access Class B operations + included: 10 million + unit: per million requests + price: "$0.90" + - name: Infrequent Access Data Retrieval + included: None + unit: per GB + price: "$0.10" + + - product: Workers KV + description: Low-latency key-value data store + link: /kv/ + components: + - name: Stored Data + included: 1 GB + unit: per GB-month + price: "$0.50" + - name: Read Requests + included: 10 million + unit: per million requests + price: "$0.50" + - name: Write, Delete, List requests + included: 1 million + unit: per million requests + price: "$5.00" + + - product: D1 + description: Serverless SQL database + link: /d1/ + components: + - name: Storage + included: None + unit: per GB-month + price: "$0.75" + - name: Rows read + included: None + unit: per million rows + price: "$0.001" + - name: Rows written + included: None + unit: per million rows + price: "$1.00" + + - product: Durable Objects + description: Stateful serverless applications + link: /durable-objects/ + components: + - name: Rows Read + included: None + unit: per million rows + price: "$0.0001" + - name: Rows written + included: None + unit: per million rows + price: "$1.00" + - name: SQL Stored data + included: None + unit: per GB-month + price: "$0.20" + - name: Read request units + included: None + unit: per million + price: "$0.20" + + - product: Hyperdrive + description: Database connection pooling + link: /hyperdrive/ + components: + - name: Queries + included: Unlimited + unit: "" + price: Free + + - product: Workers Analytics Engine + description: Time-series analytics at scale + link: /analytics/analytics-engine/ + components: + - name: Data points written + included: 10 million + unit: per million + price: "$0.25" + - name: Read queries + included: 1 million + unit: per million + price: "$1.00" + + - product: Pipelines + description: Transform and route data streams + link: /pipelines/ + components: + - name: Ingestion + included: None + unit: per GB + price: "$0.02" + - name: Delivery to R2 + included: None + unit: per GB + price: "$0.02" \ No newline at end of file diff --git a/src/content/products/pricing.yaml b/src/content/products/pricing.yaml new file mode 100644 index 000000000000000..7dc85e92b8cacf0 --- /dev/null +++ b/src/content/products/pricing.yaml @@ -0,0 +1,10 @@ +name: Pricing + +product: + title: Pricing + url: /pricing/ + show: false + +meta: + title: Cloudflare Developer Platform Pricing + description: Simple, transparent pricing for Cloudflare's developer products. Pay only for what you use. \ No newline at end of file diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro index 748d6895a928770..68dd155f709480e 100644 --- a/src/pages/pricing.astro +++ b/src/pages/pricing.astro @@ -1,204 +1,15 @@ --- +import { getCollection } from "astro:content"; import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; import { Card, Tabs, TabItem } from "@astrojs/starlight/components"; import { Details } from "~/components"; -const pricingData = { - compute: [ - { - product: "Workers", - description: "Run serverless code at the edge", - components: [ - { name: "Requests", included: "10 million", unit: "per million requests", price: "$0.30" }, - { name: "CPU time", included: "30 million ms", unit: "per million CPU milliseconds", price: "$0.02" }, - ], - link: "/workers/", - }, - { - product: "Workers for Platforms", - description: "Deploy Workers on behalf of your customers", - components: [ - { name: "Requests", included: "20 million", unit: "per million requests", price: "$0.30" }, - { name: "CPU time", included: "60 million ms", unit: "per million CPU milliseconds", price: "$0.02" }, - { name: "Scripts Deployed", included: "1,000", unit: "per script", price: "$0.02" }, - ], - link: "/cloudflare-for-platforms/workers-for-platforms/", - }, - { - product: "Workflows", - description: "Build durable, scalable applications", - components: [ - { name: "Requests", included: "None", unit: "per million requests", price: "$0.30" }, - { name: "CPU time", included: "None", unit: "per million CPU milliseconds", price: "$0.02" }, - { name: "Storage", included: "None", unit: "per GB-month", price: "$0.20" }, - ], - link: "/workflows/", - }, - ], - storage: [ - { - product: "R2", - description: "Object storage with zero egress fees", - components: [ - { name: "Standard Storage", included: "10 GB-month", unit: "per GB-month", price: "$0.015" }, - { name: "Standard Class A operations", included: "1 million", unit: "per million requests", price: "$4.50" }, - { name: "Standard Class B operations", included: "10 million", unit: "per million requests", price: "$0.36" }, - { name: "Infrequent Access Storage", included: "10 GB-month", unit: "per GB-month", price: "$0.015" }, - { name: "Infrequent Access Class A operations", included: "1 million", unit: "per million requests", price: "$9.00" }, - { name: "Infrequent Access Class B operations", included: "10 million", unit: "per million requests", price: "$0.90" }, - { name: "Infrequent Access Data Retrieval", included: "None", unit: "per GB", price: "$0.10" }, - ], - link: "/r2/", - }, - { - product: "Workers KV", - description: "Low-latency key-value data store", - components: [ - { name: "Stored Data", included: "1 GB", unit: "per GB-month", price: "$0.50" }, - { name: "Read Requests", included: "10 million", unit: "per million requests", price: "$0.50" }, - { name: "Write, Delete, List requests", included: "1 million", unit: "per million requests", price: "$5.00" }, - ], - link: "/kv/", - }, - { - product: "D1", - description: "Serverless SQL database", - components: [ - { name: "Storage", included: "None", unit: "per GB-month", price: "$0.75" }, - { name: "Rows read", included: "None", unit: "per million rows", price: "$0.001" }, - { name: "Rows written", included: "None", unit: "per million rows", price: "$1.00" }, - ], - link: "/d1/", - }, - { - product: "Durable Objects", - description: "Stateful serverless applications", - components: [ - { name: "Rows Read", included: "None", unit: "per million rows", price: "$0.0001" }, - { name: "Rows written", included: "None", unit: "per million rows", price: "$1.00" }, - { name: "SQL Stored data", included: "None", unit: "per GB-month", price: "$0.20" }, - { name: "Read request units", included: "None", unit: "per million", price: "$0.20" }, - ], - link: "/durable-objects/", - }, - { - product: "Hyperdrive", - description: "Database connection pooling", - components: [ - { name: "Queries", included: "Unlimited", unit: "", price: "Free" }, - ], - link: "/hyperdrive/", - }, - { - product: "Workers Analytics Engine", - description: "Time-series analytics at scale", - components: [ - { name: "Data points written", included: "10 million", unit: "per million", price: "$0.25" }, - { name: "Read queries", included: "1 million", unit: "per million", price: "$1.00" }, - ], - link: "/analytics/analytics-engine/", - }, - { - product: "Pipelines", - description: "Transform and route data streams", - components: [ - { name: "Ingestion", included: "None", unit: "per GB", price: "$0.02" }, - { name: "Delivery to R2", included: "None", unit: "per GB", price: "$0.02" }, - ], - link: "/pipelines/", - }, - ], - media: [ - { - product: "Realtime", - description: "Live data streaming platform", - components: [ - { name: "Data Egress", included: "None", unit: "per GB", price: "$0.05" }, - ], - link: "/realtime/", - }, - { - product: "Images", - description: "Resize, optimize, and transform images", - components: [ - { name: "Unique transformations", included: "None", unit: "per 1,000", price: "$0.50" }, - { name: "Images Stored", included: "None", unit: "per 100,000", price: "$5.00" }, - { name: "Images Delivered", included: "None", unit: "per 100,000", price: "$1.00" }, - ], - link: "/images/", - }, - { - product: "Stream", - description: "Video streaming platform", - components: [ - { name: "Minutes Stored", included: "None", unit: "per 1,000 minutes", price: "$5.00" }, - { name: "Minutes Delivered", included: "None", unit: "per 1,000 minutes", price: "$1.00" }, - ], - link: "/stream/", - }, - ], - ai: [ - { - product: "Vectorize", - description: "Vector database for AI", - components: [ - { name: "Vector dimensions queried", included: "None", unit: "per million", price: "$0.01" }, - { name: "Vector dimensions stored", included: "None", unit: "per 100 million", price: "$0.05" }, - ], - link: "/vectorize/", - }, - { - product: "Workers AI", - description: "Run AI models at the edge", - components: [ - { name: "Neurons", included: "None", unit: "per 1,000 neurons/day", price: "$0.011" }, - ], - link: "/workers-ai/", - }, - ], - other: [ - { - product: "Queues", - description: "Message queuing service", - components: [ - { name: "Standard Operations", included: "None", unit: "per million operations", price: "$0.40" }, - ], - link: "/queues/", - }, - { - product: "Workers Observability", - description: "Monitor Workers performance", - components: [ - { name: "Events", included: "20 million", unit: "per million events", price: "$0.60" }, - ], - link: "/workers/observability/", - }, - { - product: "Workers Builds", - description: "Build Workers at scale", - components: [ - { name: "Build Minutes", included: "None", unit: "per minute", price: "$0.005" }, - ], - link: "/workers/", - }, - { - product: "Zaraz", - description: "Third-party tool manager", - components: [ - { name: "Events", included: "None", unit: "per million events", price: "$5.00" }, - ], - link: "/zaraz/", - }, - ], -}; - -const categories = [ - { id: "compute", name: "Compute", icon: "🚀", data: pricingData.compute }, - { id: "storage", name: "Storage & Data", icon: "💾", data: pricingData.storage }, - { id: "media", name: "Media", icon: "🎬", data: pricingData.media }, - { id: "ai", name: "AI", icon: "🤖", data: pricingData.ai }, - { id: "other", name: "Other Services", icon: "🔧", data: pricingData.other }, -]; +const pricingCategories = await getCollection("pricing"); +const categories = pricingCategories.sort((a, b) => { + // Define category order + const order = ["compute", "storage", "media", "ai", "other"]; + return order.indexOf(a.data.category) - order.indexOf(b.data.category); +}); --- {categories.map((category) => ( - +
- {category.data.map((product) => ( + {category.data.products.map((product) => (
diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 96693979e79f407..812eb50bbbdaa6b 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -10,6 +10,7 @@ export * from "./notifications"; export * from "./pages-build-environment"; export * from "./pages-framework-presets"; export * from "./partials"; +export * from "./pricing"; export * from "./videos"; export * from "./warp-releases"; export * from "./workers-ai-models"; diff --git a/src/schemas/pricing.ts b/src/schemas/pricing.ts new file mode 100644 index 000000000000000..ec01a11800bae07 --- /dev/null +++ b/src/schemas/pricing.ts @@ -0,0 +1,22 @@ +import { z } from "astro:schema"; + +const pricingComponentSchema = z.object({ + name: z.string(), + included: z.string(), + unit: z.string(), + price: z.string(), +}); + +const pricingProductSchema = z.object({ + product: z.string(), + description: z.string(), + link: z.string(), + components: z.array(pricingComponentSchema), +}); + +export const pricingSchema = z.object({ + category: z.string(), + name: z.string(), + icon: z.string(), + products: z.array(pricingProductSchema), +}); \ No newline at end of file From 1755379426263a6d22a63dfaac755824c2ad990f Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Thu, 29 May 2025 13:00:23 -0500 Subject: [PATCH 5/5] Fix linter --- src/schemas/pricing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schemas/pricing.ts b/src/schemas/pricing.ts index ec01a11800bae07..578542313061cf9 100644 --- a/src/schemas/pricing.ts +++ b/src/schemas/pricing.ts @@ -19,4 +19,4 @@ export const pricingSchema = z.object({ name: z.string(), icon: z.string(), products: z.array(pricingProductSchema), -}); \ No newline at end of file +});