How shreyas8905/resector works
ReSector is a local-first research workstation: users explore papers, upload PDFs for session-grounded chat, and run structured research tools; results and sessions are retained for later search. The graph also preserves documented citation mapping, provider choices, and research modules. Backend relationships are supported by excerpts or the SOURCE INDEX; several frontend-to-backend links are shown as dashed and unverified because the frontend request wiring was not excerpted.
Main entry points: main.py HTTP API · rag_agent.py Grounded chat agent · tools.py Research tool logic · database.py Session database
Components 22
Research experience
- Research workspace
frontend/src/app/page.tsx - Paper chat
frontend/src/app/paper-chat/page.tsx - Citation graph
frontend/src/components/PaperGraphView.tsx - Methodology sifter
frontend/src/components/SifterTool.tsx - Adversarial critique
frontend/src/components/CritiqueTool.tsx - Jargon simplifier
frontend/src/components/JargonTool.tsx - Research archive
frontend/src/components/ResearchHistory.tsx - Tool presentation
frontend/src/components/ToolUI.tsx - Provider settings
frontend/src/components/SettingsDrawer.tsx
API orchestration
- HTTP API
backend/main.py - Research tool logic
backend/tools.py
Research services
- Grounded chat agent
backend/services/rag_agent.py - PDF indexing
backend/services/pdf_processor.py - Citation traversal
backend/services/graph_service.py - LLM provider factory
backend/provider_factory.py
Persistence and configuration
- Session database
backend/database.py - Chroma vectors
backend/database.py - Runtime configuration
backend/config.py
Other components
- Researcher
- Academic metadata sources
- Web search
- LLM providers
Connections 36
- Researcher → Research workspace: explores
README.md - Researcher → Paper chat: chats with papers
README.md - Researcher → Citation graph: maps literature
README.md - Researcher → Methodology sifter: extracts methods
README.md - Researcher → Adversarial critique: stress-tests claims
README.md - Researcher → Jargon simplifier: simplifies terms
README.md - Researcher → Research archive: searches archive
README.md - Methodology sifter → Tool presentation: uses presentation
frontend/src/components/SifterTool.tsx - Adversarial critique → Tool presentation: uses presentation
frontend/src/components/CritiqueTool.tsx - Jargon simplifier → Tool presentation: uses presentation
frontend/src/components/JargonTool.tsx - Research workspace → HTTP API: calls API
- Paper chat → HTTP API: calls API
- Citation graph → HTTP API: requests graph
- Methodology sifter → HTTP API: requests extraction
- Adversarial critique → HTTP API: requests critique
- Jargon simplifier → HTTP API: requests simplification
- HTTP API → Research tool logic: runs tools
backend/main.py - HTTP API → Grounded chat agent: handles chat
backend/main.py - HTTP API → PDF indexing: starts indexing
backend/main.py - HTTP API → Citation traversal: generates graph
backend/main.py - HTTP API → LLM provider factory: validates providers
backend/main.py - HTTP API → Session database: stores sessions
backend/main.py - PDF indexing → Session database: updates documents
backend/services/pdf_processor.py - PDF indexing → Chroma vectors: indexes chunks
backend/services/pdf_processor.py - Grounded chat agent → Chroma vectors: retrieves chunks
backend/services/rag_agent.py - Grounded chat agent → Session database: loads chat history
backend/services/rag_agent.py - Grounded chat agent → Research tool logic: uses web search
backend/services/rag_agent.py - Research tool logic → LLM provider factory: creates agent model
backend/tools.py - Research tool logic → Session database: logs research
backend/tools.py - Research tool logic → Chroma vectors: indexes research
backend/tools.py - LLM provider factory → LLM providers: creates model
backend/provider_factory.py - Grounded chat agent → LLM provider factory: creates chat model
backend/services/rag_agent.py - Citation traversal → Academic metadata sources: queries papers
backend/services/graph_service.py - Research tool logic → Web search: searches literature
backend/tools.py - Grounded chat agent → Web search: optionally searches
backend/services/rag_agent.py - Session database → Runtime configuration: reads database URL
backend/database.py