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

> The no-fuss reference manager for the web

- Site: https://paperpile.com
- Category: Research & Citation Management
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 3-4 weeks part-time

## Verdict

You can build a personal reference manager with a web UI and PDF parser, but the real-time Google Docs collaborative add-on ecosystem is a grueling engineering bottleneck.

Replicating Paperpile's core personal workflow—saving references, organizing tags, reading and annotating PDFs, and generating a BibTeX or markdown bibliography—is entirely feasible with AI coding agents. However, Paperpile's true moat lies in its deep, bi-directional Google Docs sidebar integration that handles live footnotes, collaborative citation injection, and multi-author bibliography sorting without breaking. Furthermore, writing robust DOM scrapers that harvest metadata cleanly across thousands of eccentric academic publisher paywalls requires constant maintenance. For personal use, building a standalone web library with an integrated PDF viewer and local export is a rewarding 3-4 week project, but trying to clone the Google Docs plugin ecosystem will test your patience against strict third-party extension review pipelines and web-socket sync edge cases.

### What you can't replicate

- The seamless, native Google Docs real-time collaborative citation sidebar used by co-authors
- Instant one-click metadata extraction across thousands of publisher paywall domains without maintenance overhead

## What it does

A web-based reference and citation management platform tailored for academic researchers, students, and scientists to collect, organize, annotate PDFs, and cite in Google Docs and Microsoft Word.

### Core features

- One-click browser extension metadata and PDF scraping from Google Scholar, PubMed, and arXiv
- Reference library management with folders, labels, stars, and duplicate merging
- Cloud storage integration for raw PDFs (Google Drive / S3 storage layer)
- Web-based PDF reader with highlights, sticky notes, and drawing markups
- Citation formatting engine supporting Citation Style Language (CSL) schemas
- Google Docs sidebar add-on and Microsoft Word add-in for real-time collaborative citation injection

## The business

### Pricing

- Regular: $4.15/mo — Reference management essentials, billed annually.
- Expert: $5.75/mo — Best value for full research management, billed annually.
- Enterprise: Custom — For institutions, universities, and corporate labs.

Founded 2012.
Team size: 10-25.

## The hard parts

- Building resilient DOM scrapers and metadata extractors across thousands of heterogeneous publisher paywall sites
- Implementing bi-directional collaborative citation tracking and bibliography compilation inside Google Docs via Google Apps Script
- Synchronizing PDF file states, highlights, and annotations conflict-free across web and mobile viewports
- Rendering 9,000+ localized citation styles accurately using CSL XML parsing engines

## How to vibe code Paperpile

### Prerequisites

- Node.js (free): Required runtime for building the full-stack TypeScript application.
- GitHub (free): Version control and deployment pipeline source repository.

### Recommended AI tools

- Claude Code: Best-in-class multi-file agentic coding tool for scaffolding full-stack applications and handling complex API integrations.
- Cursor: Ideal for fine-tuning the React-based PDF annotation UI and reviewing inline code diffs.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui
- Backend: Next.js Server Actions / API Routes
- Database: Turso (SQLite at the edge for reference metadata and annotations)
- Auth: better-auth
- Payments: None (Personal use clone)
- Other: Cloudflare R2 for reliable PDF and supplementary file object storage, PDF.js for client-side PDF rendering and annotation layers, citeproc-js for CSL citation style formatting

### Hosting

- Cloudflare (Hosting frontend Next.js app, Turso SQLite database, and R2 object storage for PDFs): $0-5/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js application, configure Turso database connectivity, and implement better-auth for single-user secure login.

```
Scaffold a new Next.js 16 application using Tailwind CSS and TypeScript. Set up Turso (libSQL) as the database client and configure better-auth with Google OAuth authentication. Create database tables for 'references' (storing DOI, title, authors, year, journal, abstract, reference_type), 'folders' (for library organization), and 'pdf_annotations' (storing page number, coordinates, highlight color, and comment text). Ensure all relational foreign keys and indices are optimized for fast searching.
```

2. **Reference Import & Metadata Ingestion Engine** — Build backend endpoints to parse DOIs, PubMed IDs, and uploaded BibTeX files to populate structured reference entries.

```
Build a metadata ingestion service in the Next.js backend. Implement API integrations with Crossref and PubMed APIs to fetch complete bibliographic records given a DOI or PMID. Create a BibTeX file parser utility that ingests uploaded .bib files, parses entries into structured JSON objects, and saves them to the Turso database. Include a duplicate detection algorithm based on normalized titles and DOIs.
```

3. **PDF Storage & Cloudflare R2 Integration** — Implement drag-and-drop PDF uploads linked directly to reference items, stored securely in Cloudflare R2 object storage.

```
Implement file upload handling in Next.js connected to Cloudflare R2 object storage. Allow users to attach PDF files and supplementary documents (Excel, Word) to existing reference records. Create secure pre-signed URL generation endpoints for viewing and downloading files. Ensure automatic filename normalization based on author, year, and title metadata patterns.
```

4. **Web-Based PDF Reader & Annotation Canvas** — Integrate PDF.js to render research papers directly in the web app with interactive text highlighting and sticky notes.

```
Build a web-based PDF reader view using PDF.js embedded in a Next.js component. Implement interactive text selection and highlighting in multiple colors, along with sticky note attachments tied to specific coordinate rects on PDF pages. Save all annotation layers back to the Turso database linked to the reference ID and sync positions accurately on zoom and page turn.
```

5. **Citation Formatting & Bibliography Generation** — Integrate citation formatting engines to generate clean bibliographies and in-text citations across standard formats like APA, MLA, and Chicago.

```
Integrate the Citation Style Language (CSL) formatting processor (or citeproc-js wrapper) into the application. Build a citation picker modal that allows users to search their library, select one or multiple references, specify page numbers or chapters, and copy formatted in-text citations or full bibliographies in APA, MLA, Chicago, or BibTeX formats.
```

6. **Library UI & Organization Dashboard** — Construct a responsive dashboard featuring folder trees, colored labels, star ratings, and real-time search filters.

```
Design and build the main library dashboard using Tailwind CSS and shadcn/ui components. Implement a sidebar with custom folders, tag filters, and star ratings. Build a lightning-fast search bar that filters references across title, authors, journal, and abstract in real-time. Add bulk actions for moving references into folders, exporting selections, and deleting items.
```

### Cost vs paying

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

- Domain name (optional): $12 one-time
- AI coding tool subscription: $20
- Total: ~$32 one-time

**Ongoing costs (monthly):**

- Cloudflare Workers / Turso / R2 storage: $0-5/mo
- Total: ~$3/mo

- Paying for the SaaS instead: $4.15/mo - $5.75/mo (billed annually)
- Build time: 40-60 hours
- AI tool credits: $20 (1 month of Claude Pro / Cursor Pro)
- Break-even: 8 months

## Sources

- [Paperpile About Page](https://paperpile.com/about/)
- [Paperpile Pricing & Features Documentation](https://paperpile.com/pricing/)
- [Paperpile Technical Overview & Help Center](https://help.paperpile.com/)