Bibliotheca Architecture Overview
This document links together the module overviews and describes how a book flows
through the system.
High-level flow
- Import (
BookImport, Sha256)
- Compute SHA-256 id for each selected file.
- Extract metadata and cover (EPUB via libzip/tinyxml2, PDF via poppler).
- Persistence (
DatabaseManager)
- Ensure the SQLite schema exists.
- Insert/update/remove records using prepared statements.
- Model (
BookList)
- Load books from the database into memory.
- Expose CRUD helpers with signal emission.
- Provide thread-safe enqueue helpers for background imports.
- Presentation (
BookShelf, BookTile)
- Mirror the model into a
Gio::ListStore.
- Render a grid of tiles, expose activation, and filter results.
- Application shell (
BibliothecaWindow)
- Build the UI chrome (header, search bar, stack pages).
- React to imports, search queries, and user activation.
Module documentation
External dependencies
- GTK 4 / gtkmm: UI toolkit for widgets, signals, and layout.
- SQLite3: persistence layer for book metadata.
- poppler-glib: PDF metadata/covers.
- libzip + tinyxml2: EPUB metadata extraction.
- OpenSSL (libcrypto): SHA-256 hashing.
Future work
- Add ADRs (
docs/decisions/) for larger architectural choices.
- Document additional subsystems as they appear (e.g., reader view, tagging).
- Add screenshots or diagrams for quick onboarding.