Chat with PDF is a full-stack AI-powered application that lets you to ask questions to PDF documents.
The application is running with server-side rendering on the edge using Cloudflare Pages.
You can deploy it with zero configuration on your Cloudflare account using NuxtHub:
hubBlob() to store PDFs in Cloudflare R2hubDatabase() to store document chunks and full-text search on Cloudflare D1hubAI() to run Cloudflare AI models for LLM chat and generating text embeddingshubVectorize() to find relevant document context in Cloudflare VectorizehubKV() for IP ratelimitingnpx nuxthub deploy - To deploy the app on your Cloudflare account for free
This project uses a combination of classical Full Text Search (sparse) against Cloudflare D1 and Hybrid Search with embeddings against Vectorize (dense) to provide the best of both worlds providing the most applicable context to the LLM.
The way it works is this:
Credits: https://github.com/RafalWilinski/cloudflare-rag#hybrid-search-rag
bash
pnpm installbash
npx nuxthub linkbash
npx nuxthub deploybash
pnpm dev --remoteVisit http://localhost:3000 and start chatting with documents!
Host your Chat with PDF instance on a free Cloudflare account and free NuxtHub account.
Deploy it online in the NuxtHub UI:
Or locally with the NuxtHub CLI:
npx nuxthub deploy
This command will deploy your Chat with PDF instance to your Cloudflare account and provision a Cloudflare R2 bucket. You will also get a free <your-app>.nuxt.dev domain.
What's included in Cloudflare free plan: - 100,000 requests/day - 10 GB storage on Cloudflare R2 - 10,000 tokens a day for Workers AI - 30 million queried vector dimensions / month - 5 million stored vector dimensions
Read more about the pricing on our detailed pricing page.
You can also deploy using Cloudflare Pages CI or GitHub actions.
Once your project is deployed, you can use NuxtHub Remote Storage to connect to your preview or production Cloudflare R2 bucket in development using the --remote flag:
pnpm dev --remote
Published under the MIT license.
$ claude mcp add chat-with-pdf \
-- python -m otcore.mcp_server <graph>