How parthwhy/paperlens works
PaperLens turns an arXiv paper into a reader with grounded chat, contextual explanations, a concept map, and generated animations. The main workflow runs from paper submission through ingestion and storage, then serves separate reading and analysis capabilities to the browser. The README documents the API-level flow; excerpts and the source index support several internal calls. Some UI and backend implementations were not sampled, so their internal relationships are omitted where evidence is limited.
Main entry points: papers.py Paper API routes · App.tsx App navigation · ingestion.py Paper ingestion · api.ts API client
Components 23
Reader interface
- App navigation
new_ui/src/App.tsx - Paper submission
new_ui/src/components/LandingPage.tsx - PDF reader and chat
new_ui/src/components/DocumentView.tsx - Concept map view
new_ui/src/components/ConceptMap.tsx - Animation dashboard
new_ui/src/components/ManimDashboard.tsx - Selection tooltip
new_ui/src/components/SelectionTooltip.tsx - Selection handling
new_ui/src/hooks/useTooltip.ts - API client
new_ui/src/services/api.ts
API orchestration
- FastAPI entry
app/main.py - Paper API routes
app/papers.py - API schemas
app/schemas.py
Paper processing
- Paper ingestion
app/ingestion.py - ChromaDB vectors
- SQLite history
- PDF cache
Research assistance
- Grounded chat
app/rag_chat.py - Tooltip explanations
app/tooltip.py - Concept extraction
app/concept_map.py
Visual explanations
- Animation generation
app/manim_service.py - Rendered animations
Other components
- Researcher
- arXiv
- Groq inference
Connections 29
- Researcher → App navigation: uses
new_ui/src/App.tsx - App navigation → Paper submission: renders
new_ui/src/App.tsx - App navigation → PDF reader and chat: renders
new_ui/src/App.tsx - App navigation → Concept map view: renders
new_ui/src/App.tsx - App navigation → Animation dashboard: renders
new_ui/src/App.tsx - Paper submission → API client: submits paper
- PDF reader and chat → API client: requests paper data
new_ui/src/components/DocumentView.tsx - Concept map view → API client: requests map
new_ui/src/components/ConceptMap.tsx - PDF reader and chat → Selection handling: uses selection
new_ui/src/components/DocumentView.tsx - Selection handling → Selection tooltip: provides tooltip
new_ui/src/hooks/useTooltip.ts - API client → Paper API routes: calls REST API
README.md - FastAPI entry → Paper API routes: mounts routes
app/main.py - Paper API routes → Paper ingestion: starts ingestion
app/papers.py - Paper API routes → Grounded chat: dispatches chat
app/papers.py - Paper API routes → Tooltip explanations: dispatches tooltip
app/papers.py - Paper API routes → Concept extraction: dispatches map
README.md - Paper API routes → Animation generation: dispatches animation
app/papers.py - Paper ingestion → arXiv: fetches paper
app/ingestion.py - Paper ingestion → ChromaDB vectors: stores chunks
app/ingestion.py - Paper ingestion → SQLite history: saves metadata
app/ingestion.py - Paper ingestion → PDF cache: downloads PDF
app/ingestion.py - Grounded chat → ChromaDB vectors: retrieves chunks
app/rag_chat.py - Grounded chat → Groq inference: generates answer
app/rag_chat.py - Tooltip explanations → Groq inference: generates explanation
- Concept extraction → ChromaDB vectors: uses paper chunks
README.md - Animation generation → ChromaDB vectors: reads paper context
app/manim_service.py - Animation generation → Groq inference: plans storyboard
app/manim_service.py - Animation generation → Rendered animations: renders video
README.md - Animation dashboard → API client: requests animation