Architecture
Shelf-School is a server-rendered Django application designed to keep a school library operational on one computer. The same Mac can serve its own kiosk or a small set of circulation devices on trusted school Wi-Fi.
Deployment topology
zxing-cpp reads QR and ISBN barcodesThe Mac is the system of record. Circulation devices do not keep a second copy of the catalog, and ISBN-intake or circulation photos are not retained after decoding.
Circulation write path
Photo identification never changes circulation state by itself. The final request locks and revalidates each selected copy inside one database transaction. A stale, repeated, or partially invalid multi-book operation cannot leave half a basket checked out.
Domain model
The database enforces one active loan per physical copy. Returned loans stay as history, and deleting or deactivating staff access does not remove the linked borrower or circulation records.
Classes and positions are protected foreign keys: assigned entries cannot be deleted. Deactivation prevents new assignments while preserving existing ones. The single borrower CSV importer validates both roles and their assignments in one transaction; it never creates authentication accounts.
Trust boundaries
Named recent activity is not rendered for signed-out users. The public desk is intentionally reachable on the trusted school network; staff and advanced surfaces remain protected by Django authentication.
Storage and external services
db.sqlite3is the default structured store and must be backed up withmedia/.- Uploaded files use local media storage on the dedicated Mac.
zxing-cppdecodes QR and ISBN barcodes locally without a paid API.- Open Library is contacted only for optional ISBN metadata and covers.
- No paid AI service is required.