How antoineyrem/livingpaper works
LivingPaper is a self-hosted web app for importing EPUB/PDF books, analyzing them into summaries, scenes and character profiles, then chatting with a selected character. The main flow runs from web book actions through background analysis to a persisted, browsable book; settings configure the OpenAI-compatible model used for analysis and chat. The README documents examples, prompt editing and import/export as additional capabilities. Evidence is limited to the README, SOURCE INDEX references and excerpts; unshown subsystem links are omitted where their caller is not established.
Main entry points: BookService.cs Book service · LlmSettingsService.cs Settings service · CharacterChatService.cs Chat service · BookAnalysisWorker.cs Analysis worker
Components 20
Web experience
- Book pages
src/LivingPaper.Web/Pages/Books/Index.cshtml.cs - Character chat
src/LivingPaper.Web/Pages/Books/Chat.cshtml.cs - Settings page
src/LivingPaper.Web/Pages/Settings.cshtml.cs - Example books
src/LivingPaper.Web/Pages/Examples.cshtml.cs - Book transfer
src/LivingPaper.Web/ExportEndpoint.cs
Book processing
- Book service
src/LivingPaper.Application/BookService.cs - Analysis worker
src/LivingPaper.Web/BookAnalysisWorker.cs - Book analyzer
src/LivingPaper.Application/BookAnalyzer.cs - Text extraction
src/LivingPaper.Infrastructure/BookTextExtractor.cs
Models and chat
- Chat service
src/LivingPaper.Application/CharacterChatService.cs - Compatible chat model
src/LivingPaper.Infrastructure/OpenAiCompatibleChatModel.cs - Settings service
src/LivingPaper.Application/LlmSettingsService.cs - Connection tester
src/LivingPaper.Application/LlmConnectionTester.cs - Model catalog
src/LivingPaper.Infrastructure/OpenAiCompatibleModelCatalog.cs
Persistence
- Book repository
src/LivingPaper.Persistence/JsonBookRepository.cs - Settings repository
src/LivingPaper.Persistence/JsonLlmSettingsRepository.cs - Prompt files
src/LivingPaper.Persistence/PromptFile.cs
Domain model
- Book and characters
src/LivingPaper.Domain/Book.cs
Other components
- Reader
- Model provider
Connections 21
- Reader → Book pages: manages books
- Book pages → Book service: requests book actions
src/LivingPaper.Web/Pages/Books/Index.cshtml.cs - Book service → Text extraction: extracts text
src/LivingPaper.Application/BookService.cs - Book service → Book repository: stores books
src/LivingPaper.Application/BookService.cs - Book service → Analysis worker: schedules analysis
src/LivingPaper.Web/BookAnalysisWorker.cs - Analysis worker → Book service: recovers work
src/LivingPaper.Web/BookAnalysisWorker.cs - Analysis worker → Book analyzer: runs analysis
src/LivingPaper.Web/BookAnalysisWorker.cs - Reader → Character chat: chats with character
- Character chat → Chat service: sends conversation
- Chat service → Settings service: selects chat model
src/LivingPaper.Application/CharacterChatService.cs - Chat service → Prompt files: renders prompt
src/LivingPaper.Application/CharacterChatService.cs - Chat service → Compatible chat model: streams reply
src/LivingPaper.Application/CharacterChatService.cs - Compatible chat model → Model provider: calls API
src/LivingPaper.Infrastructure/OpenAiCompatibleChatModel.cs - Reader → Settings page: configures models
- Settings page → Settings service: manages providers
src/LivingPaper.Web/Pages/Settings.cshtml.cs - Settings service → Settings repository: loads and saves
src/LivingPaper.Application/LlmSettingsService.cs - Settings service → Connection tester: tests connection
src/LivingPaper.Application/LlmSettingsService.cs - Settings service → Model catalog: fetches models
src/LivingPaper.Application/LlmSettingsService.cs - Reader → Example books: reads examples
- Reader → Book transfer: moves books
- Book repository → Book and characters: persists book data
src/LivingPaper.Persistence/JsonBookRepository.cs