How wangqrkkk/paperquay works
PaperQuay is a local-first desktop workspace for managing and understanding research papers. Users import or organize papers, open them in the reader, inspect structured content, translate or ask questions, and keep notes; optional Zotero, Agent, review-writing, knowledge-graph, and backup workflows extend that core. The renderer’s workspaces call services and cross the Electron boundary for local files and persistence. README statements support the product-level branches; source excerpts and the index support only the specific implementation links shown. Several backend and workspace implementations were not sampled, so their internal connections are omitted.
Main entry points: App.tsx App shell · Reader.tsx Reader workspace · useReaderLibraryPreview.ts Preview workflow · core.ts Electron IPC
Components 29
Workspace UI
- App shell
src/app/App.tsx - Notes workspace
src/features/notes/NotesWorkspace.tsx
Reading and AI
- Reader workspace
src/features/reader/Reader.tsx - Reader actions
src/features/reader/useReaderLibraryActions.ts - Library preview
src/features/reader/readerLibraryPreview.ts - Preview workflow
src/features/reader/useReaderLibraryPreview.ts - MinerU parsing
src/services/mineru.ts - Translation
src/features/reader/readerTranslation.ts - Local RAG
src/services/localRag.ts
Library and storage
- Literature library
src/features/literature/LiteratureLibraryView.tsx - Library service
src/services/library.ts - Notes service
src/services/notes.ts - Notes store
src/stores/useNotesStore.ts
Research tools
- Agent workspace
src/features/agent/AgentWorkspace.tsx - Agent tools
src/services/libraryAgent.ts - Knowledge graph
src/features/graph/KnowledgeGraphWorkspace.tsx - Review writing
src/features/review/ReviewWritingWorkspace.tsx - Review generation
src/services/reviewWriting.ts - Zotero integration
electron/backend/zoteroCommands.cjs
Desktop runtime
- Library commands
electron/backend/libraryCommands.cjs - Library database
electron/backend/libraryDatabaseStore.cjs - WebDAV backup
electron/backend/webdavCommands.cjs - Electron main
electron/main.cjs - Backend router
electron/backend.cjs - Desktop API
src/services/desktop.ts - Electron IPC
src/platform/electron/core.ts
Other components
- Researcher
- AI provider
- WebDAV server
Connections 32
- Researcher → App shell: uses
README.md - App shell → Reader workspace: renders
src/app/App.tsx - App shell → Agent workspace: renders
src/app/App.tsx - App shell → Notes workspace: opens workspace
README.md - App shell → Knowledge graph: opens workspace
src/app/App.tsx - App shell → Review writing: opens workspace
src/app/App.tsx - Reader workspace → Reader actions: uses
- Reader workspace → Preview workflow: loads previews
- Preview workflow → Library preview: loads and caches
src/features/reader/useReaderLibraryPreview.ts - Preview workflow → Library service: updates paper
src/features/reader/useReaderLibraryPreview.ts - Preview workflow → AI provider: requests summary
src/features/reader/useReaderLibraryPreview.ts - Reader actions → MinerU parsing: parses PDF
src/features/reader/useReaderLibraryActions.ts - Reader actions → Translation: translates blocks
src/features/reader/useReaderLibraryActions.ts - Reader workspace → Local RAG: uses retrieval
- Researcher → Literature library: imports and organizes
README.md - Literature library → Library service: manages papers
- Library service → Electron IPC: invokes desktop
src/services/library.ts - Electron IPC → Electron main: sends IPC
- Electron main → Backend router: loads backend
electron/main.cjs - Backend router → Library commands: routes commands
- Library commands → Library database: persists library
- Notes workspace → Notes store: edits notes
- Notes store → Notes service: loads and saves
src/stores/useNotesStore.ts - Notes service → Electron IPC: invokes desktop
src/services/notes.ts - Agent workspace → Agent tools: uses tools
- Agent workspace → Literature library: assists management
README.md - Review writing → Review generation: generates draft
src/features/review/ReviewWritingWorkspace.tsx - Review generation → Electron IPC: invokes commands
src/services/reviewWriting.ts - Researcher → Zotero integration: imports library
README.md - Researcher → WebDAV backup: backs up data
- WebDAV backup → WebDAV server: syncs backup
- Researcher → AI provider: configures provider
README.md