Turn any PDF into an interactive AI conversation. Upload a book, and BookTalk indexes its content so you can discuss it by text or voice — the AI answers grounded in what the book actually says.
- PDF upload & processing — extracts text, chunks it, and generates embeddings for retrieval
- Text chat (RAG) — ask questions about a book; answers are retrieved from the book's own content via vector search
- Voice chat — talk to a book out loud via Vapi AI
- Personal library — track your books, search/filter, and pick up where you left off
- Subscription plans — Free / Standard / Pro tiers with book-count limits, billed via Stripe
- Next.js 16 (App Router) + React 19
- Better Auth — authentication
- MongoDB Atlas + Mongoose — data storage and
$vectorSearchfor retrieval - Vercel Blob — PDF file storage
- Hugging Face Inference — text embeddings
- Vapi AI — voice conversations
- Stripe — subscription billing
- Tailwind CSS + shadcn/base-ui
Install dependencies:
npm installCreate a .env.local file with the variables listed in Environment variables below, then run the dev server:
npm run devOpen http://localhost:3000.
| Variable | Purpose |
|---|---|
BETTER_AUTH_SECRET / BETTER_AUTH_URL |
Better Auth authentication |
MONGODB_URI |
MongoDB Atlas connection string |
BLOB_READ_WRITE_TOKEN |
Vercel Blob storage |
HUGGINGFACE_API_KEY |
Embeddings for RAG search |
NEXT_PUBLIC_VAPI_API_KEY / NEXT_PUBLIC_VAPI_ASSISTANT_ID |
Voice chat |
ELEVENLABS_API_KEY |
Voice synthesis (configured in the Vapi dashboard, not read directly by the app) |
STRIPE_SECRET_KEY |
Stripe API access |
STRIPE_WEBHOOK_SECRET |
Verifies incoming Stripe webhook events |
STRIPE_PRICE_ID_STANDARD / STRIPE_PRICE_ID_PRO |
Stripe Price IDs for paid plans |
NEXT_PUBLIC_APP_URL |
Base URL used for Stripe redirect/callback URLs |
For local Stripe webhook testing, run the Stripe CLI:
stripe listen --forward-to localhost:3000/api/stripe/webhooknpm run testDeployed on Vercel. Remember to register a production Stripe webhook endpoint and set all environment variables (including live-mode Stripe keys, when ready) in the Vercel project settings.