This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
I built book.ai, a reading companion that runs entirely on your own computer and never spoils the book.
It's for a friend of mine who loves getting lost in fantasy and sci-fi like The Hobbit. Whenever she hit a confusing bit of lore or a character she'd forgotten, searching online or asking a chatbot meant risking a spoiler for a later chapter. On top of that, she didn't love the idea of her reading habits sitting on someone else's servers.
So book.ai does two things:
- Stays inside your chapter. You pick where you are in the book, and the AI only discusses what has happened up to that point. Ask about the ending and it politely declines.
- Keeps everything local. Your questions and reading history never leave your machine.
It also has a quiet, paper-toned reading UI, cached book overviews, and optional audio narration for when she'd rather listen than read.
Demo
A 5-minute walkthrough of local inference, chapter-scoped answers, and voice narration.
Code
sidharth-chauhan
/
book.ai
A self-hosted AI book companion to explore books and read chapters interactively. Auto-generates chapter breakdowns, author details, and structured content into clickable UI slides. Fully containerized with Docker, featuring React Native Web, Node.js, TypeScript, MongoDB caching, and local Ollama (Gemma) with zero external API keys needed.
book.ai
Read deeper. Spoil nothing. Share nothing.
A privacy-first, offline-capable AI reading companion that runs on your machine, not in someone else's cloud.
▶ Watch the 5-min demo walkthrough
💌 Why book.ai Exists
"I just want to ask a question about the chapter I'm on, without the app telling me how the book ends."
Built for a friend who loves reading, book.ai solves three problems with general-purpose chatbots:
- 🔒 Privacy: your questions reveal what you think and feel. They stay on your machine.
- 🙈 Spoilers: ask about chapter three and get chapter three, not the ending.
- 📴 Access: no subscription, and no connection required.
✨ Key Features
- 🧠 Local-first AI: Google's
gemma2:2bruns through Ollama on your hardware. - 📖 Book exploration: enter a title for the author, summary, and chapter breakdown.
- 🛡️ Spoiler-free Read Mode: chat about a chapter; the AI discusses only what happened up to it.
- 🎧 Audio…
The repo has everything: the React Native web frontend, the Express backend, and a docker-compose.yml that starts the database and model server in one command.
How I Built It
- Model: Google's open-weight Gemma 2 (2B), served locally through Ollama in a Docker container. It's small enough to give usable answers on an ordinary laptop.
- Backend: Node.js and Express. It builds the prompts, enforces the chapter boundary in the instructions sent to the model, and talks to Ollama.
-
Storage: A local MongoDB container caches book overviews so repeat visits load instantly. Docker volumes (
mongo_dataandollama_data) keep the cache and model weights across restarts. - Frontend: React Native with Expo Web, styled to feel like a page rather than a dashboard.
- Audio: Optional narration through the ElevenLabs API. This is the one feature that needs internet, since the text of a single answer is sent to be converted to speech. Skip it and the app works fully offline.
Why Does Open Innovation Matter?
A closed API would have broken the main promise of this project.
- Privacy. What someone asks about a book says a lot about them. With open weights, that data never has to leave their laptop.
- No meter running. Because the model runs locally, my friend can ask as many questions as she wants without paying per token or subscribing to anything.
- It works offline. She reads on trains and flights, and a local model keeps working when the connection doesn't.
Prize Categories
- Google Gemma Challenge: Gemma 2 running locally is the core of the app.
- ElevenLabs: Powers the optional voice narration.
Top comments (0)