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

> Community platform for memberships, courses, and events

- Site: https://heartbeat.chat
- Category: Web app
- Verdict: **Serious undertaking** (38/100 vibecodeable)
- Estimated effort: 6+ weeks of full-time development and debugging

## Verdict

You can build a functional single-tenant community portal subset, but replicating the complete suite of real-time WebRTC rooms, nested LMS course engines, Stripe subscription webhooks, and AI prompt-scaffolding requires a serious engineering effort.

Heartbeat combines a half-dozen complex software categories into one platform: Discord-style real-time chat, Kajabi-style course drip schedules, Zoom-style WebRTC breakout rooms, Stripe billing workflows, and an AI agent builder. While an AI coding assistant can rapidly scaffold a Next.js monolithic shell with Prisma and Turso, you will spend weeks debugging edge cases in WebSocket state synchronization, WebRTC media server signaling, and robust subscription access-control middleware. For personal use, simpler standalone tools or paying for the SaaS is far more rational unless you want an arduous multi-week coding project.

### What you can't replicate

- The massive network effects of 25,000+ active creator communities
- App store distribution and maintenance of white-labeled native iOS and Android apps
- Deep institutional engineering polish built over years by a 30+ person venture-backed team

## What it does

An all-in-one community platform consolidating chat channels, threaded discussions, online courses, live voice/video rooms, event scheduling, document hosting, automated workflows, landing pages, and Stripe payments into a single white-labeled workspace.

### Core features

- Real-time chat channels and threaded discussions with reactions and polls
- Nested Learning Management System (LMS) with evergreen and cohort-based courses, drip schedules, and progress tracking
- Live voice and video rooms supporting up to 256 participants
- Event scheduling with calendar synchronization and RSVP tracking
- Flexible payment processing for memberships, subscriptions, and installments via Stripe webhooks
- Automated workflows for onboarding, welcome messages, and member upsells
- AI co-builder (Pulse) for generating community structures and landing pages from natural language prompts
- Custom domain support and role-based access control tied to membership tiers

## The business

### Pricing

- Build Plan: $49/mo — For launching and monetizing a community up to 350 members.
- Grow Plan: $149/mo — For growing community businesses with automation and custom branding.
- Scale Plan: $849/mo — For high-growth communities needing fully white-labeled mobile apps.

### Funding

$3.02M raised.
- Accelerator / Incubator (February 2021)
- Seed (~$600K, January 2021)
- Seed / Series A extension ($3.02M total tracked, September 2025)
Investors: SocialStarts, Maroon Alliance, Outlander, Mike Edelhart, Paige Craig

Founded 2020.
Team size: 12 to 30+ employees.

## The hard parts

- Building low-latency real-time chat channels, unread state tracking, and live presence indicators without losing connection sync
- Orchestrating multi-user WebRTC voice and video rooms with signaling servers and media routing at scale
- Enforcing granular access control rules so subscription states dynamically unlock specific chat channels, courses, and event rooms
- Integrating Stripe webhook lifecycle events for recurring subscriptions, installment failures, and trial conversions
- Implementing an AI co-builder workflow engine that parses natural language prompts to scaffold multi-table database records (channels, courses, pages)

## How to vibe code Heartbeat

### Prerequisites

- Node.js (free): Required runtime for executing the Next.js full-stack development environment.
- GitHub (free): Version control repository hosting and CI/CD deployment trigger for Vercel.
- Stripe Account (free): Required for configuring test-mode checkout sessions and payment webhook listeners.

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding multi-file database schemas, API routes, and full-stack React components autonomously.
- Cursor: AI-native code editor ideal for reviewing diffs and making iterative UI tweaks to chat and course layout components.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui components
- Backend: Next.js Server Actions and API Routes with WebSockets via Pusher
- Database: Turso (SQLite at the edge) managed via Drizzle ORM
- Auth: better-auth for self-hosted TypeScript session management and role-based permissions
- Payments: Stripe API for subscriptions and webhook event handling
- Other: LiveKit for WebRTC voice and video rooms, Anthropic API for the Pulse AI assistant feature, Resend for transactional email notifications

### Hosting

- Vercel (Hosting the Next.js frontend and serverless API endpoints with zero-config preview deployments): $0-20/mo
- Turso (Serverless edge SQLite database storage for users, channels, courses, and posts): $0/mo
- Fly.io (Hosting the LiveKit WebRTC media server for real-time voice and video rooms): $5-10/mo

### Build guide

1. **Project Scaffolding and Database Schema** — Initialize the Next.js project with Tailwind CSS, Drizzle ORM, and Turso, establishing tables for users, workspaces, channels, messages, courses, lessons, and access groups.

