# How to Vibe Code Your Own Better Stack (and Stop Paying for It)

> 30x cheaper than Datadog, exceptional support

- Site: https://betterstack.com
- Category: Developer Tools & Observability
- Verdict: **Don't bother** (25/100 vibecodeable)
- Estimated effort: 6+ months of full-time work for the full platform

## Verdict

Keep paying for the real product, unless you want to spend months building a hobbled personal bookmark-pinging subset.

Better Stack is a massive observability conglomerate masquerading as a single tool. It stitches together distributed log indexing via ClickHouse, global synthetic browser checks, real-time telephony alerting via Twilio, OpenTelemetry trace collectors, and an AI agent framework. While you can vibe code a rudimentary uptime pinger that alerts your Telegram in a weekend, rebuilding the telemetry ingestion pipeline, log querying engine, and on-call telephony infrastructure requires an enormous systems engineering effort that is completely disproportionate to the $29/mo price tag.

### What you can't replicate

- Global network of synthetic test execution nodes
- Sub-second SQL/PromQL ad-hoc querying across terabytes of raw log data
- Zero-drop OpenTelemetry and eBPF collection agent infrastructure
- Enterprise-grade telephony and SMS carrier reliability SLAs

## What it does

An AI-native observability and incident response platform combining uptime monitoring, log management, OpenTelemetry tracing, error tracking, RUM, status pages, and an AI SRE.

### Core features

- Global Uptime & Heartbeat Monitoring with Playwright Checks
- Structured Log Ingestion & SQL Querying via ClickHouse
- OpenTelemetry Trace & Span Collection
- Incident Management, Escalation Policies & Twilio Voice/SMS Alerting
- Branded Public & Private Status Pages
- Error Tracking with Sentry SDK compatibility
- Real User Monitoring (RUM) & Session Replays
- Model Context Protocol (MCP) Server for LLM Telemetry Access

## The business

### Pricing

- Free for Personal Projects: Free
- Responder License: $29/mo
- Telemetry Nano Bundle: $25/mo

### Funding

$28.6M raised.
- Series A ($18.6M)
Investors: Lachy Groom, Rahul Mehta, Aaron Levie, Madhu Muthukumar, Ryan Petersen, Zach Sims, Emil Eifrem

Founded 2021.
Team size: 30-50+.

## The hard parts

- High-throughput log ingestion and indexing pipeline at scale
- Global synthetic monitoring infrastructure running real Chrome/Playwright instances
- Reliable global telephony routing for automated phone calls and emergency SMS
- ClickHouse or distributed data store partitioning for multi-tenant query performance

## How to vibe code Better Stack

### Prerequisites

- Node.js (free): Required for running the Next.js full-stack control plane and backend worker scripts.
- GitHub (free): Source code repository and CI/CD deployment connection.
- Twilio Account (Pay-per-use (~$1.15/mo phone number + per-message/call fees)): Required for phone call and SMS incident alerting.

### Recommended AI tools

- Claude Code: Best-in-class multi-file agentic coding tool for scaffolding complex backend data pipelines and API routers.
- Cursor: Ideal for iterative UI design of observability dashboards and status page components.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui
- Backend: Next.js API Routes and Node.js Background Workers
- Database: Neon (Serverless Postgres) for app state and Turso (SQLite) for monitoring records
- Auth: better-auth
- Payments: Stripe
- Other: ClickHouse Cloud (for log aggregation), Twilio (for voice/SMS alerting), Resend (for transactional email alerts)

### Hosting

- Vercel (Hosting the Next.js control plane dashboard and frontend user interface.): $0-20/mo
- Fly.io (Running long-lived background cron workers that execute uptime checks and process incoming log streams.): $5-10/mo

### Build guide

1. **Scaffold the Control Plane & Database Schema** — Initialize a Next.js project with Tailwind CSS, configure better-auth for user authentication, and set up Neon Postgres database schemas for monitors, incidents, and escalation policies.

```
Create a new Next.js 16 project with Tailwind CSS and TypeScript. Set up better-auth with email/password authentication. Create a Drizzle ORM schema targeting Neon Postgres with tables for 'monitors' (id, url, interval, status, last_checked_at), 'incidents' (id, monitor_id, status, triggered_at, resolved_at), 'escalation_policies' (id, name, steps_json), and 'status_pages' (id, name, subdomain, custom_css). Ensure proper foreign key relations and indexes on status and timestamps.
```

2. **Build the Uptime & Heartbeat Polling Worker** — Implement a background worker that pings target URLs on fixed cron intervals, records response codes and latency, and handles failure tracking.

```
Create a Node.js background worker module using node-cron or similar scheduler that queries active monitors from the database, performs an HTTP HEAD or GET request with a timeout limit, records response time and status code, and updates the monitor state. If a monitor transitions from up to down for 2 consecutive checks, trigger an incident record in the database.
```

3. **Implement Twilio Voice and SMS Alert Dispatcher** — Build an alert routing engine that checks active incidents, evaluates escalation policies, and dispatches automated phone calls and SMS messages using Twilio.

```
Build an alert dispatch service that integrates with the Twilio API. When a new incident is created, look up the owner's escalation policy, send an SMS alert, and place an automated phone call using Twilio Voice XML to read out the incident details. Include retry logic and logging of delivery status in an 'alert_logs' table.
```

4. **Construct the Public Status Page Renderer** — Create a dynamic routing layer that serves branded public status pages on custom subdomains, displaying component health grids and incident update feeds.

```
Build a public status page module in Next.js with dynamic subdomain routing (e.g., status.yourdomain.com). Fetch active monitors and recent incidents for that status page ID, render an uptime history grid (90-day bars), display current operational status, and provide an email subscription form for incident notifications managed via Resend.
```

5. **Develop the Log Ingestion & Query Endpoint** — Build an authenticated HTTP log ingestion endpoint and lightweight query interface to mimic structured log storage and basic filtering.

```
Create an API endpoint /api/v1/logs that accepts JSON-structured log batches with authentication headers. Store incoming logs into a ClickHouse or partitioned Postgres table. Build a companion dashboard view with a simple query bar allowing filtering by log level, service name, and text search strings, displaying results in a real-time table view.
```

### Cost vs paying

**Starting costs (one-time):**

- Custom Domain for Status Pages: $12 one-time
- Twilio Phone Number Registration: $1.15 one-time
- Total: ~$13.15 one-time

**Ongoing costs (monthly):**

- Vercel Hobby / Pro Hosting: $0-20/mo
- Fly.io Background Worker VM: $5/mo
- Neon Postgres & ClickHouse Cloud: $0-10/mo
- Twilio SMS & Voice Usage: ~$5/mo
- Total: ~$30/mo

- Paying for the SaaS instead: $29/mo (Responder) + Telemetry bundles
- Build time: 80-120 hours
- AI tool credits: $20 (Claude Code / Cursor subscription)
- Break-even: Never (paying $29/mo for the real SaaS is cheaper than your time)

## Sources

- [Better Stack Official Website](https://betterstack.com)
- [Better Stack Pricing](https://betterstack.com/pricing)