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

> AI Daily Planner for Calendars & Tasks

- Site: https://morgen.so
- Category: Productivity & Calendar
- Verdict: **Serious undertaking** (42/100 vibecodeable)
- Estimated effort: 6+ weeks of part-time work

## Verdict

Build a web-only single-user subset of the calendar aggregator and task time-blocker, but keep paying for Morgen if you need robust multi-account OAuth sync and native desktop stability.

Morgen is deceptively complex because its core value depends on maintaining bulletproof, bi-directional OAuth sync with Google, Microsoft, and Apple APIs while running background token refreshes and delta webhooks. A solo developer can vibecode a web-based calendar grid that reads local JSON or single-provider APIs, but handling corporate Microsoft Graph permission scopes, timezone edge cases, and an AI optimization loop for time-blocking will require weeks of unglamorous debugging. Paying $15/month is economically rational unless you are building this entirely as a masterclass in OAuth token management.

### What you can't replicate

- The massive edge-case testing portfolio across corporate Microsoft 365 tenants and restrictive OAuth policies
- Ecosystem stability and native OS keychains for secure credential storage across Windows, macOS, and Linux

## What it does

An AI-powered daily planner and calendar aggregator that consolidates multiple calendars and task managers into a single cross-platform application with scheduling links and intelligent time blocking.

### Core features

- Unified multi-calendar grid supporting Google, Outlook, iCloud, and Fastmail
- Task management and bi-directional integration with Notion, Todoist, Linear, and ClickUp
- Drag-and-drop time blocking from task panels onto calendar slots
- AI Planner ('Kai') analyzing priorities, deadlines, and user capacity to recommend time blocks
- Customizable calendar booking pages and shareable scheduling links checking live availability
- Calendar automations for cross-calendar syncing ('busy' proxy mode), buffer times, and travel times
- Cross-platform desktop application shell (macOS, Windows, Linux) and companion web app

## The business

### Pricing

- Pro Monthly: $30/mo
- Pro Yearly: $15/mo

### Funding

$1M raised.
- Pre-seed round (July 2022)
Investors: VI Partners, New Forge, Cornelia Gut-Villa, Cyrill Osterwalder, Markus Gross

Founded 2020.
Team size: ~12 employees.

## The hard parts

- Multiproviders OAuth token management, background refresh loops, and webhook delta sync for Google, Microsoft Graph, and CalDAV protocols
- Deterministic constraint-solving combined with probabilistic AI recommendations for optimal time-blocking without hard conflicts
- Client-side caching and state synchronization across multiple connected calendar accounts without persisting raw event contents on centralized servers
- Multi-platform native desktop UI rendering with snappy calendar grid performance under heavy event load

## How to vibe code Morgen

### Prerequisites

- Node.js (free): Runtime for building the TypeScript web application backend and frontend.
- GitHub (free): Version control and repository hosting for the AI coding agent workflow.

### Recommended AI tools

- Claude Code: Best-in-class agentic coding tool for scaffolding full-stack apps, managing multi-file OAuth integrations, and debugging recursive API errors.
- Cursor: AI-native editor for precise iterative UI work on the complex calendar grid view.

### Stack

- Frontend: Next.js
- Backend: Next.js API Routes
- Database: Turso
- Auth: better-auth
- Payments: none
- Other: Vercel AI SDK, Anthropic API

### Hosting

- Vercel (Hosting the Next.js calendar web app frontend and serverless API endpoints.): $0/mo
- Turso (Serverless SQLite database storage for user tasks, local preferences, and encrypted OAuth state tokens.): $0/mo

### Build guide

1. **Project Scaffolding & Database Setup** — Initialize the Next.js project with Tailwind CSS, configure better-auth for local authentication, and connect Turso SQLite for relational data persistence.

```
Create a new Next.js TypeScript project configured with Tailwind CSS. Set up better-auth with email/password authentication using Turso as the database provider via @libsql/client. Generate the initial database schema for users, calendar_accounts (storing encrypted OAuth tokens and provider types like google and outlook), tasks (with fields for title, duration, due_date, priority, and completed status), and time_blocks (linking tasks to specific start and end times on calendar dates). Create clean directory structures for app router pages, components, and server actions.
```

2. **Calendar OAuth Integrations** — Implement OAuth flows and API fetchers for Google Calendar and Microsoft Graph to pull events dynamically into the app.

```
Build server-side OAuth connection routes for Google Calendar and Microsoft Outlook (Graph API). Store refresh tokens securely in the database. Create a unified calendar service module that queries both Google Calendar and Microsoft Graph API endpoints in parallel using Promise.all, normalizing incoming events into a standard TypeScript CalendarEvent interface (id, title, startTime, endTime, calendarId, color, isBusy). Handle token expiration and refresh automatically upon API failure.
```

3. **Unified Calendar Grid UI** — Build a responsive weekly and daily calendar grid interface supporting multi-calendar view toggles and event rendering.

```
Create a high-performance weekly and daily calendar grid component in React. The grid should display time slots from 00:00 to 24:00 vertically and days of the week horizontally. Render fetched calendar events as colored blocks positioned dynamically based on their start and end times, handling overlapping events correctly. Include a sidebar allowing users to toggle individual calendar accounts on or off, and switch between Day, Week, and Month views.
```

4. **Task Panel & Drag-and-Drop Time Blocking** — Implement a side panel for task management and drag-and-drop functionality to schedule tasks onto the calendar grid.

```
Implement a collapsible task management sidebar component supporting task creation, due dates, estimated durations, and priority levels. Integrate HTML5 drag-and-drop or pointer events so users can drag a task from the side panel directly onto an open time slot in the calendar grid. Upon dropping, calculate the drop time, create a corresponding time block in the database, and instantly render the scheduled task on the calendar grid as a time-blocked event.
```

5. **AI Planner Integration** — Integrate the Vercel AI SDK and Anthropic API to analyze uncompleted tasks and recommend optimal daily time blocks.

```
Implement an AI Planner feature using the Vercel AI SDK and Anthropic API (Claude Sonnet). When the user clicks 'Plan My Day', send an API payload containing the user's open calendar slots for the day, their capacity limits, and uncompleted tasks with priorities and deadlines. Instruct the LLM to output a structured JSON array of recommended time blocks. Display these recommendations as ghosted preview events on the calendar grid, allowing the user to click 'Accept' to persist them or 'Dismiss' to reject.
```

6. **Scheduling Links & Polish** — Build shareable booking links that read live availability across connected calendars and finalize UI polish.

```
Build a public scheduling link feature. Allow users to create unique booking slug links (e.g., /book/username/30min) configured with meeting durations. When an external visitor visits the booking page, query the user's unified calendar service to compute real-time free slots by subtracting busy events from working hours. Render an interactive slot picker for the visitor. When the visitor selects a slot and confirms, automatically create the calendar event in the user's primary calendar via the respective provider API.
```

### Cost vs paying

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

- Google Cloud & Azure Developer Console Setup: $0
- Total: $0 one-time

**Ongoing costs (monthly):**

- Vercel Hobby Hosting: $0/mo
- Turso Database: $0/mo
- Anthropic API usage for AI Planner: ~$3/mo
- Total: ~$3/mo

- Paying for the SaaS instead: $30/mo
- Build time: 35-50 hours
- AI tool credits: $20 (Claude Pro / Cursor)
- Break-even: 1 month

## Sources

- [Morgen Official Website](https://morgen.so)
- [Morgen Pricing](https://morgen.so/pricing)
- [Morgen FAQ](https://morgen.so/faq)