Skip to main content

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​

The 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​

Staff account 1 to 1 BorrowerBorrower ID, name, and email stay synchronized.
School profile 1 per installationBranding, contact details, and default loan duration.
School class 1 to many StudentsOptional assignment; renaming updates every linked profile.
Employee position 1 to many EmployeesOptional assignment, independent of login permissions.

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​

PublicCirculation deskSupervised checkout and return without a student login
StaffLibrary operationsCatalog, borrowers, reports, backups, and school settings
System administratorAdvanced Django AdminExceptional technical database and permission maintenance

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.sqlite3 is the default structured store and must be backed up with media/.
  • Uploaded files use local media storage on the dedicated Mac.
  • zxing-cpp decodes 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.