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

> Powerful email marketing tools to grow, connect, and convert

- Site: https://mailcoach.app
- Category: Email Marketing SaaS
- Verdict: **Solid side project** (68/100 vibecodeable)
- Estimated effort: 2-3 weeks part-time

## Verdict

You can build a functional personal clone of Mailcoach with an AI agent, but setting up reliable queue workers and handling webhook-driven email bounces will test your debugging patience.

Mailcoach is a textbook example of a focused SaaS product built around reliable asynchronous background jobs and database design. While an AI agent can rapidly scaffold the Laravel models, controllers, and Tailwind views, you will spend real time debugging queue workers, handling incoming SES/Resend webhook payloads for bounces and complaints, and wiring up open/click tracking wrappers. For a personal newsletter or internal transactional app, building this is a rewarding learning project; if you just need to send emails without building infrastructure, paying the €9.99/mo is far more rational.

### What you can't replicate

- Spatie's brand reputation and deep integration within the Laravel community
- Pre-warmed native IP sending reputation if using built-in relay

## What it does

Mailcoach is a fully featured email marketing and transactional email platform offering campaigns, multi-step drip automations, and developer APIs with volume-based pricing.

### Core features

- Contact list management, tagging, and segmentation
- Campaign editor (Markdown, HTML, MJML templates) with scheduling
- Multi-step drip automations and visual workflow builders
- Transactional email API with webhook event tracking
- Analytics tracking (open rates, click maps via redirect wrappers)
- Optional Bring Your Own Provider (Amazon SES, Postmark, Resend)

## The business

### Pricing

- Base Plan: €9.99/mo
- Pay-As-You-Go Volume: €0.002/email
- Self-Hosted License: €249/yr

Founded 2020.
Team size: 11–50.

## The hard parts

- Asynchronous background processing for mass campaigns and rate-limited queue batching
- Deliverability hygiene, automatic bounce/complaint webhook processing, and suppression list sync
- Tracking architecture for asynchronous open pixels and click redirects under high throughput
- Multi-format template compilation (MJML to responsive HTML, Markdown rendering)

## How to vibe code Mailcoach

### Prerequisites

- PHP (free): Required runtime for executing the Laravel application framework.
- Composer (free): Dependency manager for PHP and Laravel packages.
- Node.js (free): Required for compiling frontend assets and running Tailwind CSS.
- GitHub (free): Version control and repository hosting.

### Recommended AI tools

- Claude Code: Executes multi-file changes across Laravel controllers, migrations, and Blade/Livewire views directly in your terminal.
- Cursor: Enables precise inline editing and debugging of complex queue jobs and template renderers.

### Stack

- Frontend: Tailwind CSS + Alpine.js / Blade components
- Backend: Laravel (PHP)
- Database: MySQL / PostgreSQL (via Laravel Eloquent)
- Auth: Laravel Breeze / Jetstream
- Payments: None (Personal use clone)
- Other: Resend or Amazon SES for email delivery

### Hosting

- Hetzner (Always-on VPS for running Laravel web services, background queue workers, and the database.): €4/mo

### Build guide

1. **Scaffold Laravel Core & Database Schema** — Initialize a fresh Laravel application, configure database connections, and create migrations for contacts, tags, campaigns, and subscriber relations.

```
Create a new Laravel project named 'mailcoach-clone' using Composer. Configure the environment to use a local MySQL or SQLite database. Generate database migrations and Eloquent models for: 'contacts' (fields: email, first_name, last_name, status, custom_fields as JSON), 'tags' (name, slug), 'contact_tag' pivot table, 'campaigns' (title, subject, content, status, scheduled_at), and 'email_sends' (campaign_id, contact_id, status, opened_at, clicked_at). Ensure foreign key constraints and proper indexing on email addresses and status fields. Write comprehensive database seeders for testing.
```

2. **Build Contact Management & CSV Import** — Implement contact list management, custom fields, tagging, and bulk CSV import logic with proper validation.

```
Build the Contact Management subsystem in Laravel. Create a ContactController with methods to list, view, create, update, and delete subscribers. Implement a CSV import feature that accepts a file upload, parses rows asynchronously using Laravel Job batches, handles duplicate email checks, and attaches selected tags. Build a clean Tailwind CSS dashboard layout showing list statistics, segmented views by tags, and suppression list management for unsubscribed or bounced contacts.
```

3. **Campaign Editor & Markdown/HTML Compilation** — Implement campaign creation with support for Markdown and HTML templates, variable substitution placeholders, and pre-send checklists.

```
Implement the Campaign module allowing users to draft email campaigns with a subject line and body content supporting Markdown and raw HTML. Add dynamic placeholder replacement (e.g., {{first_name}}, {{email}}) parsing subscriber attributes. Build a pre-send checklist screen verifying that the campaign has a valid subject, at least one recipient segment, and a test email preview function that sends a rendered sample to the authenticated user.
```

4. **Asynchronous Queue Dispatcher & Delivery Integration** — Set up Laravel queue workers, batch sending jobs, rate limiting, and integration with Resend or Amazon SES for outbound delivery.

```
Create a robust email dispatching pipeline using Laravel Queues. Implement a 'SendCampaignJob' that chunks recipients and dispatches individual 'SendCampaignEmailJob' tasks through a configured mailer driver (Resend or SES API). Add rate-limiting and retry logic to prevent provider throttling. Record each dispatch attempt in the 'email_sends' table with unique tracking identifiers for analytics.
```

5. **Tracking Pixels, Click Wrappers & Webhooks** — Build tracking endpoints for open pixels and link redirect wrappers, alongside webhook listeners for provider bounce and complaint events.

```
Implement email engagement tracking. Create a transparent 1x1 tracking pixel route (/track/open/{uuid}) that logs email opens and updates 'opened_at' timestamps without breaking email rendering. Build a link redirect wrapper route (/track/click/{uuid}?url=...) that rewrites campaign links, records click events, and redirects users to their target destination. Finally, build an incoming webhook controller (/api/webhooks/ses or /resend) to automatically process delivery failures, bounces, and spam complaints, updating contact statuses to 'bounced' or 'complained'.
```

6. **Transactional API & Documentation** — Create a developer-friendly API endpoint for sending single transactional emails with token authentication.

```
Build a token-authenticated API endpoint (/api/v1/send) for transactional email dispatching. The endpoint should accept recipient email, subject, html content, and optional metadata. Validate requests using Laravel Sanctum, queue the transactional email immediately for high-priority delivery, and return a JSON response with a unique message identifier. Document the API endpoints with clear request/response examples in a dedicated settings view.
```

### Cost vs paying

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

- Domain name (optional): $12/yr
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Hetzner Cloud VPS: €4/mo
- Resend API (Transactional/Testing volume): $0/mo (Free tier up to 3k emails)
- Total: €4/mo

- Paying for the SaaS instead: €9.99/mo
- Build time: 25-35 hours
- AI tool credits: $20 (Claude Pro)
- Break-even: Never (built for learning and personal use)

## Sources

- [Mailcoach Official Website](https://mailcoach.app)
- [EuropeanStack - Mailcoach Review](https://europeanstack.com/product/mailcoach)
- [Spatie Mailcoach Repository](https://github.com/spatie/mailcoach)