§1The problem
Hard books, or books in another language, force you to leave the reader to ask an AI for help. There was no help inside the page itself, without losing your place.
§2What I built
- AI bridge serverRuns on my own computer or in the cloud (with a Dockerfile), with two engines: an LLM command-line tool or a direct API.
- App planConfigurable buttons (name, icon, instruction), a per-page cache and context from neighbouring pages.
- PDF importer (planned)PDF text or Apple OCR, clean-up and EPUB generation.
- Build guideStep-by-step instructions for an AI agent on a Mac to build the SwiftUI app.
§3The hard parts
4 entries- 01
Cutting the command-line LLM's latency
With a lean configuration the first text arrives in 1.2 to 2.5 s; ending the read at the end of the message avoids ~3 s of extra waiting.
- 02
The app builds the prompt, the server only relays it
So every path gives the same result.
- 03
Content-based cache
Page text + instruction, so going back to a page costs nothing.
- 04
Scanned PDF to a real EPUB
OCR, header/footer removal, joining hyphens and paragraphs, chapters from the table of contents.
§4Result
- to the first rewritten text
- 1.2-2.5 s
- automated server tests
- 9
The server runs on my own computer, with 9 automated tests (using a fake AI). The iPad app has been started; the PDF importer is still planned.
§5Stack
- Node (server)
- Docker
- LLM via command line or API
- Swift / SwiftUI (iPadOS 26, planned)
- PDFKit and Vision (planned)
- pm2
- Tailscale