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

> Supercharged email client for modern-day business communication

- Site: https://newtonhq.com
- Category: Email & Productivity
- Verdict: **Serious undertaking** (35/100 vibecodeable)
- Estimated effort: 3-6 months of serious part-time development

## Verdict

Build a web-based personal subset rather than trying to replicate the full multi-platform native client suite, as building a robust IMAP sync proxy and handling OAuth verification is an immense hurdle.

Trying to build a full clone of Newton for personal use is a serious undertaking because of the backend infrastructure required. An AI coding agent can spin up a Next.js frontend and local database in hours, but it cannot magically bypass the weeks of grueling engineering needed to build a reliable IMAP/SMTP server proxy that handles OAuth token refreshes, background push notifications, server-side 'Send Later' cron jobs, and Google's restricted scope security audits. If you want a personal productivity email client, paying $49.99/year is vastly more rational than spending months wrestling with IMAP connection limits and socket drops.

### What you can't replicate

- Google and Microsoft restricted OAuth API verification approvals for production email clients
- Over a decade of multi-platform native client hardening and edge-case bug fixes across macOS, Windows, Linux, iOS, and Android
- Pre-existing brand trust and user migration inertia

## What it does

Newton is a cross-platform productivity-focused email client offering read receipts, email collaboration, AI-driven summaries, and connected app integrations.

### Core features

- Multi-account IMAP/SMTP/OAuth synchronization (Gmail, Outlook, iCloud)
- Server-side background sync and push notifications
- Read receipts and click tracking infrastructure
- Recap and AI-prioritized inbox sorting
- Email collaboration with internal comments and shared logs
- Snooze and Send Later server-side triggers
- Connected apps shortcuts (Todoist, Trello, Asana, Evernote)
- Side-by-side calendar integration and RSVP workflows

## The business

### Pricing

- Annual Subscription: $49.99/year — Full access to all supercharged email features across devices with a 14-day free trial.

Founded 2010.
Team size: ~4 core operators.

## The hard parts

- Building a persistent server-side proxy to handle IMAP connections, OAuth token refreshes, and background triggers (Snooze/Send Later) without draining battery on client devices
- Securing Google and Microsoft restricted OAuth API scopes and complying with strict vendor security verifications
- Optimizing cross-platform native/Electron performance for heavy rich-text DOM rendering and thread trees without memory bloat
- Maintaining third-party API integrations across Todoist, Trello, Asana, and Evernote as their endpoints evolve

## How to vibe code Newton

### Prerequisites

- Node.js (free): Required for running the full-stack TypeScript environment.
- GitHub (free): Repository hosting and version control for AI coding iterations.
- Google Cloud Console Account (free): Required to configure OAuth credentials and Gmail API access scopes for testing.

### Recommended AI tools

- Claude Code: Best-in-class coding agent for scaffolding multi-file backend proxy architectures and handling complex IMAP sync logic.
- Cursor: Ideal for iterative frontend component design, rich-text editor layouts, and debugging UI state.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui components
- Backend: Node.js Express server with IMAP/SMTP node libraries for background proxy sync
- Database: Neon serverless Postgres for user accounts, cached threads, and sync state
- Auth: better-auth with Google/Outlook OAuth integrations
- Payments: Skip payments for a personal-use clone
- Other: Resend for transactional email notifications, Vercel AI SDK for AI-prioritized recap summaries

### Hosting

- Fly.io (Hosting the persistent Node.js IMAP background proxy server and long-running sync workers): $5/mo
- Vercel (Hosting the Next.js web client frontend and dashboard UI): $0/mo
- Neon (Serverless Postgres database for storing user metadata, cached email headers, and snooze rules): $0/mo

### Build guide

1. **Project Scaffolding and Database Schema** — Initialize the Next.js web application structure, configure Neon Postgres connection via Drizzle ORM, and set up the core database models for users, connected email accounts, cached messages, snooze states, and read receipt logs.

```
Scaffold a new Next.js TypeScript project with Tailwind CSS and shadcn/ui. Connect it to a Neon Postgres database using Drizzle ORM. Create database tables for users, connected_accounts (storing encrypted OAuth tokens and IMAP configuration details), messages (storing thread IDs, sender, recipient, subject, body, read status, and timestamps), snooze_rules, and activity_logs. Implement strict TypeScript types for all models and set up migration scripts. Ensure clean separation between the frontend app directory and backend API routes.
```

