How stephenworld/library-management-system works
This is a console library-management application. The main workflow loads JSON-backed library state, lets members request and track loans, and lets librarians review requests and maintain the catalog; account creation and data synchronization are also exposed through the menus. models.py combines domain entities, library operations, and persistence, while utils.py implements the interactive workflows. The excerpts do not show every persistence or loan operation, so those relationships are included only where documented by the README.
Main entry points: models.py Library Service · utils.py Role Menus · main.py Application Loop · books.json Book Catalog
Components 14
Console Entry
- Application Loop
main.py
User Workflows
- Role Menus
utils.py - Account Creation
utils.py - Member Actions
utils.py - Request Review
utils.py - Catalog View
utils.py - Data Sync
utils.py
Library Domain
- Library Service
models.py - Books and Users
models.py - Request History
models.py
JSON Storage
- Book Catalog
database/books.json - Accounts and Loans
database/users.json - Request Records
database/requests.json
Other components
- Member or Librarian
Connections 19
- Member or Librarian → Application Loop: starts
README.md - Application Loop → Library Service: loads data
main.py - Application Loop → Role Menus: routes choices
main.py - Role Menus → Account Creation: creates account
utils.py - Account Creation → Library Service: registers user
utils.py - Role Menus → Member Actions: opens member menu
utils.py - Member Actions → Library Service: requests or returns
utils.py - Member Actions → Request History: reads status
utils.py - Role Menus → Request Review: opens librarian menu
utils.py - Request Review → Library Service: reviews requests
utils.py - Role Menus → Catalog View: shows books
utils.py - Catalog View → Books and Users: displays catalog
utils.py - Role Menus → Data Sync: syncs data
utils.py - Data Sync → Library Service: reloads data
utils.py - Library Service → Book Catalog: reads and writes
README.md - Library Service → Accounts and Loans: reads and writes
README.md - Library Service → Request Records: reads and writes
README.md - Library Service → Books and Users: manages records
models.py - Library Service → Request History: maintains history
models.py