How harsheetha-2003/research_paper_chabot works
This is a web application for authenticated research-paper upload and conversational, document-grounded question answering. The main path is user → frontend → FastAPI routes → document embedding or retrieval → generated answer; users can also browse history, request suggested questions and a table of contents, and manage documents. Authentication and persistent records support those workflows. The route, retrieval, and embedding relationships are grounded in shown excerpts or the source index; some capability links are documented in the README, while unsampled implementation details are left unconnected.
Main entry points: main.py FastAPI entry · schema.py Relational records · chat.py Chat endpoint · retriever.py Semantic retrieval
Components 25
Web interface
- Web app
workingchatbot-4/frontend/src/App.js - Research dashboard
workingchatbot-4/frontend/src/pages/DashboardPage.js - Web client
workingchatbot-4/frontend/script.js
API and access
- FastAPI entry
workingchatbot-4/backend/main.py - Authentication
workingchatbot-4/backend/api/routes/auth.py - Session handling
workingchatbot-4/backend/services/session.py - PDF upload
workingchatbot-4/backend/api/routes/upload.py - Chat endpoint
workingchatbot-4/backend/api/routes/chat.py - Document browsing
workingchatbot-4/backend/api/routes/view_docs.py - Document management
workingchatbot-4/backend/api/routes/management.py
Document intelligence
- Embedding and index
workingchatbot-4/backend/services/embedder.py - Document processing
workingchatbot-4/backend/services/document_processor.py - Semantic retrieval
workingchatbot-4/backend/services/retriever.py - Answer generation
workingchatbot-4/backend/orchestrator.py
Conversation features
- History endpoint
workingchatbot-4/backend/api/routes/chat_history_api.py - Chat history
workingchatbot-4/backend/services/chat_history.py - Suggested questions
workingchatbot-4/backend/api/routes/suggested_questions.py - Question generation
workingchatbot-4/backend/services/question_generator.py - Contents endpoint
workingchatbot-4/backend/api/routes/table_of_contents.py - Contents extraction
workingchatbot-4/backend/services/toc_extractor.py - Citation endpoint
workingchatbot-4/backend/api/routes/citation.py - Citation mapping
workingchatbot-4/backend/services/citation_mapper.py
Application state
- Relational records
workingchatbot-4/backend/database/schema.py
Other components
- Researcher
- OpenRouter
Connections 35
- Researcher → Web app: uses
- Web app → FastAPI entry: requests API
- FastAPI entry → PDF upload: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Chat endpoint: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Authentication: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Document browsing: registers route
workingchatbot-4/backend/main.py - FastAPI entry → History endpoint: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Document management: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Suggested questions: registers route
workingchatbot-4/backend/main.py - FastAPI entry → Contents endpoint: registers route
workingchatbot-4/backend/main.py - Authentication → Session handling: manages sessions
workingchatbot-4/backend/api/routes/auth.py - Authentication → Relational records: reads and writes
workingchatbot-4/backend/api/routes/auth.py - PDF upload → Session handling: gets user
workingchatbot-4/backend/api/routes/upload.py - PDF upload → Embedding and index: embeds document
workingchatbot-4/backend/api/routes/upload.py - PDF upload → Relational records: stores document
workingchatbot-4/backend/api/routes/upload.py - Chat endpoint → Session handling: gets user
workingchatbot-4/backend/api/routes/chat.py - Chat endpoint → Relational records: checks and saves
workingchatbot-4/backend/api/routes/chat.py - Chat endpoint → Semantic retrieval: retrieves context
workingchatbot-4/backend/api/routes/chat.py - Semantic retrieval → Answer generation: requests answer
workingchatbot-4/backend/services/retriever.py - Answer generation → OpenRouter: sends prompt
workingchatbot-4/backend/orchestrator.py - Semantic retrieval → Chat history: saves exchange
workingchatbot-4/backend/services/retriever.py - History endpoint → Chat history: loads history
workingchatbot-4/backend/api/routes/chat_history_api.py - Document management → Chat history: removes history
workingchatbot-4/backend/api/routes/management.py - Document management → Relational records: deletes records
workingchatbot-4/backend/api/routes/management.py - Suggested questions → Question generation: generates questions
workingchatbot-4/backend/api/routes/suggested_questions.py - Suggested questions → Relational records: reads and writes
workingchatbot-4/backend/api/routes/suggested_questions.py - Contents endpoint → Contents extraction: extracts contents
workingchatbot-4/backend/api/routes/table_of_contents.py - Contents endpoint → Relational records: stores contents
workingchatbot-4/backend/api/routes/table_of_contents.py - Citation endpoint → Relational records: reads records
workingchatbot-4/backend/api/routes/citation.py - Chat endpoint → Citation mapping: maps citations
workingchatbot-4/backend/api/routes/chat.py - Research dashboard → Web app: renders in
- Web client → FastAPI entry: requests API
- Embedding and index → Document processing: parses document
- Embedding and index → Semantic retrieval: indexes embeddings
- Semantic retrieval → OpenRouter: uses model