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

> Smart Task Planning and Work Management

- Site: https://timehero.com
- Category: Productivity & Task Management
- Platforms: Web app, macOS app, Windows app
- Verdict: **Serious undertaking** (42/100 vibecodeable)
- Estimated effort: 6-8 weeks of focused engineering

## Verdict

Build a personal subset for your own schedule or keep paying, because writing a reliable auto-scheduling constraint solver that syncs bidirectionally with calendars requires non-trivial algorithmic work.

While an AI coding agent can scaffold the Next.js frontend, database schemas, and standard CRUD boilerplate quickly, TimeHero's core value rests entirely on its scheduling engine. Replicating an adaptive interval solver that continuously recalculates task start dates around shifting calendar meetings without breaking requires significant algorithmic logic. Furthermore, managing bi-directional webhook sync with Google and Microsoft Outlook calendars introduces brutal state-sync edge cases.

### What you can't replicate

- The exact heuristic weights of their proprietary auto-scheduling engine
- Robust enterprise-grade calendar sync infrastructure handling millions of external webhook mutations

## What it does

An AI-powered task planning and work management platform that automatically schedules tasks around external calendar events and real-time availability.

### Core features

- Adaptive interval scheduling constraint solver engine
- Bi-directional Google Calendar and Outlook 365 OAuth sync
- Smart autonomous recurring tasks spanning flexible timeframes
- Project workflow templates with dependency graphs
- Proactive time tracking and automated timesheets
- Workload capacity forecasting and risk detection

## The business

### Pricing

- Basic: $5.00/mo — Plan simple daily tasks around connected calendars.
- Professional: $12.00/mo — Smart project management, recurring tasks, and integrations.
- Premium: $27.00/mo — Automated workflow templates and reporting.

Founded 2013.
Team size: 15-20.

## The hard parts

- Writing a deterministic interval-scheduling constraint solver that dynamically recalculates uncompleted task slots around immutable external calendar meetings without infinite loops or performance degradation
- Handling incremental sync tokens, timezone offsets, recurring event expansions, and race conditions across Google and Microsoft Graph APIs
- Computing multi-user workload aggregation queries and resource allocation capacity graphs in real time

## How to vibe code TimeHero

### Prerequisites

- Node.js LTS (free): Runtime environment for the full-stack TypeScript web application.
- GitHub Account (free): Source control and deployment pipeline integration.
- Google Cloud Console Account (free): Required to configure OAuth credentials and webhooks for Google Calendar API testing.

### Recommended AI tools

- Claude Code: Best-in-class agentic CLI for multi-file architecture, complex algorithm implementation, and iterative debugging.
- Cursor: Ideal for fine-tuning UI components, Tailwind styling, and reviewing code diffs interactively.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui
- Backend: Next.js Server Actions and API Routes
- Database: Neon (Serverless Postgres with Drizzle ORM)
- Auth: better-auth
- Payments: None (personal use clone)
- Other: Vercel AI SDK, Resend for email notifications, Inngest for background scheduling recalculations

### Hosting

- Vercel (Hosting the Next.js frontend and serverless API endpoints with zero-config preview deployments.): $0-20/mo
- Neon (Serverless Postgres database storing tasks, projects, and calendar sync tokens.): $0/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js project with Tailwind CSS, configure Drizzle ORM with Neon Postgres, and define core relational schemas for users, tasks, projects, and calendar events.

```
Scramble a new Next.js project using TypeScript and Tailwind CSS. Install Drizzle ORM and configure connection pooling for Neon Postgres. Create database schemas in `db/schema.ts` for users, projects, tasks (with fields for duration_minutes, due_date, start_date, priority, status, and assigned_user_id), calendar_events (with external_id, start_time, end_time, and user_id), and task_dependencies. Write a migration script and verify database connectivity.
```

2. **Authentication & User Management** — Integrate better-auth for credential and OAuth sign-in, tying user sessions directly to the Neon database.

```
Install and configure `better-auth` in the Next.js application using Drizzle adapter to persist users and sessions in Neon Postgres. Implement sign-in, sign-up, and session-provider hooks. Create protected routes for the main dashboard layout and ensure user context flows cleanly through server actions.
```

3. **Calendar OAuth & Bi-Directional Sync** — Implement Google OAuth scopes for Google Calendar API, store encrypted refresh tokens, and build an ingestion service for external calendar events.

```
Implement Google OAuth login specifically requesting calendar read/write scopes (`https://www.googleapis.com/auth/calendar.readonly`). Store OAuth tokens securely in a dedicated user_tokens table. Build a background cron job using Next.js route handlers that fetches upcoming calendar events for authenticated users every hour, upserting them into the `calendar_events` table so the scheduling engine knows when users are busy.
```

4. **Adaptive Interval Scheduling Engine** — Develop the core algorithmic constraint solver that computes optimal task 'do' dates around calendar events and deadlines.

```
Write a robust TypeScript scheduling algorithm module in `lib/scheduler.ts`. The algorithm must take a user's uncompleted tasks (each with duration and due date), their existing calendar events (meetings where busy = true), and working hours (e.g., 9 AM to 5 PM, Monday-Friday). It must compute contiguous free time blocks and assign tasks into those slots without overlapping meetings. When a new meeting or task is added, the engine must recalculate subsequent task slots. Write unit tests covering edge cases like packed calendars and tight deadlines.
```

5. **Task Inbox & Kanban / Timeline UI** — Build the interactive dashboard views for managing tasks, viewing auto-scheduled slots, and tracking project workflows.

```
Build a responsive dashboard UI using Tailwind CSS and shadcn/ui components. Include an Inbox view for quick task capture, a project list view, and a timeline/calendar view that visualizes both calendar meetings and auto-scheduled task blocks side-by-side. Implement drag-and-drop or manual overrides for task rescheduling that trigger the scheduling engine recalculation via server actions.
```

6. **Recurring Tasks & Workflow Templates** — Implement smart recurring tasks and reusable project workflow templates with dependency linking.

```
Implement smart recurring task logic: allow users to set tasks that repeat within a flexible timeframe (e.g. once a week between Monday and Friday) where the scheduler automatically places the next iteration upon completion. Build a workflow template builder allowing users to save sets of dependent tasks as reusable templates that instantly instantiate full project timelines when triggered.
```

7. **Time Tracking, Polish & Deployment** — Add built-in timers, timesheets, error monitoring, and deploy the application to Vercel.

```
Add a global active timer component that logs elapsed time against tasks into a `time_logs` table and updates automated timesheet aggregates. Configure Sentry for error tracking. Write the final deployment configuration and verify that all environment variables for database connection and Google OAuth are properly set up on Vercel.
```

### Cost vs paying

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

- AI Coding Assistant Subscription: $20.00
- Custom Domain (optional): $12.00/yr
- Total: ~$32.00 one-time

**Ongoing costs (monthly):**

- Vercel Hobby Hosting: $0.00/mo
- Neon Serverless Postgres: $0.00/mo
- Total: $0.00/mo

- Paying for the SaaS instead: $12.00 - $27.00/user/mo
- Build time: 40-60 hours
- AI tool credits: $20.00 (1 month of Claude Pro / Cursor)
- Break-even: 0 months (Free personal tier)

## Sources

- [TimeHero Official Website & Feature Pages](https://timehero.com)
- [PitchBook - TimeHero Company Profile](https://pitchbook.com)
- [Golden Ventures Portfolio - TimeHero](https://goldenventures.ca)