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

> Where Text Starts

- Site: https://getdrafts.com
- Category: Productivity
- Platforms: macOS app, iOS app
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 3-5 weeks of focused coding

## Verdict

You can build a personal desktop-and-mobile clone of the core capture and editor loop, but replicating the deep Apple system hooks and extension ecosystem requires heavy native development.

Drafts looks deceptively simple on the surface—just a text box and a list. However, its true value lies in being an omnipresent system citizen across iOS and macOS via widgets, share extensions, URL schemes, and a JavaScript scripting runtime. Building a cross-platform personal clone in Swift or React Native/Expo to capture text locally and sync it is a rewarding multi-week engineering project, but you will spend 80% of your time wrestling with platform-specific lifecycle events, background sync conflicts, and building a secure text-automation runner rather than typing notes.

### What you can't replicate

- The 12-year accumulated polish of Apple system integrations and Share Sheet hooks
- The massive community-driven Drafts Action Directory and third-party integrations

## What it does

A quick-capture text and note-taking application designed around opening immediately to a blank page so you can type instantly without friction, then process or route the text elsewhere.

### Core features

- Instantaneous blank page launch with keyboard focus
- Inbox, archive, tag, and flag management system
- Customizable Markdown editor with font and spacing adjustments
- Action execution engine with URL schemes and text transformations
- Sandboxed JavaScript automation runner for text manipulation
- Multi-device cloud synchronization

## The business

### Pricing

- Free: Free — Core capture, editing, and basic actions with sync.
- Drafts Pro: $2.99/mo — Full access to advanced automation, workspaces, themes, and custom actions.

Founded 2006.
Team size: 1-5.

## The hard parts

- Deep Apple ecosystem hooks (Share Sheet extensions, Siri Shortcuts, Apple Watch voice capture, Home Screen widgets)
- Secure, sandboxed JavaScript execution engine that can safely parse and transform draft text contents
- Flawless local-first offline syncing across multiple devices with zero merge conflict data loss

## How to vibe code Drafts

### Prerequisites

- Mac (Owned): Required for building native Apple applications using Xcode and Swift.
- Xcode (Free): Official IDE for compiling SwiftUI macOS and iOS applications.
- GitHub Account (Free): For storing your source code and running local version control.

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding entire Swift project directories and implementing complex local database models.
- Cursor: Ideal for fine-tuning SwiftUI views, adjusting padding, and debugging layout edge cases in real-time.

### Stack

- Frontend: SwiftUI (Native iOS and macOS application)
- Backend: Local SQLite database via SwiftData / CoreData
- Database: Local SQLite file with CloudKit private database container sync
- Auth: None required (local-first personal utility)
- Payments: None required (personal-use build)
- Other: JavaScriptCore framework for running user text-processing automation scripts, WidgetKit for home screen quick-capture widgets

### Hosting

- CloudKit (Zero-server background sync between iOS and macOS devices): $0/mo

### Build guide

1. **Project Scaffolding & Local SwiftData Model** — Initialize a multiplatform SwiftUI application targeting iOS and macOS. Define the core Draft entity model supporting text content, timestamps, tags (array of strings), archive state boolean, and flag state boolean.

```
Create a new SwiftUI multiplatform app structure configured for iOS 18+ and macOS 15+. Set up a SwiftData model container named `Draft` with the following attributes: `id` (UUID, primary key), `content` (String, default empty), `createdAt` (Date), `modifiedAt` (Date), `isArchived` (Bool, default false), `isFlagged` (Bool, default false), and `tags` ([String]). Implement a repository manager to handle background saving, auto-updating timestamps on edit, and initial sorting by modification date descending. Ensure the app window launches instantly with keyboard focus assigned directly to the text editor view.
```

2. **The Instant-Capture Inbox UI** — Build the split-view layout: a sidebar/navigation list showing inbox items with tag filters, and a full-bleed text editor pane that opens immediately to a blank document or the selected draft.

```
Build a responsive NavigationSplitView for macOS and iOS. The sidebar should display filter segments ('Inbox', 'Archive', 'Flagged', and user-defined 'Tags'). The content column lists draft previews displaying the first line of text, relative timestamps, and visual indicators for flagged or tagged items. The detail view is a clean, distraction-free full-bleed TextEditor bound to the selected draft's content. When the app opens with no active selection or via a dedicated shortcut, automatically create a new empty draft and focus the text editor immediately with zero UI friction.
```

3. **Text Formatting & Markdown Styling** — Incorporate custom font selection, adjustable line height, margins, and a monospaced toggle for code or markdown writing.

```
Enhance the SwiftUI text editor view with user customization settings stored in AppStorage. Allow the user to select from standard system fonts, adjust font size (12pt to 24pt), toggle line spacing, adjust text container padding, and switch between proportional and monospaced font families. Ensure smooth scrolling and zero typing latency even for documents containing thousands of words.
```

4. **CloudKit Background Synchronization** — Configure SwiftData to sync seamlessly with Apple's CloudKit private database so drafts appear instantly across iPhone, iPad, and Mac.

```
Configure the SwiftData ModelConfiguration to back the `Draft` schema with CloudKit private database synchronization (`CloudKitContainerOptions`). Handle background sync events, ensure conflict resolution favors the most recently modified timestamp, and add a subtle sync status indicator in the app sidebar showing when syncing is idle, syncing, or encountering network issues.
```

5. **JavaScript Automation Engine (Actions)** — Implement a lightweight scripting runtime using JavaScriptCore allowing users to run custom text transformation scripts on active drafts.

```
Create an action execution subsystem using Apple's `JavaScriptCore` framework (`JSContext`). Expose a safe bridge object (`draft`) to the script execution environment with properties like `content`, `title`, `tags`, and methods to prepend/append text or trigger URL schemes. Build a management screen where users can write, edit, and test simple JavaScript snippets that manipulate the current draft's text (e.g., uppercase, lowercase, URL encode, or prepend timestamp).
```

6. **Widgets & Quick-Capture Extensions** — Add iOS Home Screen widgets and a share sheet extension to allow capturing text into the inbox from anywhere in the OS.

```
Implement a WidgetKit extension providing a home-screen quick capture button that deep-links directly into a new draft creation state using custom URL schemes (`drafts://x-callback-url/create`). Additionally, build an iOS Share Extension (`ShareViewController`) configured to extract plain text or URLs from system share sheets and save them instantly into the local SwiftData inbox container without opening the main app UI.
```

### Cost vs paying

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

- Apple Developer Program (optional, required for real device sync & app store distribution): $99/yr
- Total: ~$119 one-time (with dev account)

**Ongoing costs (monthly):**

- CloudKit storage: $0/mo
- Total: $0/mo

- Paying for the SaaS instead: $2.99/mo
- Build time: 25-40 hours
- AI tool credits: $20
- Break-even: 40 months (or instant if valued for privacy and local control)

## Sources

- [Drafts Official Website](https://getdrafts.com)
- [Drafts User Guide](https://docs.getdrafts.com)