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

> AI-powered search engine and research assistant for academic literature

- Site: https://consensus.app
- Category: AI Research & Academic Search
- Platforms: Web app
- Verdict: **Serious undertaking** (42/100 vibecodeable)
- Estimated effort: 4-6 weeks of dedicated development

## Verdict

You can build a personal academic RAG explorer for your own uploaded PDFs, but replicating a platform indexing 220 million peer-reviewed papers with enterprise publisher integrations requires serious engineering.

The core UI of typing an academic query and getting synthesized answers with citations is straightforward to prototype using modern LLM frameworks. However, building the data pipeline to ingest, chunk, embed, and structurally extract metadata from hundreds of millions of scientific papers is an enterprise-scale undertaking. For a personal clone, you must drastically scope down: instead of indexing the global literature, build a personal RAG tool that queries arXiv open-access papers on demand or indexes your own local Zotero/PDF library.

### What you can't replicate

- Access to 220+ million paywalled peer-reviewed papers
- Direct institutional licensing integrations like LibKey
- Series-B funded data infrastructure and team

## What it does

Consensus extracts data from peer-reviewed research papers and synthesizes natural-language, evidence-backed answers with inline citations.

### Core features

- Natural language academic search
- Evidence-backed synthesis with inline citations
- Study snapshots (sample size, methodology, population extraction)
- Citation graph lineage tracking
- Deep literature review agentic workflows
- Personal paper library and PDF upload reference manager

## The business

### Pricing

- Free: $0/mo
- Pro: $12/mo
- Deep: $45/mo

### Funding

$44M raised.
- Seed Round ($1.25M - Dec 2021)
- Seed Extension ($3.1M - Jul 2023)
- Series A (~$12M - Aug 2024)
- Series B (~$30M - May 2026)
Investors: GreatPoint Ventures, Union Square Ventures (USV), NFDG, Draper Associates

Founded 2021.
Team size: ~29.

## The hard parts

- Ingesting, parsing, cleaning, and indexing millions of academic PDFs at scale
- Extracting structured variables reliably from complex scientific papers without hallucination
- Multi-step agentic orchestration for literature reviews and citation networks
- Bypassing publisher paywalls and integrating institutional resolver networks

## How to vibe code Consensus

### Prerequisites

- Node.js (free): Runtime environment for Next.js full-stack framework
- GitHub (free): Source control and repository hosting
- OpenAI or Anthropic API Key (pay-as-you-go): LLM calls for paper synthesis and structured extraction

### Recommended AI tools

- Claude Code: Best-in-class multi-step agent for building out full-stack RAG pipelines and database models
- Cursor: Ideal for fine-tuning UI components, evidence tables, and citation hover states

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui
- Backend: Next.js API Routes / Server Actions
- Database: Supabase with pgvector for storing paper embeddings and metadata
- Auth: better-auth
- Payments: None (personal use)
- Other: OpenAI API for embeddings and synthesis, Zotero API or direct PDF upload parser

### Hosting

- Vercel (Hosting the Next.js frontend and serverless API functions): $0/mo (Hobby tier)
- Supabase (PostgreSQL database with pgvector extension for semantic search over papers): $0/mo (Free tier)

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize a Next.js project with Tailwind CSS, shadcn/ui, and configure Supabase with the pgvector extension for storing paper metadata and vector embeddings.

```
Create a new Next.js 16 project with Tailwind CSS and TypeScript. Set up Supabase client connections using environment variables. Write a database migration script for Supabase using pgvector to create a 'papers' table with columns: id, title, abstract, authors, year, journal, citation_count, study_type, sample_size, and embedding (vector dimension 1536). Also create a 'saved_papers' table for user bookmarks and user libraries. Ensure proper indexing for vector similarity search.
```

2. **Open-Access Paper Ingestion Pipeline** — Build a background script or API route that queries the arXiv API or Crossref API, fetches open-access papers, generates embeddings via OpenAI, and stores them in Supabase.

```
Build an API route and ingestion service in Next.js that accepts search queries, fetches relevant open-access research papers from the arXiv API or Semantic Scholar API, downloads their metadata and abstracts, generates vector embeddings using OpenAI's text-embedding-3-small model, and inserts them into the Supabase 'papers' table. Implement robust error handling for rate limits and malformed XML/JSON responses.
```

3. **Natural Language Search & RAG Synthesis Engine** — Implement the core search endpoint that performs vector similarity search over stored papers and prompts an LLM to synthesize an evidence-backed answer with inline citations.

```
Create the core search and synthesis engine. When a user enters a research question, perform a pgvector similarity search against the 'papers' table to retrieve the top 10 most relevant papers. Construct a structured prompt for Claude/GPT that passes these paper abstracts and instructs the model to synthesize a natural-language answer, explicitly citing papers using bracketed numbers [1], [2]. Return both the synthesized markdown answer and the raw structured paper objects to the frontend.
```

4. **Frontend Search Interface & Study Snapshots** — Build the main search dashboard, results view with expandable study snapshots (methods, sample size, population), and citation preview cards.

```
Build a responsive search dashboard in Next.js resembling an academic search engine. Include a prominent search input, filter pills for study type and publication year, and a results view that renders the AI-synthesized answer with interactive citation badges. Clicking or hovering a citation badge should open a popover card showing the paper's title, authors, journal, year, and extracted study snapshot (sample size, methodology, population).
```

5. **Reference Manager & PDF Upload** — Add functionality for users to upload custom PDF papers, parse their text content, generate embeddings, and save items to personal libraries.

```
Implement a reference manager feature allowing users to upload custom PDF files. Build a server-side PDF parsing utility (using pdf-parse or unpdf) to extract text, chunk the document, generate embeddings, and store it in a user-specific collection table in Supabase. Create a library view where users can browse their saved papers, view bookmarks, and chat directly with their uploaded document collection.
```

### Cost vs paying

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

- AI API credits (OpenAI/Anthropic): ~$20
- Total: ~$20 one-time

**Ongoing costs (monthly):**

- Supabase Free Tier + Vercel Hobby: $0/mo
- Total: $0/mo

- Paying for the SaaS instead: $12/mo (Pro)
- Build time: 35-50 hours
- AI tool credits: ~$20
- Break-even: Never (built for personal learning and custom PDF querying)

## Sources

- [Consensus Official Website](https://consensus.app)
- [Consensus Pricing Page](https://consensus.app/pricing/)