2. **OAuth and Multi-Provider Authentication Integration** — Integrate better-auth alongside custom OAuth flows for Google Gmail and Microsoft Outlook, securely exchanging authorization codes and storing encrypted refresh tokens.

```
Implement authentication in the Next.js app using better-auth configured with Google and Microsoft Outlook OAuth providers. Create secure backend utility functions using AES-256 encryption to store user access tokens and refresh tokens in the connected_accounts table. Build an account management settings page where users can link and unlink their email providers, displaying connection status and syncing errors clearly with acceptance criteria for successful token exchanges.
```

3. **IMAP/SMTP Background Proxy Worker Service** — Build a standalone Node.js background worker service running on Fly.io that connects to user mailboxes via IMAP, pulls incoming messages, listens for updates, and handles outbound SMTP dispatch.

```
Build a background worker service in Node.js using node-imap and mailparser to connect to user mailboxes via IMAP and SMTP. The worker must periodically poll or maintain persistent connections for active accounts, fetch new messages, parse HTML/text bodies, and upsert them into the Neon database. Implement error handling for dropped connections, authentication failures, and rate limits. Ensure the worker exposes internal health check endpoints and logs synchronization events cleanly.
```

4. **Inbox UI, Thread View, and Rich-Text Composition** — Develop the responsive web inbox interface with a three-pane layout (folders, thread list, message view), threaded conversation grouping, and a rich-text composer.

```
Build a responsive three-pane inbox UI in Next.js using Tailwind CSS. Left pane: folder navigation (Inbox, Sent, Snoozed, Trash). Middle pane: scrollable thread list showing sender avatars, subject lines, preview snippets, read indicators, and quick action buttons (snooze, archive). Right pane: full thread view displaying conversation history with expandable messages and a rich-text compose box. Implement keyboard shortcuts for navigation (j/k for movement, e to archive, s to snooze) matching standard email client UX.
```

5. **Read Receipts, Link Tracking, and Pixel Injection** — Implement read receipt tracking by injecting tracking pixels into outbound emails and setting up tracking endpoints for opened links.

```
Implement read receipt and link tracking features for outbound emails sent via SMTP. When composing an email, automatically inject a unique 1x1 tracking pixel image URL pointing to our backend API route (/api/track/open?id=xyz). Build the API route to log the exact timestamp and IP address when requested, updating the message status in the database. Also rewrite outbound hyperlinks to route through a redirect endpoint (/api/track/click?url=...&id=xyz) to record link click events and display analytics badges in the sent items view.
```

6. **Recap AI Prioritization and Snooze Engine** — Integrate background cron jobs and LLM analysis to calculate inbox recap lists and process delayed snooze/send-later triggers.

```
Implement the 'Recap' feature and snooze engine. Build a scheduled background cron job that runs hourly to evaluate unreplied threads and pending snooze timestamps. Use the Vercel AI SDK with a fast model to analyze incoming unread threads and surface conversations requiring follow-up into a dedicated 'Recap' dashboard view. Build backend logic to move snoozed messages out of the inbox and automatically restore them to the active inbox when their scheduled snooze time arrives.
```

### Cost vs paying

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

- Google Cloud Console setup / OAuth verification prep: $0
- Total: $0 one-time

**Ongoing costs (monthly):**

- Fly.io backend proxy VM hosting: $5/mo
- Neon database & Vercel frontend: $0/mo
- Resend transactional email API: $0/mo
- Total: ~$5/mo

- Paying for the SaaS instead: $4.17/mo ($49.99/yr)
- Build time: 60-80 hours
- AI tool credits: $20 (Claude Pro / Cursor subscription)
- Break-even: Never (purely for learning and personal customization)

## Sources

- [Newton Official Website](https://newtonhq.com)
- [Inverse: Newton Mail Resurrected by Superfans](https://www.inverse.com/innovation/newton-mail-resurrected-by-superfans)
- [Tracxn: CloudMagic / Newton Company Profile & History](https://tracxn.com/d/companies/cloudmagic)