```
Create a new Next.js project using App Router, TypeScript, and Tailwind CSS. Install Drizzle ORM and configure connection to Turso using an HTTP client. Define a comprehensive SQLite database schema with tables for users (id, name, email, role, avatar), workspaces (id, name, slug, customDomain), channels (id, workspaceId, name, type, isPrivate), messages (id, channelId, userId, content, parentId, createdAt), courses (id, workspaceId, title, description, isCohort), lessons (id, courseId, title, content, dripDays, orderIndex), and accessGroups (id, workspaceId, name, tier). Ensure all foreign key relationships have proper cascade rules and indexes. Write a seed script to populate initial test data.
```

2. **Authentication and Multi-Tenant Access Control** — Implement self-hosted authentication via better-auth with role-based access control middleware restricting channel and course access based on membership tiers.

```
Integrate better-auth into the Next.js project supporting email/password sign-in and session management. Create custom database tables for user sessions and accounts linked to Turso. Build middleware that checks if a requesting user belongs to a workspace and possesses the required accessGroup permissions to view specific private channels or gated course modules. Add an admin settings panel allowing workspace owners to manage user roles and membership tiers.
```

3. **Real-time Chat Channels and Threaded Discussions** — Build real-time chat channels and threaded discussions utilizing Pusher for live message broadcasting, unread state tracking, and emoji reactions.

```
Build a real-time chat interface using Next.js Server Actions and Pusher channels. Create UI components for channel sidebars, message history feeds with infinite scroll, message input with attachment support, threaded reply drawers, and inline emoji reactions. Implement client-side WebSocket subscription handlers that instantly update the message feed and track unread counts when new messages arrive without requiring a page refresh.
```

4. **Nested LMS Course Engine with Drip Schedules** — Develop a course management system supporting evergreen and cohort modules, lesson content rendering, progress tracking, and scheduled drip access.

```
Implement a nested Learning Management System (LMS) within the Next.js app. Create instructor views to create courses, sections, and lessons with markdown content and video embeds. Build student views with a course outline sidebar, progress tracking bars, and completion checkboxes. Implement drip-schedule logic that restricts lesson visibility based on the student's enrollment date plus the lesson's dripDays configuration, verifying access against user progress records.
```

5. **WebRTC Voice and Video Rooms Integration** — Integrate LiveKit to power in-platform voice and video rooms supporting up to 256 participants with screen sharing and audio controls.

```
Integrate LiveKit into the platform to power live voice and video rooms. Set up a token generation API route that authorizes authenticated users to join specific room names with appropriate participant metadata. Build a React video room component using LiveKit components featuring grid participant layouts, camera/microphone toggles, screen sharing capabilities, and an active speaker indicator bar. Handle connection state errors and reconnection UX gracefully.
```

6. **Stripe Payments and Subscription Access Sync** — Configure Stripe Checkout and webhook listeners to process membership purchases and automatically update user access groups upon successful payment.

```
Set up Stripe payment integration in Next.js. Create an API route to generate Stripe Checkout sessions for workspace membership tiers and one-time course purchases. Implement a Stripe webhook receiver endpoint that listens for customer.subscription.created, customer.subscription.updated, and invoice.payment_succeeded events. When webhooks fire, securely update the database user records and access groups to grant or revoke permissions automatically.
```

7. **Pulse AI Co-builder Assistant** — Incorporate an AI assistant powered by the Anthropic API that parses natural language prompts to scaffold community structures, channels, and course outlines.

```
Build an AI co-builder feature named Pulse using the Anthropic API SDK. Create a chat drawer interface where creators can type natural language prompts describing their community business. Write a server-side route that sends the prompt along with a structured system prompt to Claude Sonnet, returning JSON instructions to automatically create workspace channels, default course modules, and welcome post templates in the database. Implement confirmation UI allowing creators to review and execute the generated structure.
```

### Cost vs paying

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

- Custom Domain Registration: $12 one-time
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Vercel Hobby / Pro: $0-20/mo
- Fly.io (LiveKit Server): $5/mo
- Turso Database: $0/mo
- Total: ~$15-25/mo

- Paying for the SaaS instead: $149/mo (Grow Plan)
- Build time: 45-60 hours
- AI tool credits: $20/mo (Claude Pro / Cursor)
- Break-even: N/A (Built for learning/personal use)

## Sources

- [Heartbeat Official Website & Pricing](https://heartbeat.chat)
- [Tracxn Company Profile for Heartbeat](https://tracxn.com)