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

> Automate your email with AI

- Site: https://shortwave.com
- Category: Email Productivity & AI Assistant
- Platforms: Web app, macOS app, Windows app, iOS app, Android app
- Verdict: **Don't bother** (25/100 vibecodeable)
- Estimated effort: 3-4 months of full-time work

## Verdict

Build a personal read-only AI email summarizer subset or keep paying; the Gmail sync, real-time push architecture, and security compliance moat make a full clone impractical.

Replicating Shortwave requires building a robust IMAP/Gmail API sync layer with Pub/Sub push notifications, handling token limits across thousands of historical emails, and navigating Google's strict OAuth verification requirements. While you can write a Next.js frontend that talks to the Gmail API and calls Claude to summarize your inbox in a weekend, turning it into a production-grade daily email client with multi-device state and security compliance is a massive undertaking that outweighs the $30/mo subscription.

### What you can't replicate

- Google CASA Tier 2 security verification and enterprise workspace trust
- Zero-latency background email push sync infrastructure at scale
- Polished native desktop and mobile app wrappers with offline caching

## What it does

Shortwave is an AI-native email assistant and productivity client for Gmail that combines inbox organization, generative AI triage, and real-time team collaboration.

### Core features

- Real-time Google Gmail API sync with push notifications via Google Cloud Pub/Sub
- Inbox organization engine (Bundles, Splits, and automated AI triage)
- AI Assistant sidebar capable of multi-step tool execution and attachment analysis
- Predictive inline autocomplete and personalized voice matching
- Custom AI filters written in plain English
- Real-time team shared threads and private comments

## The business

### Pricing

- Free: Free
- Business: $30/mo
- Premier: $45/mo
- Max: $120/mo

### Funding

$9M raised.
- Seed / Series A
Investors: Lightspeed Venture Partners, Union Square Ventures, Peter Reinhardt

Founded 2019.
Team size: ~17.

## The hard parts

- Maintaining low-latency, resilient bidirectional sync with Gmail's complex history ID and watch subscription architecture
- Managing massive email thread context tokens efficiently with prompt caching and vector indexing
- Securing Google Workspace OAuth scopes and passing CASA Tier 2 security compliance
- Cross-platform synchronization and state management across web, desktop, and mobile clients

## How to vibe code Shortwave

### Prerequisites

- Google Cloud Console Account (free): Required to set up OAuth 2.0 credentials and Google Cloud Pub/Sub for Gmail push notifications.
- Node.js (free): Runtime environment for building the Next.js application backend and worker scripts.
- GitHub (free): Version control and CI/CD deployment pipelines.

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding complex full-stack Next.js applications and integrating OAuth providers.
- Cursor: Ideal for inspecting file diffs, refining React UI components, and debugging API routes.

### Stack

- Frontend: Next.js with Tailwind CSS and React
- Backend: Next.js API Routes and Server Actions
- Database: Neon (Serverless Postgres) + Pinecone for vector embeddings
- Auth: better-auth with Google OAuth integration
- Payments: Stripe
- Other: Vercel AI SDK, Anthropic API, Google Gmail API SDK, Resend

### Hosting

- Vercel (Hosting the Next.js web application and serverless API endpoints): $0-20/mo
- Neon (Relational database storage for user profiles, local thread states, and settings): $0/mo
- Pinecone (Vector search index for semantic email retrieval and RAG assistant queries): $0/mo

### Build guide

1. **Project Scaffolding & Database Setup** — Initialize the Next.js project with Tailwind CSS, configure Neon Serverless Postgres, and set up better-auth with Google OAuth scopes for Gmail access.

```
Create a new Next.js TypeScript project using App Router and Tailwind CSS. Configure better-auth with a Neon Postgres database connection. Set up OAuth authentication specifically requesting Google scopes: https://www.googleapis.com/auth/gmail.readonly, https://www.googleapis.com/auth/gmail.modify, and https://www.googleapis.com/auth/calendar. Set up environment variable validation with Zod and provide a clean dashboard layout shell with a collapsible sidebar and main content area matching an email client layout.
```

2. **Gmail API Sync & Pub/Sub Webhook Listener** — Implement server-side synchronization routines to fetch user messages, parse MIME formats, and handle incoming Google Cloud Pub/Sub push notifications.

```
Build a robust Gmail API service layer in TypeScript using the official Google APIs client library. Implement functions to list threads, fetch individual message payloads with HTML/text body parsing, and handle pagination. Create an API webhook endpoint at /api/webhooks/gmail that receives Google Cloud Pub/Sub push notifications, verifies the channel token, and triggers incremental background syncs to update local Postgres cache tables for threads and messages.
```

3. **Inbox Organization & Bundles Engine** — Create algorithmic grouping rules to categorize newsletters, promotions, and important action items into distinct tabs and bundles.

```
Develop an inbox triage engine that categorizes incoming synced messages into bundles (e.g., Newsletters, Promotions, Updates) using header analysis and lightweight LLM classification via the Vercel AI SDK. Build React components for 'Splits' and 'Bundles' views in the inbox interface, supporting bulk actions like marking entire bundles as done or archived, and updating sync states in the database.
```

4. **AI Assistant Sidebar & Semantic Search RAG** — Integrate Anthropic Claude with Pinecone vector embeddings to power natural language queries and thread summarization across user email history.

```
Implement an AI assistant sidebar using the Vercel AI SDK (streamText). Create a background embedding pipeline that indexes synced email bodies into Pinecone with user-scoped namespaces. Add tool-calling definitions so the assistant can search email history, check Google Calendar availability, and return structured citations. Ensure prompt caching is utilized to optimize token costs on long email threads.
```

5. **Email Action Workflows & Polish** — Add productivity enhancements including AI autocomplete, inline reply drafting, task conversion, and keyboard shortcuts.

```
Build a command palette and keyboard shortcut listener (e.g., 'e' for archive, 's' for star, 'c' for compose) using standard React event hooks. Implement an AI autocomplete feature that triggers while drafting replies in the composer using the Vercel AI SDK. Add functionality to convert any email thread into a persistent local To-Do item with custom drag-and-drop ordering.
```

### Cost vs paying

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

- Google Cloud Console setup & domain verification: $0
- Total: $0 one-time

**Ongoing costs (monthly):**

- Vercel Hobby/Pro Hosting: $0-20/mo
- Anthropic API Claude usage for personal triage & assistant: $10-25/mo
- Neon & Pinecone Serverless Tiers: $0/mo
- Total: ~$15-45/mo

- Paying for the SaaS instead: $30/mo
- Build time: 120-160 hours
- AI tool credits: $20/mo
- Break-even: Not financially viable (built for learning)

## Sources

- [Shortwave Official Website](https://shortwave.com)
- [Shortwave Security & Privacy Docs](https://shortwave.com/docs/guides/security)