How gitbito/openlibrary works
Open Library is an editable, web-based book catalog that also exposes catalog APIs, search, online reading, and lending. A typical workflow starts with a reader or cataloger using the web application, which serves catalog and account operations; catalog records are imported or edited, grouped into works and editions, indexed for discovery, and linked to reading and lending services. The graph includes catalog-ingest and search/indexing branches alongside the user workflow. Some major capabilities are documented but their runtime wiring was not sampled, so those relationships are shown only where supported or are omitted.
Main entry points: lending.py Lending service · __init__.py Catalog editing · by_author.py Work matching · app.py Web application
Components 20
Web application
- Web application
openlibrary/app.py - Accounts
openlibrary/accounts/model.py
Catalog and ingest
- Catalog editing
openlibrary/catalog/add_book/__init__.py - Record loading
openlibrary/catalog/add_book/load_book.py - MARC parsing
openlibrary/catalog/marc/fast_parse.py - Record merging
openlibrary/catalog/merge/merge.py - Work matching
openlibrary/catalog/works/by_author.py - Archive imports
openlibrary/catalog/get_ia.py
Search and data
- Search interface
openlibrary/plugins/search/solr_client.py - Search API
openlibrary/plugins/worksearch/searchapi.py - Search indexing data
openlibrary/data/solr.py - Catalog exports
openlibrary/data/dump.py
Reading and lending
- Lending service
openlibrary/core/lending.py - Waiting list
openlibrary/core/waitinglist.py - Loan statistics
openlibrary/views/loanstats.py
Shared services
- Cover service
openlibrary/coverstore/code.py - Catalog database
openlibrary/core/db.py
Other components
- Readers and catalogers
- Internet Archive
- Solr
Connections 23
- Readers and catalogers → Web application: uses
- Web application → Accounts: serves account views
- Web application → Catalog editing: serves catalog edits
- Catalog editing → Record loading: loads records
openlibrary/catalog/add_book/__init__.py - Catalog editing → Record merging: merges records
openlibrary/catalog/add_book/__init__.py - Record loading → MARC parsing: parses MARC
- Work matching → Archive imports: retrieves archive data
openlibrary/catalog/works/by_author.py - Work matching → MARC parsing: parses fields
openlibrary/catalog/works/by_author.py - Work matching → Record merging: uses merge logic
- Readers and catalogers → Search interface: searches catalog
- Search interface → Solr: queries
- Search API → Solr: queries
- Search indexing data → Solr: prepares index data
- Catalog exports → Search indexing data: uses indexing data
openlibrary/data/dump.py - Readers and catalogers → Lending service: borrows books
- Lending service → Accounts: uses account data
openlibrary/core/lending.py - Lending service → Internet Archive: checks availability
openlibrary/core/lending.py - Lending service → Waiting list: coordinates queue
- Loan statistics → Lending service: reads loan data
openlibrary/views/loanstats.py - Readers and catalogers → Cover service: views covers
- Catalog editing → Catalog database: updates records
- Accounts → Catalog database: stores accounts
- Cover service → Catalog database: uses database
openlibrary/coverstore/code.py