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

> All-in-one business management and HR software platform

- Site: https://factorialhr.com
- Category: HR Software / SaaS
- Verdict: **Serious undertaking** (35/100 vibecodeable)
- Estimated effort: 3-6 months of part-time work

## Verdict

Building a functional personal clone of Factorial is a serious undertaking; keeping pace with multi-jurisdiction compliance and expansive modules requires months of dedicated engineering.

Factorial is a massive enterprise platform comprising HR, payroll, IT device management, expenses, and AI agents. While you can build a clean single-tenant web dashboard containing an employee directory, time-off tracker, and simple document store in a few weeks using modern AI tools, you will inevitably hit walls around complex role-based permissions, multi-step approval state machines, and legal e-signature audit trails. The software's real value lies in its regulatory compliance engine and extensive integrations—areas where an AI coding agent will scaffold the CRUD wrappers but leave you to manually implement brittle business logic.

### What you can't replicate

- Multi-country statutory tax, payroll, and labor compliance engines
- Network of 16,000+ verified enterprise customers and marketplace integrations
- Certified legal eIDAS compliance infrastructure for binding digital signatures

## What it does

Centralizes and automates administrative operations across HR, time tracking, talent management, finance, and IT for SMBs.

### Core features

- Employee directory & organizational chart
- Time tracking & QR/geolocation clock-ins
- Time-off and absence management
- Applicant tracking system (ATS) with CV parsing
- Document storage & eIDAS-compliant e-signatures
- Expense management with OCR scanning
- AI operational assistant ('One')
- Multi-level approval workflows & custom permissions

## The business

### Pricing

- Factorial Core: $8/mo per user
- Custom Modules: Custom quote

### Funding

$369M raised.
- Venture Round - October 2018 ($3.2M)
- Series A/B - 2020-2021 ($16M & $80M)
- Series C - October 2022 ($120M)
- Series D - June 2026 ($150M + $540M credit facility)
Investors: General Catalyst, Atomico, Tiger Global Management, CRV, Creandum, K Fund, Point Nine Capital

Founded 2016.
Team size: 1,500 - 2,700.

## The hard parts

- Deep statutory compliance and localized tax/payroll rules across multiple countries
- Complex relational matrix for organizational permissions and multi-step approval workflows
- Tamper-evident cryptographic audit trails for legal e-signatures
- Multi-tenant natural language AI querying against structured company databases

## How to vibe code Factorial

### Prerequisites

- Node.js (free): Required runtime for executing the Next.js frontend and TypeScript backend services.
- GitHub (free): Source code hosting and deployment triggers for cloud infrastructure.
- Supabase Account (free): Managed Postgres database, authentication, and file storage for employee documents.

### Recommended AI tools

- Claude Code: Terminal-based agentic coding tool ideal for scaffolding multi-file schema architectures and complex workflows.
- Cursor: AI-native code editor for reviewing diffs and making rapid iterative UI adjustments to the React dashboard.

### Stack

- Frontend: Next.js (App Router) with Tailwind CSS and shadcn/ui components
- Backend: Next.js Server Actions and API routes with TypeScript
- Database: Supabase (PostgreSQL with Row Level Security)
- Auth: better-auth
- Payments: None (Personal clone)
- Other: Resend for email notifications, Anthropic API for the AI assistant 'One'

### Hosting

- Vercel (Hosting the Next.js full-stack HR management web application): $0-20/mo
- Supabase (Hosting PostgreSQL database and employee document storage buckets): $0/mo (Free tier)

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js project with Tailwind CSS and define the comprehensive relational schema for employees, departments, time-off policies, time logs, and documents in Supabase.

```
Create a new Next.js 16 app with TypeScript and Tailwind CSS. Configure Supabase client bindings and write SQL migration files for a multi-tenant HR platform. Define tables for 'organizations', 'users', 'departments', 'time_off_requests', 'time_logs', 'documents', and 'expenses'. Include foreign key relationships, cascading deletes where appropriate, and indexes for lookup performance on organization_id and user_id.
```

2. **Authentication & Organizational RBAC** — Implement authentication using better-auth coupled with role-based access control (Admin, Manager, Employee) and organization scoping.

```
Set up better-auth in the Next.js application supporting email/password login and organization creation. Implement middleware and database schemas for Role-Based Access Control (RBAC) with roles: 'admin', 'manager', and 'employee'. Ensure that API routes enforce permissions so employees can only view their own records, managers can approve team requests, and admins have full system control.
```

3. **Employee Directory & Org Chart** — Build the employee directory interface, profile management views, and a hierarchical organization chart visualization.

```
Build an employee directory page featuring searchable data tables, filtering by department, and a detailed profile view for each employee showing personal info, contracts, and assigned manager. Also create an interactive organizational chart component using React Flow or Tailwind tree layouts that dynamically visualizes reporting lines based on the supervisor_id field in the users table.
```

4. **Time Tracking & Absence Management** — Develop the time-off request workflow, calendar view, and daily clock-in/clock-out tracking module.

```
Implement a time and absence management module. Create a calendar view using FullCalendar or custom React grids displaying team time-off. Build a request submission form for vacation/sick leave with multi-step approval routing. Add a daily clock-in and clock-out widget that records timestamps, break durations, and computes weekly total hours worked for payroll reporting.
```

5. **Document Manager & E-Signatures** — Create a secure document repository with file storage in Supabase buckets and a signature logging interface.

```
Build a document management section allowing administrators to upload company policies and contracts into Supabase storage buckets, attaching metadata to specific employees or entire departments. Implement a digital signature workflow where users can review a document and click 'Sign', recording a tamper-evident audit log entry with timestamp, user ID, and IP address.
```

6. **AI Assistant 'One' Integration** — Integrate an LLM-powered natural language chat interface that queries organizational tables to answer operational questions.

```
Build an AI chat interface named 'One' integrated with the Anthropic API. Implement tool-calling functions that allow the model to query internal database tables (e.g., fetching team headcount, summarizing pending time-off requests, or generating absenteeism reports based on company data). Ensure tenant isolation so queries are strictly scoped to the user's organization.
```

### Cost vs paying

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

- Domain name: $12 one-time
- AI API credits: $25 one-time
- Total: ~$37 one-time

**Ongoing costs (monthly):**

- Vercel Pro / Supabase Pro (optional): $20/mo
- AI API Usage: $10/mo
- Total: ~$30/mo

- Paying for the SaaS instead: $8/mo per user (~$80/mo for 10 users)
- Build time: 80-120 hours
- AI tool credits: $20/mo (Claude Pro / Cursor)
- Break-even: 2 months (at 10 users)

## Sources

- [Factorial Official Website](https://factorialhr.com)
- [Factorial Raises $150M Series D, Reaches $2.5 Billion Valuation](https://www.prnewswire.com)