How to vibe codeWhen I Work
Shift scheduling and time tracking for hourly workforces
wheniwork.com ↗SaaS
The verdict: can you vibe code When I Work?
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.
Estimated effort: 3-4 weeks part-time
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
Founded
2010
Raised
$224M
Team
100-250+
Cheapest paid tier
$2.50/user/mo
What When I Work 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
- Pro$5.00/user/mo
- Premium$8.00/user/mo
Funding
$224M from Bain Capital Tech Opportunities, Arthur Ventures
Pay vs build, cumulative
Break-even at month 1 — after that, every month is money kept.
The hard parts of vibe coding When I Work
- 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 vibecode When I Work
Prerequisites
Node.jsfree
Required runtime for the Next.js full-stack application and package management.
GitHubfree
Source code repository and deployment pipeline integration.
Supabase Accountfree
Managed PostgreSQL database with built-in auth and realtime capabilities.
AI coding tools
Recommended 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 |
Build guide
01Project 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.02Manager 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.03Auto-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.04GPS 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.05Shift 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.06Labor 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 for When I Work
What will you build it with?
Starting total with Claude Code$0 one-time
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 When I Work
$25.00/mo (10 users on Pro tier)
Your time to build
40 hours
AI tool credits
$20.00 (1 month of Claude Pro / Cursor)
Break-even
Instant (Free tier hosting vs paid SaaS)
Vibe code When I Work: FAQ
- Can you vibe code When I Work yourself?
- Solid side project — 68/100 vibecodeable. 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.
- How long does it take to vibe code When I Work?
- 3-4 weeks part-time — roughly 40 hours of hands-on time with an AI coding agent.
- How do you build your own When I Work?
- Scoped to personal use: Next.js with Tailwind CSS and shadcn/ui calendar components on the front, Next.js Server Actions and API Routes behind it, Supabase (PostgreSQL with Row Level Security) for data. Follow the 6-step build guide on this page — each step has a paste-ready prompt for an AI coding agent.
- How do you code your own When I Work without being an expert?
- Use an AI coding tool (Claude Code or Cursor) and work in small steps: scaffold, data model, core screens, then deploy. Realistic effort: 3-4 weeks part-time. The prompts on this page are written so the AI does the heavy lifting.
- How much does it cost to vibe code When I Work instead of paying?
- About $20.00 one-time to start and $0.00/mo to run, versus $25.00/mo (10 users on Pro tier) for When I Work. Break-even: Instant (Free tier hosting vs paid SaaS).
- What stack should you use to vibe code When I Work?
- Next.js with Tailwind CSS and shadcn/ui calendar components; Next.js Server Actions and API Routes; Supabase (PostgreSQL with Row Level Security); plus Pusher for real-time shift updates and messaging, Resend for transactional invite emails.