# How to Vibe Code Your Own When I Work (and Stop Paying for It)

> Shift scheduling and time tracking for hourly workforces

- Site: https://wheniwork.com
- Category: SaaS
- Verdict: **Solid side project** (68/100 vibecodeable)
- Estimated effort: 3-4 weeks part-time

## Verdict

You can build a personal shift-scheduling and time-tracking clone for internal team operations, but the real-time sync and auto-scheduling constraint solver will test your patience.

When I Work combines a complex calendar matrix, a constraint-satisfaction scheduling engine, and location-verified time tracking. While a solo developer can build a clean Next.js + PostgreSQL clone for personal operations in a few weeks, writing the shift-swapping state machine and managing offline mobile GPS punches involves substantial debugging.

### What you can't replicate

- Network of 200,000 active business tenants
- Native enterprise payroll certifications with ADP, Gusto, and Rippling
- Brand equity and historical compliance trust

## What it does

Cloud-based workforce management SaaS platform tailored for shift-based and hourly teams, featuring drag-and-drop scheduling, GPS time clock, and team messaging.

### Core features

- Multi-location and multi-week drag-and-drop schedule builder
- Automated one-click shift assignment engine based on availability and qualifications
- GPS-verified digital time clock and geofenced punching
- Peer-to-peer shift swaps and OpenShifts approval workflow
- Real-time team messaging channels for direct and group communication
- Labor forecasting, scheduled-vs-actual budget tracking, and overtime alerts
- Payroll export integrations (Gusto, ADP, QuickBooks, Rippling)

## The business

### Pricing

- Essentials: $2.50/user/mo — Core employee scheduling, templates, auto-scheduling, and team messaging.
- Pro: $5.00/user/mo — Advanced scheduling rules, time tracking, and geofencing.
- Premium: $8.00/user/mo — Enterprise-grade integrations and security.

### Funding

$224M raised.
- Early Venture Round
- $200M Growth Investment (2021 by Bain Capital Tech Opportunities)
Investors: Bain Capital Tech Opportunities, Arthur Ventures

Founded 2010.
Team size: 100-250+.

## The hard parts

- Constraint-satisfaction auto-scheduling algorithm balancing rolling availability, skill sets, and labor laws
- GPS geofencing verification and offline punch synchronization on mobile devices
- Real-time WebSocket synchronization across distributed mobile and web clients for instant shift drops
- Complex relational database queries handling overlapping shifts, multi-location roles, and timezone toggling

## How to vibe code When I Work

### Prerequisites

- Node.js (free): Required runtime for the Next.js full-stack application and package management.
- GitHub (free): Source code repository and deployment pipeline integration.
- Supabase Account (free): Managed PostgreSQL database with built-in auth and realtime capabilities.

### Recommended AI tools

- Claude Code: Best-in-class terminal coding agent for scaffolding complex relational data models and calendar UI components.
- Cursor: Essential for iterative UI development and reviewing multi-file calendar grid diffs.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui calendar components
- Backend: Next.js Server Actions and API Routes
- Database: Supabase (PostgreSQL with Row Level Security)
- Auth: better-auth
- Payments: none
- Other: Pusher for real-time shift updates and messaging, Resend for transactional invite emails

### Hosting

- Vercel (Hosting the Next.js full-stack frontend and serverless API endpoints.): $0-20/mo
- Supabase (PostgreSQL database storage and real-time pub/sub synchronization.): $0/mo

### Build guide

1. **Project Scaffolding and Database Schema** — Initialize the Next.js project with Tailwind CSS, configure better-auth, and set up the relational PostgreSQL database schema in Supabase.

```
Scramble a new Next.js project configured with TypeScript, Tailwind CSS, and shadcn/ui. Set up a Supabase PostgreSQL connection and write a comprehensive SQL migration script for a workforce management tool. Create tables for users (id, name, email, role, hourly_wage), locations (id, name, address, geofence_lat, geofence_lng, radius_meters), shifts (id, location_id, user_id, start_time, end_time, position, status, notes), time_clocks (id, user_id, shift_id, clock_in_time, clock_out_time, lat, lng, verified_geofence), and messages (id, sender_id, channel_id, content, created_at). Configure better-auth with email/password and organization roles (manager, employee) mapped to the user table. Ensure all foreign keys, indexes on timestamps, and basic row-level security policies are properly instantiated.
```

