This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle. A misplaced book is a small problem until staff have to search a whole shelf for it. A missing facing is another small problem until someone assumes the book is out of stock. ShelfCheck is a prototype for independent bookstores: give it a catalog CSV and a shelf photo, mark a spine, and it turns confirmed matches into a short staff checklist.
The intended customer is a small bookshop that already has a catalog export but does not have time for a full shelf-by-shelf inventory. The possible paid service is a lightweight, private shelf-audit tool that staff can use during opening or restocking. That business case is a hypothesis; I have not tested willingness to pay.
Staff draw a box around a book spine. Browser-based OCR tries the crop upright and in both 90-degree rotations. ShelfCheck ranks catalog titles, then asks a person to confirm the match. A confirmed book in the wrong section becomes a Move task. After staff confirm every visible spine and say the photo covers the whole shelf, a missing expected facing becomes a Possible gap task. The app never calls a photo proof of a stockout.
To try the synthetic sample, select Load sample catalog + photo, draw a tight box around the red A Brief History of Time spine, select Read selected spine, and confirm that title. It is on the Fiction shelf in the image, while the CSV lists it in Science, so ShelfCheck creates a Move task. The sample also omits The Left Hand of Darkness: after scanning and confirming the remaining visible spines, mark the review complete to see the possible gap.
The sample is deliberately clear. I have not yet measured OCR accuracy on a real bookstore photo, and the app is not ready to infer gaps from an unreviewed shelf.
Repository: ghostmk/shelfcheck
The repository includes the MIT-licensed app, a sample shelf, a single-file demo, and tests for CSV parsing, title ranking, and the audit rules. Run npm test; run npm start to serve the app locally, or open ShelfCheck.html directly.
Tesseract.js is the open-source AI core. It runs an OCR model in the browser; no server receives the photo or catalog. I crop one selected spine, scale it up, and run recognition at 0°, 90°, and −90° because book titles often run vertically. Character-trigram similarity ranks OCR output against catalog titles and authors. Ranking is only a suggestion: the checklist uses human-confirmed matches.
The rest is plain HTML, CSS, and JavaScript. A CSV catalog supplies each book's section and expected facings for this particular shelf. There is no account, database, paid API, or per-scan inference charge. The OCR library and English model are downloaded from a CDN on first use, so that first scan needs internet access.
A store can inspect the OCR engine, run inference on its own device, and keep shelf photos and catalog rows in its browser. That matters for a small shop: it avoids sending commercially useful inventory context to a remote recognition API and avoids a usage fee every time staff scan a spine. The open stack also leaves room to replace the OCR engine or add a model for another language without rebuilding the workflow around one vendor's API.
Open OCR does not magically solve hard spines. Glare, tiny fonts, partial covers, and stylized lettering can still produce bad text. That is why the prototype makes confirmation a required step and labels gaps as possibilities rather than inventory facts.
The useful unit is not an OCR transcript; it is a task a bookseller can trust. Separating recognition, catalog suggestion, and staff confirmation made the result safer and easier to explain. The next test is a real short shelf: count visible spines, readable OCR results, correct top suggestions, confirmed misplacements, and time spent. I would then ask a bookseller whether the checklist saves time and what they would change before discussing pricing.