Skip to content

Dashboard Stack

A comprehensive guide to building a modern, performant dashboard application using cutting-edge technologies optimized for edge computing and real-time data visualization.

  • Framework: React 19 + TypeScript
  • Build Tool: Bun
  • Routing: TanStack Router
  • UI Library: shadcn/ui (Tailwind CSS + Radix UI + Lucide Icons)
  • State Management: Zustand
  • Data Fetching: TanStack Query (React Query)
  • Forms: React Hook Form + Zod
  • Tables: TanStack Table
  • Charts: Recharts + Tremor
  • API Framework: Hono (Cloudflare Workers)
  • Database: Drizzle ORM + Neon PostgreSQL
  • Storage: Cloudflare R2 (Object Storage)
  • Analytics: ClickHouse
  • Real-time: WebSocket (Durable Objects)
  • Authentication: Better Auth
  • Deployment: Cloudflare Workers + Cloudflare Pages
  • Monitoring: Sentry Edge SDK
  • CI/CD: GitHub Actions
  • Linting: ESLint + Prettier
  • Testing: Bun + React Testing Library

This tech stack is designed for building high-performance, real-time dashboards deployed on the edge with:

  • Serverless-first architecture (Cloudflare Workers)
  • Real-time data capabilities (WebSocket)
  • Analytics processing (ClickHouse)
  • Type-safe, modern DX (TypeScript, Bun)

  • Latest features: React Server Components, improved Suspense, automatic batching
  • Performance: Smaller bundle sizes, faster hydration
  • Ecosystem: Largest component library ecosystem
  • Type Safety: First-class TypeScript support
FeatureReact 19Vue 3SvelteSolid.js
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Ecosystem⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Learning Curve⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Dashboard Libraries⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun create vite my-dashboard --template react-ts

  • Speed: 4x faster than npm, 3x faster than pnpm
  • All-in-one: Runtime + bundler + package manager + test runner
  • Native TypeScript: No transpilation needed
  • Node.js compatible: Drop-in replacement
ToolInstall SpeedBuild SpeedRuntimeTest Runner
BunπŸš€ FastestπŸš€ Fastestβœ… Yesβœ… Yes
pnpm⚑ Fast-❌ No❌ No
npm🐌 Slow-❌ No❌ No
Vite-⚑ Fast❌ No❌ No
  1. Install Bun

    Terminal window
    curl -fsSL https://bun.sh/install | bash
  2. Verify installation

    Terminal window
    bun --version
  3. Create new project

    Terminal window
    bun create vite my-dashboard
    cd my-dashboard
    bun install

  • Type-safe: Fully typed routes, params, and search params
  • Built-in data loading: Loader pattern with suspense
  • Code splitting: Automatic route-based splitting
  • Developer Experience: Best-in-class TypeScript DX
FeatureTanStack RouterReact Router v6Next.js RouterRemix
Type Safety⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Data Loading⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Flexibility⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add @tanstack/react-router
bun add -D @tanstack/router-devtools @tanstack/router-vite-plugin

  • TypeScript-first: Fully type-safe queries
  • Lightweight: 10kb bundle size (vs 80kb Prisma)
  • Edge-compatible: Works with Cloudflare Workers
  • SQL-like: Direct SQL mapping, no magic
  • Serverless: Pay-per-use, auto-scaling
  • HTTP driver: Works with edge runtimes (no TCP)
  • Fast cold starts: Database branching for dev/staging
  • PostgreSQL compatible: Full Postgres features

ORM Comparison:

FeatureDrizzlePrismaTypeORMKysely
Edge Supportβœ… Yes❌ No❌ Noβœ… Yes
Type Safety⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size10kb80kb120kb15kb
SQL-like⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

Database Comparison:

