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

> Fast, private email hosting for you or your business

- Site: https://fastmail.com
- Category: Email & Productivity SaaS
- Verdict: **Don't bother** (12/100 vibecodeable)
- Estimated effort: 6+ months of full-time infrastructure engineering

## Verdict

Build a local mock webmail interface for fun, but never attempt to self-host a production email server on a solo developer's internet connection.

While you can vibe-code a polished React frontend that mimics the Fastmail web UI in a few weekends, actual email infrastructure is a punishing quagmire. Setting up an SMTP server as a solo developer means your outbound mail will instantly hit spam filters at Gmail and Microsoft due to lack of IP reputation warming, reverse DNS records, and constant feedback loop monitoring. Furthermore, implementing IMAP, CalDAV, and JMAP servers from scratch requires deep protocol engineering that AI coding agents will repeatedly hallucinate and break. Keep paying for Fastmail if you want reliable email delivery.

### What you can't replicate

- Decades of established IP reputation and pristine deliverability with major providers
- Enterprise-grade email retention compliance archives
- 24/7 human support team and security incident response

## What it does

Independent, privacy-focused email, calendar, contacts, and file hosting service with custom domain support and advanced productivity features.

### Core features

- Email composition and threading with rich-text editor
- IMAP, SMTP, and JMAP protocol synchronization
- CalDAV calendar management and CardDAV contacts
- Masked Email alias generation
- Scheduled send and email snoozing
- Full-text search over message bodies and archives
- Custom domain email routing (MX, SPF, DKIM, DMARC)
- File storage and document management

## The business

### Pricing

- Individual: $5/mo — Premium email, contacts, and calendars for one user
- Standard Business: $5/user/mo — Most popular tier for teams

Founded 1999.
Team size: 50-100+.

## The hard parts

- SMTP server delivery reputation and fighting spam filters on a solo-dev IP
- JMAP protocol implementation and offline client state synchronization
- Full-text search indexing at scale over encrypted or raw text stores
- Secure IMAP/CalDAV server architecture ensuring absolute zero data loss

## How to vibe code Fastmail

### Prerequisites

- Node.js (free): Required for running the Next.js frontend development environment.
- GitHub (free): Version control and repository hosting.

### Recommended AI tools

- Claude Code: Best-in-class multi-file agentic coding tool for scaffolding the webmail frontend and local database mock.

### Stack

- Frontend: Next.js with Tailwind CSS and React
- Backend: Next.js API routes handling simulated mail APIs
- Database: Turso (SQLite at the edge)
- Auth: better-auth
- Payments: none
- Other: Resend for transactional simulation

### Hosting

- Cloudflare (Hosting the frontend webmail dashboard and mock database at the edge): $0/mo

### Build guide

1. **Scaffold Webmail Frontend Dashboard** — Initialize a Next.js application with Tailwind CSS to build a multi-pane layout mirroring Fastmail's web client (sidebar navigation, message list, reading pane, and composer).

```
Create a Next.js app using Tailwind CSS with a responsive three-pane layout inspired by Fastmail's web interface. Include a collapsible sidebar for Mail, Calendar, Contacts, and Files; a middle pane for threaded message lists with status badges, unread indicators, and checkboxes; and a right-side reading pane with action buttons for reply, forward, snooze, and scheduled send. Use clean typography and a modern minimalist aesthetic without external UI component libraries.
```

2. **Implement Local Database and Schema** — Set up Turso with SQLite to store users, folders, messages, contacts, and calendar events for a simulated personal mail store.

```
Set up a Turso SQLite database schema using Drizzle ORM for a personal email client. Create tables for users, mailboxes (Inbox, Sent, Archive, Trash), messages (with subject, sender, recipient, body, read status, thread ID, and timestamps), contacts (name, email, phone), and calendar_events (title, start_time, end_time, description). Write seed scripts to populate dummy threads so the inbox view is immediately testable.
```

3. **Build Authentication and User Management** — Integrate better-auth for local credential management and multi-user profile handling.

```
Configure better-auth in the Next.js application to support email/password sign-in and session management connected to the Turso database. Ensure routes are protected and associate all messages and calendars strictly with the authenticated user ID.
```

4. **Develop Message Composition and Squire-like Rich Text Editor** — Build an email composition modal equipped with rich-text formatting, recipient autocomplete, and mock attachment support.

```
Create an email composer component featuring a clean rich-text toolbar (bold, italic, lists, links), a recipient input field with contact autocomplete dropdown, subject line, and an attachment dropzone. Implement actions to save drafts to the local database, discard, or simulate sending by moving messages to the Sent folder.
```

5. **Simulate JMAP/IMAP Sync and Search Indexing** — Implement SQLite full-text search (FTS5) for instant message lookups and build simulated sync endpoints.

```
Add SQLite FTS5 full-text search indexing to the messages table. Build an API endpoint that queries subject and body fields instantly with sub-second response times. Create a frontend search bar that filters the message list dynamically as the user types.
```

6. **Add Calendar and Contacts Modules** — Build basic calendar grid and contact book views to complete the personal productivity suite.

```
Build a month and week calendar view component using React where users can create, edit, and color-code events. Add a separate contacts management page allowing users to view, add, and edit address book entries, syncing data cleanly against the Turso database models.
```

### Cost vs paying

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

- AI coding tool subscription (Claude Pro): $20
- Total: ~$20 one-time

**Ongoing costs (monthly):**

- Cloudflare & Turso free tiers: $0/mo
- Total: $0/mo

- Paying for the SaaS instead: $5/mo
- Build time: 40 hours
- AI tool credits: $20
- Break-even: Never (infrastructure delivery failure makes real use impossible; pay $5/mo for actual Fastmail)

## Sources

- [Fastmail About Page](https://fastmail.com/about/)
- [Fastmail Pricing Page](https://fastmail.com/pricing/)
- [Fastmail Security Overview](https://fastmail.com/help/security/)
- [Fastmail Open Source & Standards](https://fastmail.com/about/open-source/)