# How to Vibe Code Your Own Leave Me Alone (and Stop Paying for It)

> Privacy-focused email management platform to unsubscribe, roll up, and block spam

- Site: https://leavemealone.com
- Category: Email Management / Productivity SaaS
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 4-6 weeks of part-time work

## Verdict

Build a personal subset with IMAP and basic OAuth, but keep paying if you need Google restricted-scope access without annual security audits.

Building the core UI and basic IMAP email scanner is straightforward with an AI agent, but dealing with Google's restricted OAuth scopes (`gmail.modify` and `gmail.settings.basic`) requires navigating an annual third-party security assessment and vulnerability audit that will cost thousands of dollars and substantial legal/compliance effort. For a personal-use self-hosted clone, you can bypass this by limiting usage to your own personal Gmail app with test user constraints or standard IMAP credentials, but handling edge cases in newsletter unsubscribe link automation and maintaining background sync workers will consume weeks of debugging.

### What you can't replicate

- Google-approved restricted scope security audit certification without paying for an independent third-party assessment
- Instant consumer trust and brand reputation built over 8 years of open operations

## What it does

Leave Me Alone helps users clean up their inboxes by aggregating subscription emails for one-click unsubscriptions, combining newsletters into custom digests, and screening incoming cold emails.

### Core features

- OAuth 2.0 integration with Gmail and Outlook
- IMAP/SMTP connection support for Yahoo, iCloud, Fastmail, and AOL
- Inbox scanning and parsing metadata for subscription emails
- One-click unsubscription automation (following RFC 8058 headers or sending fallback emails)
- Newsletter rollups (combining selected emails into daily/weekly digests)
- Inbox Shield / Screener (blocking cold emails and allowing trusted senders)
- Do-not-disturb mode for holding emails during focus windows
- Encrypted storage for rollups and email metadata

## The business

### Pricing

- Free Tier: Free — Up to 10 free unsubscribes with no credit card required.
- Seven Day Pass: $19 — One-off pass for getting an inbox under control quickly.
- Casual Emailer: Billed Yearly — For users with moderate mailing list clutter.
- Inbox Zero Hero: Billed Yearly — For power users with multiple accounts.

### Funding

$0 raised.

Founded 2018.
Team size: 2.

## The hard parts

- Google restricted OAuth scopes (gmail.modify, gmail.settings.basic) requiring formal annual security audits and independent penetration testing
- Maintaining stable, concurrent IMAP background sockets without hitting provider rate limits
- Parsing obscure HTML bodies and handling non-standard unsubscribe mechanisms
- Zero-knowledge or secure encryption key management for storing rollup contents

## How to vibe code Leave Me Alone

### Prerequisites

- Node.js (free): Runtime for running the Next.js full-stack application and backend queue workers.
- GitHub (free): Source code repository and deployment bridge for hosting providers.
- Google Cloud Console Account (free): Required to configure OAuth credentials and test user scopes for Gmail API integration.

### Recommended AI tools

- Claude Code: Best-in-class agent for scaffolding full-stack code, writing IMAP parsing scripts, and debugging OAuth callbacks across multiple files.
- Cursor: Ideal for iterative UI work on the dashboard views and fine-tuning Tailwind layout components.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui components
- Backend: Next.js API Routes with background sync workers
- Database: Turso (libSQL/SQLite at the edge for storing user account metadata and encrypted rollup configs)
- Auth: better-auth configured with self-hosted session management and OAuth provider plugins
- Payments: None (skipped for personal-use clone)
- Other: Resend for transactional auth emails and digest notifications, Node-IMAP and Google APIs client libraries for mailbox connection

### Hosting

- Cloudflare (Hosting the Next.js frontend and edge API routes via OpenNext): $0-5/mo
- Fly.io (Running long-lived background worker processes for IMAP socket polling and cron rollup digests): $3-5/mo

### Build guide

1. **Project Scaffolding and Auth Setup** — Initialize a Next.js project with Tailwind CSS, configure better-auth for secure user sessions, and set up Turso database connectivity.

```
Create a new Next.js TypeScript project with Tailwind CSS and configure shadcn/ui. Set up better-auth with email/password and Google OAuth credentials pointing to environment variables. Establish a Turso SQLite database connection using Drizzle ORM with tables for users, connected_accounts, email_metadata, and rollups. Ensure strict TypeScript types and clean separation of server actions and client components.
```

2. **Mailbox Connection & OAuth Integration** — Implement OAuth flows for Google and Microsoft along with IMAP configuration support for other providers.

```
Build the mailbox connection module supporting Google OAuth (requesting gmail.modify and gmail.settings.basic scopes for personal test mode), Microsoft Graph OAuth, and a generic IMAP configuration form accepting email and app passwords. Store encrypted access tokens and refresh tokens securely in the Turso database with AES-256 encryption. Implement token refresh logic to handle expired OAuth grants gracefully.
```

3. **Inbox Scanner & Subscription Aggregator** — Develop background sync workers that scan connected mailboxes for mailing list metadata and List-Unsubscribe headers.

```
Create a background sync worker service that connects to user mailboxes via IMAP and Gmail API. Scan incoming messages for RFC 8058 List-Unsubscribe headers, unsubscribe HTTP links, and newsletter footprint patterns. Aggregate discovered subscriptions into a unified dashboard view showing sender name, email frequency, and unsubscription options. Ensure pagination and caching mechanisms handle large inboxes efficiently without hitting provider rate limits.
```

4. **One-Click Unsubscriber Engine** — Build the automated unsubscription engine that follows web links or sends fallback emails.

```
Implement the unsubscription execution engine. When a user clicks 'Unsubscribe', the backend must check for an HTTP List-Unsubscribe URL and make a secure HEAD/GET request to trigger it. If no HTTP link exists, parse the email body for mailto links and construct an automated unsubscribe email sent via the user's connected mailbox. Update the database state to mark the subscription as unsubscribed and handle error states if endpoints fail.
```

5. **Rollups and Digest Scheduler** — Build newsletter categorization, content collection, encryption, and scheduled digest delivery.

```
Build the Rollups feature allowing users to designate specific newsletters to be retained rather than unsubscribed. Create a scheduled cron job on Fly.io that fetches matching incoming emails, encrypts their text content in the database, and compiles them into a single summary digest email. Provide settings for users to select daily or weekly delivery schedules and custom folder organization.
```

6. **Inbox Shield, Screener, and Polish** — Implement cold email screening, blocklists, do-not-disturb mode, and dashboard UI refinements.

```
Implement the Inbox Shield and Screener module. Create rules to intercept incoming mail from unknown senders, holding them in a review queue unless the sender is on a priority whitelist or trusted list. Add a Do-Not-Disturb toggle that pauses notification releases during custom focus windows. Polish the dashboard UI with responsive tables, status badges, and comprehensive error toast notifications.
```

### Cost vs paying

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

- Google Cloud Console project setup: $0
- Custom domain (optional): $12 one-time
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Cloudflare Pages & Turso DB: $0/mo (Free tiers)
- Fly.io background IMAP worker VM: $3-5/mo
- Total: ~$4/mo

- Paying for the SaaS instead: ~$12/mo (Casual Emailer annual plan equivalent)
- Build time: 35-50 hours
- AI tool credits: $20 (Claude Pro subscription)
- Break-even: Not applicable (built for personal use and learning)

## Sources

- [Leave Me Alone Official Website](https://leavemealone.com)
- [Leave Me Alone Security & Privacy Documentation](https://leavemealone.com/security)
- [Leave Me Alone Pricing Pages](https://leavemealone.com/pricing)