FeatureNeonSupabasePlanetScaleRailway
Serverlessβœ… Yesβœ… Yesβœ… Yes❌ No
Edge Runtimeβœ… HTTPβœ… HTTPβœ… HTTP❌ TCP
Branchingβœ… Yes❌ Noβœ… Yes❌ No
Free Tier⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
  1. Install Drizzle

    Terminal window
    bun add drizzle-orm @neondatabase/serverless
    bun add -D drizzle-kit
  2. Install Neon CLI optional

    Terminal window
    bun add -D @neondatabase/cli
  3. Setup Drizzle config

    drizzle.config.ts
    import type { Config } from 'drizzle-kit';
    export default {
    schema: './src/db/schema.ts',
    out: './drizzle',
    driver: 'pg',
    dbCredentials: {
    connectionString: process.env.DATABASE_URL!,
    },
    } satisfies Config;

  • Smart caching: Automatic background refetching
  • Optimistic updates: UI updates before server response
  • Devtools: Visual query debugging
  • Edge-optimized: Works perfectly with serverless APIs
FeatureTanStack QuerySWRApollo ClientRTK Query
REST API⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
GraphQL⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size13kb4kb32kb18kb
Features⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
DX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add @tanstack/react-query
bun add -D @tanstack/react-query-devtools

  • Performance: Uncontrolled components, minimal re-renders
  • Small bundle: 9kb gzipped
  • Easy validation: Native HTML5 + custom validators
  • Great DX: Simple API, TypeScript support
  • Type inference: Schema creates TypeScript types automatically
  • Runtime validation: Parse and validate at runtime
  • Composable: Reusable schemas
  • Error messages: Detailed, customizable errors

Form Libraries:

FeatureReact Hook FormFormikReact Final Form
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size9kb13kb11kb
TypeScript⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
DX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

Validation Libraries:

FeatureZodYupJoiAjv
TypeScript⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size10kb17kb146kb38kb
DX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add react-hook-form zod @hookform/resolvers

  • Copy-paste components: Own your code, no npm bloat
  • Radix primitives: Accessible, unstyled components
  • Tailwind styling: Utility-first, customizable
  • Lucide icons: Beautiful, consistent icon set
  • shadcn/ui: Component patterns
  • Radix UI: Accessible primitives (Dialog, Dropdown, etc.)
  • Tailwind CSS: Styling system
  • Lucide React: Icon library
Featureshadcn/uiMaterial UIChakra UIMantine
Customization⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Control⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Accessibility⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Dashboard Ready⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
No Runtime Deps⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
  1. Install dependencies

    Terminal window
    bun add tailwindcss autoprefixer postcss
    bun add tailwindcss-animate class-variance-authority clsx tailwind-merge
    bun add @radix-ui/react-* lucide-react
  2. Initialize shadcn/ui

    Terminal window
    bunx shadcn-ui@latest init
  3. Add components as needed

    Terminal window
    bunx shadcn-ui@latest add button
    bunx shadcn-ui@latest add card
    bunx shadcn-ui@latest add table

  • Minimal: 1kb bundle size
  • Simple API: No boilerplate
  • No Context: Avoids re-render issues
  • DevTools: Redux DevTools integration
FeatureZustandRedux ToolkitJotaiRecoil
Bundle Size1kb11kb3kb14kb
Learning Curve⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Boilerplate⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
DevToolsβœ… Yesβœ… Yesβœ… Yesβœ… Yes
TypeScript⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add zustand

  • Headless: Bring your own UI
  • Feature-rich: Sorting, filtering, pagination, virtualization
  • TypeScript-first: Fully typed
  • Framework agnostic: Works with React, Vue, Solid, Svelte
FeatureTanStack TableAG GridReact Table v7MUI DataGrid
Free Features⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Customization⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size15kb150kb+14kb80kb
LicenseMITCommercialMITCommercial
Terminal window
bun add @tanstack/react-table

  • React-native: Built for React
  • Composable: Component-based API
  • Responsive: Mobile-friendly
  • D3 powered: Built on D3.js
  • Dashboard-focused: Pre-built dashboard components
  • Modern design: Beautiful out-of-the-box
  • Tailwind-based: Easy customization
  • Analytics optimized: KPI cards, metric charts, etc.
