A full-stack Scientific Literature Lifecycle Management System
δΈζ Β· Documentation Β· Quick Start Β· Report Bug
Omelette automates the full research literature pipeline β from keyword management and multi-source search, through deduplication and PDF crawling, to OCR processing, RAG-powered knowledge base, and AI writing assistance. V2 adds a chat-centric UX, multi-provider LLM support, LangGraph pipeline orchestration, and MCP integration for AI IDE clients.
Om (Omni-) + Lit (Literature) = Omlit β Omelette π³
|
π Keyword Management Three-level hierarchy with LLM-powered expansion and search formula generation for WOS, Scopus, PubMed. π Multi-Source Search Federated search across Semantic Scholar, OpenAlex, arXiv, and Crossref with standardized metadata. π§Ή Smart Deduplication Three-stage pipeline: DOI hard dedup β title similarity β LLM verification. π‘ Incremental Subscription RSS feeds and API-based scheduled updates to track new publications automatically. π¬ Chat Playground ChatGPT-style conversational interface for RAG queries and writing assistance. π Multi-LLM Support LangChain integration for OpenAI, Anthropic, Aliyun, Volcengine, and Ollama providers. |
π₯ PDF Crawler Multi-channel download via Unpaywall, arXiv, and direct URL fallback strategies. π OCR Processing Native text extraction via MinerU (auto-managed subprocess) or PaddleOCR GPU fallback. π§ RAG Knowledge Base LlamaIndex engine with ChromaDB, GPU-aware embeddings, hybrid retrieval, and cited answers. βοΈ Writing Assistant Summarization, citation generation (GB/T 7714, APA, MLA), review outlines, and gap analysis. π LangGraph Pipeline Pipeline orchestration with HITL interrupt/resume and persistent checkpointing. β‘ GPU Resource Management TTL-based auto-unload for GPU models, MinerU subprocess auto-management, monitoring API, and exit cleanup watchdog. π MCP Integration Model Context Protocol server for AI IDE clients (Cursor, Claude Code, etc.). π i18n Bilingual UI (zh/en) with shadcn/ui and Radix primitives. |
Keywords ββ Search ββ Dedup ββ Crawler ββ OCR ββ RAG ββ Writing
β β β β β β β
βΌ βΌ βΌ βΌ βΌ βΌ βΌ
[LangChain] [Sources] [SQLite] [PDFs] [Paddle] [LlamaIndex] [LLM]
β β
βββββββββββββββββββ LangGraph ββββββββββββββββββββββββββ
β
βββ MCP (Model Context Protocol) βββ AI IDE clients
| Layer | Technology |
|---|---|
| Backend | FastAPI, SQLAlchemy 2 (async), Pydantic v2, Python 3.12 |
| Frontend | React 18, Vite, TypeScript, TailwindCSS v4, shadcn/ui, Radix, TanStack Query |
| Database | SQLite + aiosqlite, Alembic migrations |
| Vector Store | ChromaDB |
| RAG | LlamaIndex with GPU-aware embeddings |
| LLM | LangChain (OpenAI, Anthropic, Aliyun, Volcengine, Ollama) |
| Orchestration | LangGraph with HITL interrupt/resume |
| OCR | MinerU (auto-managed) + pdfplumber (native) + PaddleOCR (scanned) |
| MCP | Model Context Protocol server |
| Docs | VitePress (bilingual EN/ZH) |
- Conda or Miniconda
- Node.js 22+
- (Optional) CUDA for GPU-accelerated OCR and embeddings
- (Optional) API keys: OpenAI, Anthropic, Aliyun Bailian, or Volcengine for LLM; Semantic Scholar for higher rate limits
git clone git@github.com:sylvanding/omelette.git
cd omelette
# Create conda env and install all backend dependencies
conda env create -f environment.yml
conda activate omelettecp .env.example .env
# Edit .env with your API keys and data pathsKey environment variables
| Variable | Description |
|---|---|
DATABASE_URL |
SQLite path (default: sqlite:///./data/omelette.db) |
DATA_DIR |
Base path for PDFs, OCR output, ChromaDB |
LLM_PROVIDER |
openai, anthropic, aliyun, volcengine, ollama, or mock |
OPENAI_API_KEY |
OpenAI API key |
ANTHROPIC_API_KEY |
Anthropic API key |
ALIYUN_API_KEY |
Aliyun Bailian API key |
VOLCENGINE_API_KEY |
Volcengine Doubao API key |
SEMANTIC_SCHOLAR_API_KEY |
Optional; increases Semantic Scholar rate limit |
GPU_MODE |
GPU preset: conservative, balanced (default), aggressive |
MODEL_TTL_SECONDS |
Auto-unload GPU models after N seconds idle (default: 300) |
MINERU_AUTO_MANAGE |
Auto start/stop MinerU subprocess (default: true) |
PDF_PARSER |
auto, mineru, or pdfplumber |
See .env.example for the full list.
cd backend
# Run database migrations
alembic upgrade head
# Start server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000On startup, the backend automatically:
- Writes a PID file to
DATA_DIR/omelette.pid - Starts a GPU model TTL monitor (auto-unloads idle models)
- If
MINERU_AUTO_MANAGE=true, manages MinerU subprocess lifecycle - Registers cleanup handlers (
atexit+SIGHUP) so GPU resources are released even if the process exits unexpectedly
For extra safety against kill -9 or crashes, run the external watchdog:
python backend/scripts/gpu_watchdog.py --daemonThe watchdog monitors the Omelette process and cleans up GPU resources if it terminates abnormally.
cd frontend
npm install
npm run devOpen http://localhost:3000 in your browser.
If using MinerU for PDF parsing (PDF_PARSER=mineru):
# Create a separate conda env for MinerU
conda create -n mineru python=3.10
conda activate mineru
pip install magic-pdf[full]Set MINERU_CONDA_ENV=mineru in .env. Omelette will auto-start MinerU when needed.
Troubleshooting: If you get
ModuleNotFoundError: No module named 'fastapi', ensure the conda environment is activated:conda activate omelette.
omelette/
βββ backend/ # FastAPI application
β βββ app/
β β βββ api/v1/ # REST endpoints
β β βββ models/ # SQLAlchemy ORM models
β β βββ schemas/ # Pydantic request/response schemas
β β βββ services/ # Business logic
β β βββ pipelines/ # LangGraph pipeline definitions
β β βββ config.py # Settings from .env
β β βββ database.py # Async engine and session
β β βββ main.py # App entry, lifespan, CORS
β βββ mcp_server.py # MCP (Model Context Protocol) server
β βββ alembic/ # Database migrations
β βββ scripts/ # Utilities (gpu_watchdog.py)
β βββ tests/ # pytest-asyncio tests (526 tests)
β βββ pyproject.toml # Python dependencies
βββ frontend/ # React SPA
β βββ src/
β βββ pages/ # Dashboard, ProjectDetail, Chat, modules
β βββ components/ # Layout, shared UI
β β βββ ui/ # shadcn/ui components
β βββ services/ # Typed API client
β βββ hooks/ # Custom hooks (useToastMutation, etc.)
β βββ stores/ # Zustand state
β βββ i18n/ # Internationalization (zh/en)
β βββ test/ # Vitest setup, MSW mocks, fixtures
β βββ lib/ # Axios client, utils
βββ e2e/ # Playwright E2E tests
βββ docs/ # VitePress documentation (EN/ZH)
βββ assets/ # Banner, logo, mascot images
βββ environment.yml # Conda env (Python 3.12)
βββ Makefile # Dev workflow shortcuts
βββ .env.example # Configuration template
βββ playwright.config.ts # Playwright E2E configuration
βββ .github/workflows/ # CI (ruff, pytest, vitest, tsc, build, docs)
make pre-commit-install # Install pre-commit hooks
make lint # Run linters
make format # Auto-format code
make test # Run all tests
make dev # Start both backend and frontend# Backend (526 tests)
cd backend && pytest tests/ -v
# Frontend unit tests (28 tests β Vitest + Testing Library + MSW)
cd frontend && npm test
# Frontend type check and build
cd frontend && npx tsc --noEmit && npm run build
# E2E tests (optional β requires running frontend dev server)
npx playwright testREST APIs under /api/v1/:
| Endpoint | Description |
|---|---|
GET/POST /projects |
Project CRUD |
GET/POST /projects/{id}/papers |
Paper management |
GET/POST /projects/{id}/keywords |
Keyword management |
GET /projects/{id}/keywords/search-formula |
Generate search formula |
POST /projects/{id}/search |
Execute multi-source search |
POST /projects/{id}/dedup/run |
Run deduplication |
POST /projects/{id}/crawl/start |
Start PDF download |
POST /projects/{id}/ocr/process |
Run OCR on papers |
POST /projects/{id}/rag/index |
Build vector index |
POST /projects/{id}/rag/query |
RAG retrieval |
POST /projects/{id}/writing/assist |
Writing assistance |
POST /projects/{id}/writing/review-draft/stream |
Streaming literature review (SSE) |
POST /chat |
Chat messages (playground) |
POST /chat/complete |
Smart autocomplete suggestions |
GET /projects/{id}/papers/{paper_id}/citation-graph |
Citation graph (Semantic Scholar) |
GET/POST /conversations |
Conversation CRUD |
GET/POST /pipelines |
Pipeline management |
GET/POST /subscriptions |
Subscription management |
GET/POST /settings |
Settings and health |
GET /settings/health |
Health check |
GET /gpu/status |
GPU model and memory status |
POST /gpu/unload |
Manually unload GPU models |
MCP server: /mcp (WebSocket/SSE for AI IDE clients)
Full documentation: API Reference
See CONTRIBUTING.md for guidelines.
MIT License β Copyright Β© 2026 Sylvan Ding