2. **Manager Calendar & Schedule Grid UI** — Build an interactive weekly and monthly calendar view for managers to assign shifts across locations and roles.

```
Build a responsive manager scheduling dashboard in Next.js using a multi-row calendar grid where rows represent employees or positions and columns represent days of the week. Implement drag-and-drop or modal-based shift creation allowing managers to select start time, end time, location, position color coding, and hourly rate. Add filters for locations and departments. Include visual indicators for scheduled weekly hours against labor budgets, and highlight overtime risks when a shift pushes an employee past 40 hours. Write server actions to persist shift insertions and updates atomically.
```

3. **Auto-Scheduling & Constraint Engine** — Implement a backend routine that automatically assigns unassigned shifts based on employee availability and qualifications.

```
Implement an auto-scheduling feature on the backend. Create an algorithm in a server action that takes a list of open shifts for a given week and evaluates eligible employees based on their availability windows, position qualifications, and max weekly hour caps. The algorithm should greedily match shifts to available staff without causing double-booking or overtime violations, then bulk-insert the assignments into the shifts table. Expose a trigger button in the manager UI to run auto-scheduling and return a summary of assigned versus unassigned shifts.
```

4. **GPS Time Clock & Geofencing Verification** — Build employee time-tracking interfaces with browser/device geolocation verification against location geofences.

```
Create an employee time clock interface where staff can view their assigned upcoming shifts and click a prominent 'Clock In' or 'Clock Out' button. Using the browser's Geolocation API, capture the user's current latitude and longitude upon clicking. On the backend, calculate the Haversine distance between the user's coordinates and the target location's registered geofence center point. If the distance is within the location's radius_meters threshold, record the punch with verified_geofence = true; otherwise, flag it or require manager approval. Display live timesheet summaries, total hours worked, and break tracking.
```

5. **Shift Swaps, OpenShifts & Team Messaging** — Develop peer-to-peer shift drop/swap workflows and real-time communication channels.

```
Build a shift marketplace and messaging system. Allow employees to drop a shift into an 'OpenShifts' pool or request a direct swap with a peer, triggering a notification for manager approval. Implement a real-time messaging interface using Pusher or Supabase Realtime channels where managers and staff can exchange direct messages and broadcast group announcements without exposing personal phone numbers. Add unread badge counts, message history pagination, and push notification triggers for shift updates.
```

6. **Labor Forecasting & Payroll Export Polish** — Add labor cost calculation, forecasting charts, and CSV/API export for payroll systems.

```
Build a labor forecasting and reporting analytics view for managers. Calculate projected labor costs by multiplying scheduled shift hours by employee hourly wages, and render daily/weekly cost charts using Recharts. Implement a payroll export page that aggregates verified timesheet hours per employee over a selected pay period (e.g., bi-weekly) and generates a downloadable CSV formatted for standard payroll processors like Gusto and ADP, including regular hours, overtime hours, and gross pay sums.
```

### Cost vs paying

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

- AI Coding Assistant Subscription: $20.00
- Total: $20.00 one-time

**Ongoing costs (monthly):**

- Vercel & Supabase Hosting: $0.00/mo
- Total: $0.00/mo

- Paying for the SaaS instead: $25.00/mo (10 users on Pro tier)
- Build time: 40 hours
- AI tool credits: $20.00 (1 month of Claude Pro / Cursor)
- Break-even: Instant (Free tier hosting vs paid SaaS)

## Sources

- [When I Work Official Website & Feature Pages](https://wheniwork.com)
- [When I Work Pricing Page](https://wheniwork.com/pricing)
- [Crunchbase News - When I Work Raises $200M](https://news.crunchbase.com/news/when-i-work-raises-200m-bain-capital/)