FeatureRechartsChart.jsVictoryTremor
React Native⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Customization⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Dashboard Ready⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size96kb60kb200kb120kb
Terminal window
bun add recharts

  • Ultrafast: Faster than Express, Fastify
  • Edge-first: Built for Cloudflare Workers
  • Small: 12kb bundle size
  • Type-safe: RPC client with full type inference
FeatureHonoExpressFastifytRPC
Edge Support⭐⭐⭐⭐⭐❌ No❌ No⭐⭐⭐⭐
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Type Safety⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Bundle Size12kb40kb35kb30kb
Learning Curve⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun create hono my-api
cd my-api

  • Framework agnostic: Works with any framework
  • Edge compatible: Runs on Cloudflare Workers
  • Type-safe: Full TypeScript support
  • Modern: Built for modern web standards
FeatureBetter AuthAuth.jsClerkSupabase Auth
Edge Support⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Self-hostedβœ… Yesβœ… Yes❌ No⭐⭐⭐
Free Tier⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Customization⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
DX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add better-auth

  • Full-duplex: Bi-directional communication
  • Low latency: Real-time updates
  • Efficient: Less overhead than polling
  • Standard: Native browser support
FeatureWebSocketServer-Sent EventsPollingSocket.io
Bi-directionalβœ… Yes❌ Noβœ… Yesβœ… Yes
Low Latency⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Browser Support⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Edge Support⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
OverheadLowLowHighMedium
wrangler.toml
[[durable_objects.bindings]]
name = "WEBSOCKET"
class_name = "WebSocketDurableObject"

  • OLAP optimized: Column-oriented for analytics
  • Fast queries: 100-1000x faster than PostgreSQL for analytics
  • Real-time: Streaming inserts
  • SQL compatible: Standard SQL syntax
  • Real-time analytics dashboards
  • Time-series data (metrics, logs)
  • Event tracking and user behavior
  • Business intelligence queries
FeatureClickHousePostgreSQLTimescaleDBDruid
Analytics Speed⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Real-time⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
SQL Support⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Scalability⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Ease of Use⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

Sign up at: https://clickhouse.com/cloud

Then install client:

Terminal window
bun add @clickhouse/client

  • Edge network: Deploy to 300+ cities worldwide
  • Fast cold starts: <1ms initialization
  • Free tier: 100k requests/day
  • Integrated: KV, R2, D1, Durable Objects, Analytics
  • Workers: Serverless functions (API)
  • Pages: Static site hosting (Frontend)
  • Durable Objects: Stateful coordination (WebSocket)
  • R2: Object storage
  • D1: SQLite edge database
FeatureCloudflareVercelNetlifyAWS Lambda
Edge Network⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Cold Start<1ms~50ms~100ms~200ms
Free Tier⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
WebSocket⭐⭐⭐⭐⭐❌ No❌ No⭐⭐⭐⭐
Pricing⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
  1. Install Wrangler CLI

    Terminal window
    bun add -g wrangler
  2. Login

    Terminal window
    wrangler login
  3. Create Workers project

    Terminal window
    wrangler init my-api
  4. Create Pages project

    Terminal window
    wrangler pages create my-dashboard
  5. Deploy

    Terminal window
    wrangler deploy

  • Error tracking: Automatic error capture
  • Performance monitoring: APM for edge functions
  • Release tracking: Track deployments
  • Edge compatible: Works with Cloudflare Workers
FeatureSentryLogRocketDatadogRollbar
Edge Support⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Error Tracking⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Performance⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Free Tier⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
DX⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
Terminal window
bun add @sentry/react @sentry/browser

  • S3-compatible: Drop-in replacement for AWS S3
  • Zero egress fees: No charges for data transfer out
  • Edge optimization: Global distribution
  • Cost-effective: $0.015/GB storage vs $0.023/GB S3
  • User uploads (images, documents)
  • Static asset storage
  • Backups and archives
  • Media files for dashboards
