How cporcellijr/bookbridge works
BookBridge is a self-hosted, multi-user synchronization engine for reading and listening progress across ebook readers, audiobook servers, and reading trackers. Its central workflow coordinates service-specific sync clients around shared book mappings and progress state; when needed, it aligns ebook text with audio timing so positions can cross formats. The README also describes matching suggestions, annotations, read-along EPUB generation, session summaries, and settings management. Connections below follow explicit README statements or SOURCE INDEX references; unsampled feature links are documented at subsystem level rather than inferred call chains.
Main entry points: sync_manager.py Sync manager · alignment_service.py Alignment maps · models.py Book and progress data · sync_client_interface.py Sync client contract
Components 22
Sync orchestration
- Sync manager
src/sync_manager.py - Sync client contract
src/sync_clients/sync_client_interface.py
Service connectors
- Audiobookshelf sync
src/sync_clients/abs_sync_client.py - KOReader sync
src/sync_clients/kosync_sync_client.py - Storyteller sync
src/sync_clients/storyteller_sync_client.py - Tracker sync clients
src/sync_clients/sync_client_interface.py - Service APIs
src/api/api_clients.py
Alignment and media
- Ebook parsing
src/utils/ebook_utils.py - Alignment maps
src/services/alignment_service.py - Audio transcription
src/utils/transcriber.py - Storyteller transcripts
src/utils/storyteller_transcript.py
Matching and product features
- Read-along generation
src/services/forge_service.py - Library suggestions
src/services/suggestions_service.py - Book matching
src/services/llm_matching.py - Annotation synchronization
src/services/annotation_sync_service.py - Session summaries
src/services/reading_session_aggregator.py
Web and state
- Web dashboard
src/web_server.py - Book and progress data
src/db/models.py - Database service
src/db/database_service.py - User credentials
src/utils/user_config.py - User context
src/utils/user_context.py
Other components
- Readers and users
Connections 24
- Readers and users → Web dashboard: manages sync
- Sync manager → Sync client contract: uses contract
src/sync_manager.py - Audiobookshelf sync → Sync client contract: implements contract
src/sync_clients/abs_sync_client.py - KOReader sync → Sync client contract: implements contract
src/sync_clients/kosync_sync_client.py - Storyteller sync → Sync client contract: implements contract
src/sync_clients/storyteller_sync_client.py - Sync manager → Alignment maps: coordinates alignment
src/sync_manager.py - Sync manager → Storyteller transcripts: loads transcripts
src/sync_manager.py - Sync manager → Ebook parsing: extracts text
src/sync_manager.py - Sync manager → Book and progress data: reads book state
src/sync_manager.py - Alignment maps → Book and progress data: stores alignment
src/services/alignment_service.py - Alignment maps → Ebook parsing: uses ebook parsing
src/services/alignment_service.py - Alignment maps → Audio transcription: uses transcription
src/services/alignment_service.py - Audio transcription → Storyteller transcripts: reads transcript format
src/utils/transcriber.py - Read-along generation → Alignment maps: uses alignment
src/services/forge_service.py - Read-along generation → Storyteller transcripts: uses transcripts
src/services/forge_service.py - Library suggestions → Book matching: ranks candidates
src/services/suggestions_service.py - Library suggestions → Book and progress data: reads book data
src/services/suggestions_service.py - Service APIs → Ebook parsing: transfers ebook files
- Database service → Book and progress data: persists models
src/db/database_service.py - User credentials → User context: resolves user settings
src/utils/user_config.py - Annotation synchronization → Audiobookshelf sync: syncs annotations
- Session summaries → Book and progress data: summarizes activity
src/db/database_service.py - Sync manager → Service APIs: syncs services
- Readers and users → Sync manager: syncs reading state