AI reading companion for PDFs

Bookify

AI-powered reading companion — upload a PDF book, get an AI-generated overview, chat with the content via RAG, and have live voice conversations about it.

Bookify screenshot

Documentation

<div align="center"> <img src="images/home.png" alt="Bookify Home" width="100%" /> <h1>Bookify</h1> <p><strong>Read smarter.</strong> Upload any book, chat with it, and listen to voice summaries — all powered by AI.</p> <p> <img src="https://img.shields.io/badge/Next.js-16-black?logo=next.js" /> <img src="https://img.shields.io/badge/React-19-61DAFB?logo=react" /> <img src="https://img.shields.io/badge/TypeScript-5-3178C6?logo=typescript" /> <img src="https://img.shields.io/badge/AI-Gemini%20%7C%20LangChain-4285F4?logo=google" /> </p> </div>

What is Bookify?

Bookify is an AI-powered reading companion. Upload a PDF book and get:

  • An AI-generated overview covering key themes and important topics
  • A chat interface to ask questions about the book and get contextual answers
  • A voice conversation mode where you can talk to the book out loud
  • Smart metadata extraction — title, author, genre, and tags auto-filled from the PDF

Screenshots

Book Detail

<img src="images/book.png" alt="Book detail page" width="100%" />

AI-Generated Overview

<img src="images/book-overview.png" alt="Book overview with AI summary" width="100%" />

Chat with Your Book

<img src="images/book-chat.png" alt="Chat interface" width="100%" />

Voice Conversations

<img src="images/book-voice.png" alt="Voice call mode" width="100%" />

Features

FeatureDescription
PDF UploadUpload books up to 50 MB; stored securely in AWS S3
AI MetadataGemini auto-extracts title, author, description, genre, and tags
Book OverviewAI-generated summary with important topics, themes, and insights
Chat (RAG)Ask anything about the book — answers grounded in the actual text via pgVector embeddings
Voice ModeChoose a voice persona (Male Professional, Female Friendly, etc.) and have a spoken conversation about the book
PDF ViewerRead the original PDF inline, side-by-side with the AI panel
LibraryBrowse and manage all your uploaded books
AuthSecure sign-in and sign-up via Clerk

Tech Stack

Frontend

Backend & AI

  • MongoDB — book metadata and chat history
  • NeonDB + pgVector — vector embeddings for RAG search
  • AWS S3 — PDF and cover image storage
  • Google Gemini — metadata extraction, embeddings, and summaries
  • LangChain — AI orchestration and agent actions
  • Vapi — real-time voice AI conversations
  • Inngest — background book processing pipeline

Auth & Infra


Getting Started

Prerequisites

  • Node.js 20+
  • A MongoDB instance (local or Atlas)
  • NeonDB project with pgVector enabled
  • AWS S3 bucket
  • Clerk application
  • Google Gemini API key
  • Vapi account
  • Inngest account (or use the local dev server)

Installation

git clone https://github.com/your-username/bookify.git
cd bookify
npm install

Environment Variables

Copy .env.example to .env.local and fill in your credentials:

cp .env.example .env.local
VariableDescription
MONGODB_URIMongoDB connection string
NEON_DATABASE_URLNeonDB connection string (with pgVector)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYClerk publishable key
CLERK_SECRET_KEYClerk secret key
GEMINI_API_KEYGoogle Gemini API key
GEMINI_MODELGemini model name (e.g. gemini-2.0-flash)
AWS_REGIONS3 bucket region
AWS_S3_BUCKETS3 bucket name
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
VAPI_API_KEYVapi API key
VAPI_VOICE_ID_MALE_PROFESSIONALVapi voice ID
VAPI_VOICE_ID_FEMALE_FRIENDLYVapi voice ID
INNGEST_EVENT_KEYInngest event key
INNGEST_SIGNING_KEYInngest signing key

Run Locally

npm run dev

App runs at http://localhost:3001.

For background book processing, start the Inngest dev server in a separate terminal:

npx inngest-cli@latest dev

Project Structure

src/
├── app/
│   ├── (preview)/preview/[id]/   # Book reader — PDF viewer + AI panels
│   ├── (protected)/upload/        # Book upload flow
│   └── api/                       # API routes (books, chat, voice, users)
├── modules/
│   ├── agents/                    # AI agent actions (summary, embeddings)
│   ├── books/                     # Book model, schema, types
│   ├── chat/                      # Chat model
│   └── voice/                     # Voice model
├── lib/
│   ├── inngest/                   # Background processing pipeline
│   ├── vector-store.ts            # pgVector insert/search
│   ├── chunker.ts                 # PDF text chunking
│   └── api/                       # S3, Vapi, embeddings helpers
└── components/                    # Shared UI components

Scripts

ScriptDescription
npm run devStart dev server on port 3001
npm run buildProduction build
npm run lintLint with ESLint
npm run type-checkTypeScript type check
npm run summaries:backfillBackfill AI summaries for existing books

License

MIT