[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81616":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":15,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":13,"starSnapshotCount":13,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},81616,"bookllm","purecodework\u002Fbookllm","purecodework","Translate books and documents with LLMs, featuring glossary extraction, review, and polishing pipelines.","",null,"TypeScript",26,0,22,4,42.4,"MIT License",false,"main",true,[22,23,24,25,26,27,28,29,30,31,32,33],"agentic","ebook","epub","llm","local-llm","ocr","omlx","openai","pdf","reader","translate","translation","2026-06-12 04:01:34","# BookLLM\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"README.md\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flang-English-blue\" alt=\"English\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"README_ZH.md\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flang-%E4%B8%AD%E6%96%87-red\" alt=\"中文\" \u002F>\n  \u003C\u002Fa>\n  \u003Ca href=\"#license\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green\" alt=\"MIT License\" \u002F>\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\nBookLLM is a self-hosted book translation app with glossary, review, and polish pipelines.\n\nIt supports OpenAI-compatible APIs and local LLM runtimes for long-form reading and iterative translation workflows.\n\nCurrent language options support translation between Chinese, English, Japanese, Korean, French, German, Spanish, and Russian. Source language can also be set to auto-detect.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fassets\u002Freader.png\" alt=\"BookLLM Reader\" width=\"780\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Csub>Bilingual long-form reading with live translation output.\u003C\u002Fsub>\n\u003C\u002Fp>\n\n## Features\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>OpenAI-compatible\u003C\u002Fstrong>\u003Cbr \u002F>\n      Works with OpenAI-compatible providers and runtimes, including OpenAI, DeepSeek, OpenRouter, Ollama, LM Studio, and OMLX.\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>Live Reader\u003C\u002Fstrong>\u003Cbr \u002F>\n      Stream translations directly into a bilingual long-form reading interface.\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>Multi-stage Pipeline\u003C\u002Fstrong>\u003Cbr \u002F>\n      Translate with optional glossary extraction, review, and polishing stages.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>Sidekick Model\u003C\u002Fstrong>\u003Cbr \u002F>\n      Use Sidekick as an optional second model for review, polishing, or quality-focused stages.\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>Glossary Support\u003C\u002Fstrong>\u003Cbr \u002F>\n      Maintain per-page glossary context, with optional whole-book extraction.\n    \u003C\u002Ftd>\n    \u003Ctd width=\"33%\" valign=\"top\">\n      \u003Cstrong>PDF \u002F OCR Support\u003C\u002Fstrong>\u003Cbr \u002F>\n      Extract text from PDFs and use bundled OCR for scanned pages.\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Screenshots\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd width=\"50%\" valign=\"top\" align=\"center\">\n      \u003Cimg src=\".github\u002Fassets\u002Flibrary.png\" alt=\"BookLLM Library\" width=\"100%\" \u002F>\n      \u003Cbr \u002F>\n      \u003Cstrong>Library\u003C\u002Fstrong>\n      \u003Cbr \u002F>\n      \u003Csub>Books, progress, and translation tasks.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"50%\" valign=\"top\" align=\"center\">\n      \u003Cimg src=\".github\u002Fassets\u002Fpipeline.png\" alt=\"BookLLM Translation Pipeline\" width=\"100%\" \u002F>\n      \u003Cbr \u002F>\n      \u003Cstrong>Translation Pipeline\u003C\u002Fstrong>\n      \u003Cbr \u002F>\n      \u003Csub>Glossary, review, and polishing configuration.\u003C\u002Fsub>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n## Pipeline Cost Notice\n\n> [!IMPORTANT]\n>\n> Enabling optional pipeline stages can significantly increase token usage, API cost, and processing time.\n>\n> These stages may improve translation quality, but the marginal gain is not always large enough to justify the extra cost and latency, especially for everyday translation tasks.\n>\n> Before using the full pipeline on a long document, test it on a short file or a small excerpt first. Compare output quality, latency, and token usage, then enable only the stages that clearly help your use case.\n\n## Quick Start\n\nRun BookLLM locally with Docker Compose. No `.env` file is required for single-machine use.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fpurecodework\u002Fbookllm.git\ncd BookLLM\ndocker compose up -d --build\n```\n\nThen open:\n\n```text\nhttp:\u002F\u002Flocalhost:3000\n```\n\nFor later starts, use:\n\n```bash\ndocker compose up -d\n```\n\nRebuild only after source, dependency, or Dockerfile changes:\n\n```bash\ndocker compose up -d --build\n```\n\n### Initial Setup\n\n1. Open **Model Connection** from the sidebar.\n2. Configure your OpenAI-compatible endpoint:\n   - Base URL: an OpenAI-compatible \u003Ccode>\u002Fv1\u003C\u002Fcode> endpoint, such as \u003Ccode>https:\u002F\u002Fapi.openai.com\u002Fv1\u003C\u002Fcode>\n   - For a host-local runtime such as Ollama, \u003Ccode>http:\u002F\u002Flocalhost:11434\u002Fv1\u003C\u002Fcode> is accepted; Docker deployments normalize it internally when needed\n   - API key\n   - Model\n3. Optional: if you are using a hosted API provider instead of a local runtime, tune the input token budget and concurrency in **Settings** to improve throughput.\n4. Upload an EPUB, PDF, or TXT file to begin translation.\n\n## Architecture\n\n```text\nNext.js frontend\n  -> NestJS API + SSE\n     -> PostgreSQL: books, pages, settings, glossary\u002Fcontext, token usage\n     -> Redis: BullMQ queues, job state, event fanout\n     -> Translation workers: chunking, glossary\u002Fcontext, translation, review, polish, export\n     -> FastAPI OCR service: PyMuPDF + Tesseract\n     -> Local asset storage: originals, covers, extracted images\n     -> OpenAI-compatible LLM endpoints: primary + optional Sidekick\n```\n\n## Known Limitations\n\n- Token usage shown in the UI is approximate. Provider dashboards remain the billing source of truth.\n- OCR does not preserve the original layout.\n\n## License\n\nMIT\n","BookLLM 是一个自托管的书籍翻译应用，支持术语表提取、审阅和润色流程。该项目使用 TypeScript 开发，核心功能包括支持 OpenAI 兼容 API 和本地 LLM 运行时，适用于长篇阅读和迭代翻译工作流。它还提供了实时阅读器，可以直接在双语长篇阅读界面中流式传输翻译结果，并且支持 PDF 和 OCR 以处理扫描页面。此外，BookLLM 支持多种语言间的互译，如中文、英文、日文等。此项目特别适合需要高质量多语言书籍或文档翻译的场景，尤其是对术语一致性有高要求的情况。",2,"2026-06-11 04:05:43","CREATED_QUERY"]