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

> Publishing, subscriptions, and a new economic model for culture

- Site: https://substack.com
- Category: Publishing & Newsletter SaaS
- Verdict: **Solid side project** (65/100 vibecodeable)
- Estimated effort: 2-3 weekends of work

## Verdict

Build a personal publishing and email newsletter clone with a Next.js monolith, but email deliverability hurdles and webhook edge cases will test your patience.

Replicating the core writing loop, custom domains, and database-backed subscriber list is entirely straightforward for an AI coding agent. However, configuring transactional email services to achieve consistent inbox placement instead of landing in spam requires navigating strict DNS settings, bounce handling, and webhook synchronization. If you scope out mobile apps and social features like Notes, you can build a clean personal publishing tool in a few weekends.

### What you can't replicate

- Substack's established network of millions of active readers and writers
- Instant email inbox reputation across global providers (Gmail, Outlook, Yahoo)
- Proprietary discovery and recommendation algorithm

## What it does

An online publishing and subscription platform that allows independent writers, creators, podcasters, and video-makers to publish content directly to subscribers via email, web, and mobile apps.

### Core features

- Markdown and rich-text newsletter editor
- Transactional and bulk email distribution pipeline with SPF/DKIM verification
- Subscriber management and free/paid tier segmentation
- Custom publication web page routing and SEO optimization
- Stripe billing integration for paid subscription tiers
- Community discussion threads and comment sections
- RSS feed generation and export tools

## The business

### Pricing

- Free: Free — Unlimited free newsletters and web hosting.
- Paid Subscriptions: 10% take-rate — Substack takes 10% of subscription revenue for software and billing features.

### Funding

$213M raised.
- Seed (Feb 2018): $125K
- Seed (May 2018): $2M
- Series A (Jul 2019): $19.1M
- Series B (Mar 2021): $65M
- Series C (Jul 2025): $100M
Investors: Andreessen Horowitz, Bond Capital, TCG Ventures, Y Combinator

Founded 2017.
Team size: 90-150+.

## The hard parts

- Achieving high email deliverability at scale without hitting spam filters
- Managing complex webhook states and async delivery failures for thousands of emails
- Handling global recurring payment states, dunning, and failed charges via Stripe
- Maintaining rich-text editor edge cases, image handling, and custom domain mapping

## How to vibe code Substack

### Prerequisites

- Node.js (free): Required runtime environment for building and executing the Next.js application.
- GitHub (free): Source control and seamless deployment integration with hosting providers.
- Resend Account (free): Required for sending transactional and newsletter emails with proper domain authentication.

### Recommended AI tools

- Claude Code: Ideal terminal agent for executing full-stack scaffolding, handling database migrations, and configuring API routes iteratively.
- Cursor: Allows precise inspection and manual adjustments of the rich-text editor components and frontend layouts.

### Stack

- Frontend: Next.js (App Router, Tailwind CSS)
- Backend: Next.js Server Actions and API Routes
- Database: Neon (Serverless Postgres)
- Auth: better-auth
- Payments: Stripe (Optional for personal use)
- Other: Resend, Vercel AI SDK

### Hosting

- Vercel (Hosting the Next.js frontend, API endpoints, and serverless functions.): $0-20/mo
- Neon (Serverless Postgres database storing publications, posts, and subscriber records.): $0/mo

### Build guide

1. **Project Scaffolding and Database Setup** — Initialize the Next.js application with Tailwind CSS and connect to Neon Postgres via Drizzle ORM.

```
Create a new Next.js App Router project using TypeScript and Tailwind CSS. Initialize Drizzle ORM configured for a Neon serverless Postgres connection. Create database schemas for users, publications, posts (with title, slug, content, markdown/html body, published_at status), and subscribers (with email, status, and publication_id). Ensure strict typing across all database models and add migration scripts.
```

2. **Authentication and Publication Management** — Implement authentication using better-auth and enable creators to set up their publication profile and custom slug.

```
Integrate better-auth into the Next.js app supporting email/password and magic link authentication. Build a dashboard layout where authenticated users can create and manage their publication settings, including name, logo, custom subdomain or path slug, and author bio. Protect dashboard routes and tie publications securely to the user ID.
```

3. **Rich Text Editor and Post Creation** — Build an intuitive distraction-free post editor supporting markdown or rich text blocks.

```
Build a post editor page in the dashboard using a modern rich-text or markdown editor library. Include fields for title, subtitle, cover image URL, and main body content. Implement auto-saving functionality via background API calls and a publish action that updates the post status from draft to published, setting the published timestamp.
```

4. **Public Reader View and Post Rendering** — Create the public-facing publication home page and individual article reading views.

```
Create dynamic public routing for publications and posts (e.g., /p/[slug] or [publication]/[post-slug]). Build a clean, reading-optimized layout with a header, author metadata, share buttons, and rendered post content. Include an embedded subscription form card at the bottom of each article allowing visitors to submit their email to subscribe.
```

5. **Subscriber Management and Email Distribution Pipeline** — Implement subscriber capture and automated email delivery of new posts using Resend.

```
Build a server action handling subscriber form submissions, validating email formats, saving subscribers to the database, and sending a welcome email via the Resend API. When a creator publishes a new post, create an async job or server action that iterates over all active subscribers for that publication and dispatches the post content via Resend email templates with proper unsubscribe footer links.
```

6. **Comments and Community Discussion** — Add threaded comments and basic reader interaction features to published articles.

```
Implement a comments data model linked to posts and users (or verified email sign-offs for anonymous readers). Build a commenting component on the public post view allowing readers to post comments, view nested replies, and delete their own contributions. Ensure proper validation and sanitization of all user-submitted text.
```

7. **Polish, Error Handling, and Deployment** — Finalize UI polish, configure production environment variables, and deploy to Vercel and Neon.

```
Review the entire application for error states, loading skeletons, and responsive mobile layouts. Add Sentry error tracking for API failures and email dispatch errors. Verify all environment variables for Neon, better-auth, and Resend are documented and ready for a zero-downtime production deployment on Vercel.
```

### Cost vs paying

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

- Custom Domain (optional): $12/year
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Vercel Hobby / Workers: $0/mo
- Neon Postgres Free Tier: $0/mo
- Resend (up to 3,000 emails/mo): $0/mo
- Total: ~$0/mo

- Paying for the SaaS instead: Free take-rate (10% of creator revenue)
- Build time: 25-35 hours
- AI tool credits: $20 (Claude Pro)
- Break-even: N/A (Personal use)

## Sources

- [Substack Help Center - Pricing & Fees](https://support.substack.com/hc/en-us/articles/360037989912-How-much-does-Substack-cost)
- [Axios - Substack Series C Unicorn Announcement](https://www.axios.com/2025/07/17/substack-raises-100m-valuation-billion)
- [Tracxn - Substack Funding Profile](https://tracxn.com/d/companies/substack)
- [Wikipedia - Substack Overview](https://en.wikipedia.org/wiki/Substack)