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

> Edit, sign, and share PDFs online.

- Site: https://dochub.com
- Category: Productivity & Documents
- Platforms: Web app, Browser extension
- Verdict: **Solid side project** (68/100 vibecodeable)
- Estimated effort: 3-4 weeks of focused coding

## Verdict

You can build a fully functional personal PDF editor and eSignature workflow tool, but achieving bulletproof PDF layout rendering and legal audit logging takes patience.

DocHub is fundamentally a web-based PDF manipulation engine paired with an eSignature state machine. Using React and PDF.js handles the canvas and annotation rendering layer neatly. The real friction point for a solo developer is orchestrating the multi-party signature routing logic, secure tokenized access links, and formatting an immutable audit trail PDF report when a document gets finalized. If you just want to sign your own PDFs and manage personal templates without paying monthly subscription fees, building this is a rewarding project.

### What you can't replicate

- The massive organic distribution channel inside the Google Workspace Marketplace
- Enterprise compliance stamps like official HIPAA and SOC 2 audits
- A global brand trusted by 100+ million users

## What it does

DocHub is an online document management and eSignature platform designed for editing, annotating, signing, and sharing PDF and office documents.

### Core features

- PDF canvas rendering and manipulation (text, images, redaction, rotation)
- Multi-party eSignature requests and signature placement
- Signature creation (draw, type, upload image)
- Fillable form builder (checkboxes, initials, dates, custom fields)
- Document sharing via public links, email, and personal URLs
- Cryptographic audit log recording IP, timestamps, and document actions
- Template creation and reusable master forms
- Document collaboration with comments and role permissions

## The business

### Pricing

- Free: $0/mo
- Basic: ~$11/mo
- Pro: ~$16/mo

### Funding

$51.5M raised.
- Seed Round (2014) - $200K
- Series C / Acquisition Financing (June 2022)
Investors: G Squared, UiPath

Founded 2014.
Team size: Several hundred (post-acquisition by airSlate).

## The hard parts

- In-browser PDF text-layer mapping and coordinate manipulation without breaking structural layout or rendering fidelity
- Generating legally compliant, immutable cryptographic audit trails matching ESIGN/UETA standards
- Coordinating multi-party signing workflows and routing sequences deterministically
- Secure encrypted document storage and permission-based sharing access controls

## How to vibe code DocHub

### Prerequisites

- Node.js (free): Required runtime for modern full-stack TypeScript frameworks and package management.
- GitHub (free): Source code repository and direct integration hook for automated deployments.

### Recommended AI tools

- Claude Code: Best-in-class coding agent for scaffolding complex multi-file Next.js apps, managing PDF parser libraries, and writing canvas state logic.
- Cursor: Essential AI-native editor for making precise iterative adjustments to canvas coordinate placement and toolbar UI components.

### Stack

- Frontend: Next.js (React) with Tailwind CSS and PDF.js / PDFLib
- Backend: Next.js App Router API Routes
- Database: Turso (SQLite at the edge) via Drizzle ORM
- Auth: better-auth
- Payments: None (personal use clone)
- Other: Cloudflare R2 (encrypted PDF blob storage), Resend (transactional signature notifications)

### Hosting

- Cloudflare (Hosting frontend and backend routes on edge infrastructure with zero cold-start latency.): $0/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize a Next.js project with Tailwind CSS, configure Turso database with Drizzle ORM, and set up better-auth for user accounts.

```
Scaffold a new Next.js 16 application with TypeScript and Tailwind CSS v4. Set up Drizzle ORM configured for Turso (SQLite). Create database schemas for users, documents (storing metadata, file paths, owner ID, status, and audit trail JSON logs), signature blocks (storing coordinate x, y, page index, signer email, type, status), and templates. Configure better-auth for secure email/password and Google OAuth authentication. Ensure all database migration scripts are in place and verified.
```

2. **PDF Upload & Storage Pipeline** — Implement drag-and-drop document upload functionality, securely streaming files to Cloudflare R2 object storage and registering metadata in the database.

```
Implement a secure document upload endpoint and UI dropzone supporting PDF, DOCX, and image files up to 31MB. Validate file mimetypes on the server side. Stream uploaded files directly to Cloudflare R2 storage, saving the unique object key and file metadata in the Turso database documents table. Create an index view listing all user-owned documents with status tags, creation timestamps, and quick action links.
```

3. **In-Browser PDF Viewer & Annotation Toolbar** — Integrate PDF.js to render documents page-by-page onto an HTML5 canvas and build an overlay UI toolbar for adding text annotations, highlights, white-out redaction, and movable fields.

```
Build an interactive PDF editing workspace using PDF.js to render PDF pages onto responsive HTML5 canvas layers. Implement a top toolbar allowing users to insert draggable text boxes, sticky notes, white-out redaction rectangles, and image stamps. Save annotation coordinates, text content, and page index state back to the backend database on demand or auto-save. Ensure smooth zooming and panning across multi-page documents.
```

4. **Signature Creation & Field Placement Manager** — Develop signature modal supporting drawn, typed, or image-uploaded signatures, alongside a field manager overlay for placing signature and date blocks onto documents.

```
Create a signature management drawer where users can draw signatures on an HTML5 canvas, type their name with customizable cursive fonts, or upload an image autograph. Build a field placement manager allowing users to drop interactive signature fields, initials blocks, and date stamps onto specific canvas coordinates. Store these field placements linked to the document record with default unassigned or assigned signer roles.
```

5. **Multi-Party Signing Workflow & Audit Trail** — Build external signing invitation links, multi-signer token routing, and an automated cryptographic audit log generator that records IP addresses and timestamps.

```
Implement an eSignature request workflow. Allow users to specify multiple signers by email and set signing order sequences. Generate secure, tokenized public signing links sent via Resend email. When external signers open the link, render a restricted read-and-sign view where they can place their signature and submit. Upon completion, automatically generate an immutable audit trail event log recording timestamps, IP addresses, user agents, and action histories, appending an audit summary page to the finalized PDF.
```

6. **Templates & Document Export** — Add functionality to convert any completed document into a reusable template, and implement server-side PDF flattening and export pipelines.

```
Implement a template conversion feature that marks a document as a master template, allowing other users or external links to generate fresh independent copies. Build a PDF export and download pipeline using pdf-lib on the server to flatten annotations, inserted text, and applied signatures into a secure, non-editable final PDF file ready for download or sharing.
```

### Cost vs paying

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

- AI Coding Assistant Subscriptions: $20
- Domain Name (optional): $12
- Total: ~$32 one-time

**Ongoing costs (monthly):**

- Cloudflare Edge + Turso DB + R2 Storage: $0/mo (Free tiers cover personal use)
- Total: $0/mo

- Paying for the SaaS instead: ~$16/mo (Pro plan)
- Build time: 35-50 hours
- AI tool credits: $20 (one month of Claude Pro / Cursor Pro)
- Break-even: 2 months

## Sources

- [DocHub Official Website](https://dochub.com)
- [Built In Boston - airSlate Acquires DocHub](https://www.builtinboston.com)
- [Tracxn - DocHub Company Profile & Funding History](https://tracxn.com)