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

> Pomodoro focus timer with analytics and distraction blocking

- Site: https://stayinsession.com
- Category: Productivity
- Verdict: **Serious undertaking** (38/100 vibecodeable)
- Estimated effort: 4-6 weeks of part-time work

## Verdict

Build a personal web-based Pomodoro clone in a weekend, but the native OS-level blocking and cross-device sync make a faithful multi-platform clone a serious undertaking.

Replicating Session as a web app or basic timer is trivial, but Session's core value relies on native macOS/iOS apps, global system hotkeys, menubar widgets, and OS-level app/website blocking. Writing native system extensions to block apps and web filters across Safari, Chrome, and Edge on macOS involves substantial low-level engineering, Apple code-signing hurdles, and complex cross-device synchronization state machines that will consume weeks of frustration.

### What you can't replicate

- Session's polished multi-platform native app codebase
- Seamless App Store distribution and established user community
- Maintained native system extension hooks for Apple silicon

## What it does

A deep-work and Pomodoro-style focus timer paired with productivity analytics, native operating-system website/app blockers, and workflow integrations.

### Core features

- 25-minute Pomodoro focus timer with customizable durations and pause/resume states
- macOS mini-player always-on-top window and global hotkeys
- macOS app and website blocker enforcing focus rules
- Cross-device real-time sync across macOS and iOS
- Calendar and Apple Reminders integration
- Slack status auto-updating during focus blocks
- Post-session intention and reflection notes logging
- Daily and weekly productivity analytics dashboard

## The business

### Pricing

- Free: $0 — Basic timer and limited analytics
- Pro Monthly: $4.99/mo — Full feature set with blockers and cross-device sync

Founded 2020.
Team size: 1 (Solo developer).

## The hard parts

- OS-level app and website blocking across multiple browsers (Safari, Chrome, Brave, Edge) and native macOS apps
- Low-latency real-time state synchronization across multiple client devices without state drift
- Deep macOS system hooks including global keyboard hotkeys, menubar rendering, and system events
- Handling offline-to-online state conflict resolution for timer pauses and abandoned sessions

## How to vibe code Session

### Prerequisites

- Node.js (free): Required for building and running the backend sync server and web dashboard.
- Xcode (free): Required for compiling native macOS and iOS companion apps with SwiftUI and system extensions.
- GitHub (free): Source control and CI/CD triggers for backend deployment.

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding full-stack codebases, writing complex state machines, and debugging multi-file TypeScript and Swift code.
- Cursor: Ideal AI-native editor for iterative UI design and refining SwiftUI layout components.

### Stack

- Frontend: Swift / SwiftUI for macOS and iOS native apps
- Backend: Node.js with TypeScript (Express or Fastify) for real-time WebSocket sync
- Database: Turso (SQLite at the edge) for fast, low-latency user session logs and state storage
- Auth: better-auth for self-hosted, lightweight TypeScript authentication
- Payments: None (Personal use clone)
- Other: Tailwind CSS for any companion web views, Socket.io for real-time timer state sync

### Hosting

- Fly.io (Hosting the Node.js WebSocket and sync backend server close to users): $3-5/mo
- Cloudflare (DNS and static asset hosting for web companion dashboards): $0/mo

### Build guide

1. **Backend Sync & Database Schema Setup** — Initialize the Node.js backend with TypeScript, set up Turso SQLite tables for users, sessions, intentions, and categories, and configure better-auth.

```
Create a new Node.js TypeScript project using Fastify and Turso for database storage. Define database schemas for users, sessions (id, user_id, duration, category, intention, notes, started_at, ended_at, status), and categories. Implement better-auth integration with email/password authentication. Add REST endpoints for fetching user session history and syncing timer states. Ensure all SQL queries use parameterized inputs and handle connection errors gracefully. Provide clear installation instructions and a .env.example file.
```

2. **Real-Time WebSocket Synchronization Layer** — Implement Socket.io on the backend and client connectors to handle live timer state changes, pauses, and multi-device sync.

```
Add Socket.io to the Fastify backend to support real-time bidirectional event synchronization for active focus timers. When a client triggers 'start_timer', 'pause_timer', 'resume_timer', or 'abandon_timer', broadcast the updated state instantly to all connected client devices belonging to the same user ID. Implement conflict resolution where the most recent timestamp wins for pause/resume actions. Write unit tests for socket connection handling and state transition logic.
```

3. **macOS Native SwiftUI App Shell & Timer Engine** — Build the core macOS application shell in SwiftUI featuring the Pomodoro countdown timer loop, mini-player mode, and global keyboard shortcuts.

```
Create a macOS native SwiftUI application with a menubar item and an always-on-top Mini Player window. Implement the core Pomodoro state machine supporting 25-minute focus intervals and short/long breaks, with customizable durations. Add global keyboard shortcuts (using Carbon or local event monitors) to toggle play, pause, and skip. Connect the timer state machine to the backend WebSocket server so active timer ticks sync in real-time.
```

4. **macOS App & Website Blocker Integration** — Develop the focus blocker mechanism for macOS to restrict distracting applications and URLs during active focus sessions.

```
Implement a distraction shielding subsystem in the macOS app. When a focus session starts, read the user's blocked app bundle identifiers and domain lists. For apps, use NSRunningApplication monitoring to terminate or hide blacklisted applications if they launch. For websites, modify the local hosts file (/etc/hosts) or implement a lightweight local Network Extension proxy filter to block specified domains during focus mode and restore normal access when the session or break ends.
```

5. **Analytics, Reflections, and Slack Integration** — Add post-session reflection logging, daily productivity charts, and automatic Slack status updates.

```
Build a Report and Analytics view in the macOS app that aggregates completed sessions by category and date, displaying total focus hours and daily trends. Implement a post-session prompt modal that captures user intentions and reflection notes, saving them to Turso. Add an integration settings panel allowing users to connect their Slack account via OAuth and automatically update their Slack status and emoji when a focus session starts or ends.
```

6. **iOS Companion App & Polish** — Create the companion iOS app using SwiftUI with Live Activities and widget support for remote timer control.

```
Create an iOS companion app using SwiftUI that connects to the same backend WebSocket and Turso database. Implement Live Activities and Lock Screen widgets to display real-time timer countdowns and provide quick action buttons (pause, resume, abandon). Ensure seamless background audio and notification triggers when focus blocks complete on either Mac or iOS.
```

### Cost vs paying

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

- Apple Developer Account (optional for sideloading/local build): $99/yr
- Total: ~$99 one-time (optional)

**Ongoing costs (monthly):**

- Fly.io backend server hosting: $3-5/mo
- Turso database: $0/mo
- Total: ~$3-5/mo

- Paying for the SaaS instead: $4.99/mo
- Build time: 40-60 hours
- AI tool credits: $20 (Claude Pro / Cursor)
- Break-even: Not applicable (build for learning and personal utility)

## Sources

- [Session Official Website](https://stayinsession.com)
- [Session Pricing Page](https://www.stayinsession.com)
- [Session Changelog](https://www.stayinsession.com)