Next Chapter: A Reading Queue That Explains Where Each Book Belongs
The Problem
My to-read list is the only queue in my life that only grows at one end. A new book lands at the bottom, a library hold arrives with a two-week clock on it, and a friend’s recommendation stays at the bottom anyway because nothing ever rearranges the list. Sorting by hand works for about a week.
The tools I tried had the opposite problem: they reordered things for me, with no explanation, and I stopped trusting the list. So I wrote down what I actually wanted: a queue that suggests where a book belongs, tells me why, and never moves anything without my say-so.
What I Built
Next Chapter is a self-hosted, single-reader web app. Two ideas sit at the center:
- Find its place. Pick one new book and it suggests a slot, preserving the relative order of every other book.
- Rethink my queue. Reconsider the whole list using your want-to-read ranking, library timing, preferred length, mood tags, and series order.
Either way you get a preview with reasons, and you decide whether to apply it. Pinned books keep their positions. You can undo until the next library change.
The Design Decisions I Care About
Ranking is boring on purpose. Each queued book starts with its want-to-read rating times ten, then picks up points for the strongest library signal (ready for pickup beats borrowed beats available), a deadline within a week, a hold you expect soon, a mood tag match, and a length match. That’s it. It’s a small table in the README, it’s deterministic, and it has no database or HTTP access, so the same queue always produces the same suggestion. Equal scores keep their existing order. Impossible constraints produce a clear error instead of quietly moving a pinned book.
Explanations never reorder anything. The short reason under each title (“library deadline”, “next in the series”, “you moved this by hand”) is computed separately from ranking. It describes the order; it doesn’t create it.
Library activity never changes what I’ve read. Libby and NYPL data are imported as separate streams. Returning a book doesn’t mark it finished, and a book disappearing from an export isn’t treated as a return. Library-only titles land in a To review pile and wait for a human decision.
Imports are repeatable. Goodreads turned off its public shelf feeds in 2026, so the supported path is exporting a CSV and importing it as often as you like. Matching goes by Goodreads ID, then ISBN, then normalized title and author. New books are appended and marked Needs placement; imports never reorder the queue.
Optional means optional. There’s no AI service, API key, or subscription required. If you want a language model’s second opinion, you can connect a hosted one with your own key or run one on your own hardware with Ollama or any OpenAI-compatible server. Every request shows what it will share first. Private notes never go to AI, lookups, or ranking. Book-detail lookup and the Hardcover connection are also off until you switch them on and press the button.
How It’s Built
It’s a single Go binary with SQLite and server-rendered HTML, with no frontend build step and no C compiler. Migrations are appended, never edited, and each one takes a .pre-vN.bak backup first. It runs under Docker Compose or Kubernetes (with a Helm chart), as one replica, because SQLite on a local volume is the right size of database for one reader.
It started as a Python and Flask app and was rebuilt in Go. A lot of the work since then was driven by a prompts/ directory: numbered, self-contained prompts, each pasted into a fresh Claude Code session in the repo, with AGENTS.md and CLAUDE.md holding the rules a session has to follow (never silently reorder a queue, imports must be idempotent, no mandatory paid service). The suite now has over 400 test functions, run with the race detector in CI.
What’s Still Rough
I’d rather say it plainly than have you find it:
- The Hardcover calls are covered by synthetic servers and request shapes from Hardcover’s official SDK, but I haven’t run a live check against the real API yet.
- Libby export columns vary by locale, so the parser accepts common variants and rejects the rest with an actionable error.
- It’s a one-reader app. Multiple accounts and PostgreSQL are a “maybe, once the personal workflow is proven” item.
It’s released as-is and open to everyone, and I’m still adding to it as I go. The code is public and MIT-licensed at github.com/lafronzt/next-chapter. If your to-read list also only grows at one end, I’d like to hear whether the reasons make sense to you.