FeatureCloudflare R2AWS S3Backblaze B2Wasabi
Storage Cost$0.015/GB$0.023/GB$0.006/GB$0.0059/GB
Egress Cost$0 (Free)$0.09/GB$0.01/GB$0 (Free)
Free Tier10 GB storage5 GB (12 months)10 GBNone
API Calls (Write)$4.50/1M$5/1M$0.01/1KIncluded
API Calls (Read)$0.36/1M$0.40/1MFreeIncluded
Global CDNβœ… Built-in⚠️ Via CloudFront❌ No❌ No
S3 Compatibleβœ… Yesβœ… Nativeβœ… Yesβœ… Yes
Min Storage DurationNone30 daysNone90 days
Edge Networkβœ… 300+ cities⚠️ CloudFront❌ Limited❌ Limited
  1. Create R2 Bucket

    Terminal window
    # Using Wrangler
    npx wrangler r2 bucket create my-bucket
  2. Configure in wrangler.toml

    [[r2_buckets]]
    binding = "MY_BUCKET"
    bucket_name = "my-bucket"
  3. Use in Workers

    export default {
    async fetch(request, env) {
    // Upload file
    await env.MY_BUCKET.put('file.txt', 'content')
    // Get file
    const object = await env.MY_BUCKET.get('file.txt')
    return new Response(await object.text())
    }
    }

  1. Initialize Project

    Terminal window
    bun create vite my-dashboard --template react-ts
    cd my-dashboard
  2. Install Core Dependencies

    Terminal window
    # Routing & Data Fetching
    bun add @tanstack/react-router @tanstack/react-query
    bun add @tanstack/router-vite-plugin @tanstack/react-query-devtools
    # Forms & Validation
    bun add react-hook-form zod @hookform/resolvers
    # UI Components
    bun add tailwindcss autoprefixer postcss
    bun add @radix-ui/react-dialog @radix-ui/react-dropdown-menu
    bun add lucide-react class-variance-authority clsx tailwind-merge
    # State Management
    bun add zustand
    # Tables & Charts
    bun add @tanstack/react-table recharts @tremor/react
    # Database
    bun add drizzle-orm @neondatabase/serverless
    bun add -D drizzle-kit
  3. Setup Cloudflare Workers API

    Terminal window
    # Create API project
    bun create hono my-api
    cd my-api
    # Install dependencies
    bun add hono better-auth @clickhouse/client
    bun add -D wrangler
  4. Initialize shadcn/ui

    Terminal window
    bunx shadcn-ui@latest init
    bunx shadcn-ui@latest add button card table dialog
  5. Setup Database

    Terminal window
    # Add to .env
    echo "DATABASE_URL=postgresql://..." > .env
    # Generate migrations
    bun drizzle-kit generate:pg
    bun drizzle-kit push:pg
  6. Deploy

    Terminal window
    wrangler pages publish dist

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Browser β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ React 19 + TypeScript + TanStack Router β”‚ β”‚
β”‚ β”‚ shadcn/ui + Tailwind + Recharts + Tremor β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”‚ HTTPS / WebSocket
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Cloudflare Edge Network β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Pages (SPA) β”‚ β”‚ Workers (Hono API) β”‚ β”‚
β”‚ β”‚ - Static │◄──────►│ - Better Auth β”‚ β”‚
β”‚ β”‚ - React App β”‚ β”‚ - Real-time WebSocket β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Durable Objects β”‚ β”‚ β”‚
β”‚ β”‚ - WebSocket state management β”‚ β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚ β”‚
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Neon β”‚ β”‚ClickHouseβ”‚ β”‚ Sentry β”‚
β”‚PostgreSQL β”‚ β”‚Analytics β”‚ β”‚ Monitoring β”‚
β”‚(Drizzle) β”‚ β”‚ β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MetricTargetActual
First Contentful Paint<1.0s~0.8s
Time to Interactive<2.5s~2.1s
API Response (edge)<50ms~30ms
Database Query (Neon)<100ms~80ms
Analytics Query (ClickHouse)<500ms~300ms
WebSocket Latency<50ms~20ms
Bundle Size (initial)<200kb~180kb



Quick overview of costs for each service in the stack:

ServiceCategoryFree TierPaid Plan StartsBest For
Cloudflare WorkersHosting100k req/day$5/mo (10M req)Edge computing
Cloudflare PagesFrontendUnlimited builds$20/mo (5k builds)Static hosting
Cloudflare R2Storage10 GB/month$0.015/GBObject storage
Neon PostgreSQLDatabase10 GB storage$19/mo (Unlimited)Serverless DB
ClickHouse CloudAnalytics30-day trial$51/mo (100 GB)Time-series data
SentryMonitoring5k errors/mo$26/mo (50k errors)Error tracking
Better AuthAuthenticationSelf-hosted (Free)N/AOpen source

FeatureCloudflare WorkersVercelNetlifyAWS Lambda
Free Tier Requests100,000/day100 GB bandwidth100 GB bandwidth1M requests/mo
Free Tier Build TimeUnlimited6,000 min/mo300 min/moN/A
Paid Tier Price$5/mo$20/mo$19/moPay-per-use
Included Requests10M requestsUnlimitedUnlimitedN/A
Overage Cost$0.50/1M req$40/100 GB$55/100 GB$0.20/1M req
Edge Locations300+ cities100+ cities100+ cities30+ regions
Cold Start<1ms~50ms~100ms~200ms
Max Request Time30s (free), 15min (paid)10s (hobby), 60s (pro)10s (free), 26s (paid)15min
WebSocket Supportβœ… Yes (Durable Objects)❌ No❌ Noβœ… Yes
Custom DomainsUnlimited1 (hobby), Unlimited (pro)1 (free), Unlimited (paid)Manual setup
Best ForEdge APIs, real-timeFull-stack appsStatic sitesAWS ecosystem
FeatureNeon PostgreSQLSupabasePlanetScaleRailway
Free Tier Storage10 GB500 MB5 GB5 GB
Free Tier Compute100 hrs/moUnlimitedUnlimited500 hrs/mo
Paid Tier Price$19/mo$25/mo$39/mo$5/mo
Included StorageUnlimited8 GB25 GB10 GB
Overage CostIncluded$0.125/GB$1.50/GB$0.25/GB
Branchingβœ… Yes❌ Noβœ… Yes❌ No
Edge Supportβœ… HTTP driverβœ… HTTP/WebSocketβœ… HTTP❌ TCP only
Auto-scalingβœ… Yes⚠️ Limitedβœ… Yes❌ No
Backup Retention7 days7 days30 days7 days
Max ConnectionsUnlimited (pooler)60 (free), 200 (paid)10k (pooler)100
Database TypePostgreSQL 16PostgreSQL 15MySQL 8PostgreSQL/MySQL
Best ForServerless appsAll-in-one platformMySQL at scaleQuick deployments
FeatureClickHouse CloudSentryDatadogLogRocket
Free Tier30-day trial5k errors/mo14-day trial1k sessions/mo
Starter Price$51/mo$26/mo$15/host/mo$99/mo
Included Volume100 GB storage50k errors5 hosts10k sessions
Overage Cost$0.51/GB$0.000533/errorCustom$0.01/session
Data Retention30 days90 days15 days30 days
Query Performance⭐⭐⭐⭐⭐N/A⭐⭐⭐⭐N/A
Real-time Updatesβœ… Yesβœ… Yesβœ… Yesβœ… Yes
API Accessβœ… Yesβœ… Yesβœ… Yesβœ… Yes
Edge Compatibleβœ… Yesβœ… Yesβœ… Yes⚠️ Limited
Self-hosted Optionβœ… Yes (OSS)βœ… Yes (OSS)❌ No❌ No
Best ForOLAP queriesError trackingInfrastructureUser sessions
FeatureBetter AuthClerkAuth0Supabase Auth
Free TierUnlimited (self-hosted)10k MAU7.5k MAU50k MAU
Paid Tier Price$0 (OSS)$25/mo$23/moIncluded in DB
Included UsersUnlimited25k MAU25k MAUUnlimited
Overage CostN/A$0.02/MAU$0.0175/MAUN/A
Social OAuthβœ… Yesβœ… Yesβœ… Yesβœ… Yes
MFA/2FAβœ… Yesβœ… Yesβœ… Yesβœ… Yes
Passwordlessβœ… Yesβœ… Yesβœ… Yesβœ… Yes
Custom UIβœ… Full control⚠️ Limited⚠️ Limitedβœ… Full control
Edge Compatibleβœ… Yesβœ… Yesβœ… Yesβœ… Yes
Self-hostedβœ… Yes❌ No❌ Noβœ… Yes
Session Managementβœ… Yesβœ… Yesβœ… Yesβœ… Yes
Best ForFull controlQuick setupEnterpriseSupabase users


  • Traffic: 10k requests/day (~300k/month)
  • Database: 2 GB storage, 20 hrs compute/mo
  • Storage: 2 GB files in R2
  • Errors: 1k errors/month
  • Total Cost: $0/month (100% free tier)
    • Cloudflare Workers: $0 (under 100k req/day)
    • Cloudflare Pages: $0 (unlimited)
    • Cloudflare R2: $0 (under 10 GB free tier)
    • Neon PostgreSQL: $0 (under 10 GB + 100 hrs)
    • ClickHouse: $0 (not needed yet)
    • Sentry: $0 (under 5k errors)
  • Traffic: 500k requests/day (~15M/month)
  • Database: 25 GB storage, 200 hrs compute/mo
  • Storage: 50 GB files in R2
  • Analytics: 50 GB ClickHouse data
  • Errors: 15k errors/month
  • Total Cost: ~$130/month
    • Cloudflare Workers: $5 (10M req included) + $2.50 (5M overage) = $7.50
    • Cloudflare Pages: $0
    • Cloudflare R2: $0.60 (40 GB Γ— $0.015) = $0.60
    • Neon PostgreSQL: $19 (Launch plan)
    • ClickHouse: $51 (Development tier, 100 GB)
    • Sentry: $0 (under 5k errors) or $26 if >5k = $26
    • Better Auth: $0 (self-hosted)
  • Traffic: 5M requests/day (~150M/month)
  • Database: 100 GB storage, unlimited compute
  • Storage: 200 GB files in R2
  • Analytics: 500 GB ClickHouse data
  • Errors: 200k errors/month
  • Total Cost: ~$491/month
    • Cloudflare Workers: $5 + $70 (140M overage Γ— $0.50/1M) = $75
    • Cloudflare Pages: $0
    • Cloudflare R2: $2.85 (190 GB Γ— $0.015) = $2.85
    • Neon PostgreSQL: $69 (Scale plan)
    • ClickHouse: $306 (500 GB Γ— $0.51 + $51 base) = $306
    • Sentry: $26 (Team plan, 50k errors) + overage = $38
    • Better Auth: $0 (self-hosted)
  • Traffic: 50M requests/day (~1.5B/month)
  • Database: 500 GB storage, unlimited compute
  • Storage: 1 TB files in R2
  • Analytics: 2 TB ClickHouse data
  • Errors: 1M errors/month
  • Total Cost: ~$2,200/month
    • Cloudflare Workers: $5 + $745 (1,490M overage Γ— $0.50/1M) = $750
    • Cloudflare Pages: $0
    • Cloudflare R2: $14.85 (990 GB Γ— $0.015) = $14.85
    • Neon PostgreSQL: $299 (Business plan)
    • ClickHouse: $1,071 (2 TB storage + compute)
    • Sentry: $99 (Business plan) + overage = $150
    • Better Auth: $0 (self-hosted)

This tech stack is optimized for:

Perfect for building modern dashboards that need to handle real-time data, complex analytics, and scale globally on a budget.