How ahmedsheikh27/inquiro works
Inquiro is a full-stack research chat application. A user enters through the React interface, where guest or authenticated sessions can send questions or upload PDFs; the FastAPI API then dispatches queries to the research agent, which selects conversation-history or RAG processing and returns a generated answer. Chat history and user data are stored in MongoDB, while FAISS-backed indexes support retrieved context. The README also documents Wikipedia retrieval, but the sampled implementation does not establish its wiring; that integration is shown as optional and unverified.
Main entry points: index.py FastAPI routes · rag_pipeline.py RAG retrieval · api.js API client · research_agent.py Research agent
Components 21
Chat experience
- React application
chat-frontend/src/App.jsx - Chat page
chat-frontend/src/pages/App.jsx - Chat composer
chat-frontend/src/components/ChatWindow.jsx - Login and register
chat-frontend/src/pages/Login.jsx - Auth context
chat-frontend/src/context/AuthContext.jsx - API client
chat-frontend/src/services/api.js
API and identity
- FastAPI routes
backend/api/index.py - Auth routes
backend/app/auth/routes.py - JWT and passwords
backend/app/auth/auth.py
Research processing
- Research agent
backend/app/agent/research_agent.py - RAG retrieval
backend/app/rag/rag_pipeline.py - PDF indexing
backend/app/rag/pdf_chunks.py - Text chunker
backend/app/rag/chunker.py - Web search
backend/app/search/tavily_client.py - Wikipedia source
Session and indexes
- Chat memory
backend/app/memory/memory_manager.py - MongoDB
backend/app/database/mongo_client.py - Vector store
backend/app/database/vector_store.py
Other components
- Chat user
- Gemini model
- FAISS index
Connections 26
- Chat user → React application: uses
- React application → Chat page: routes to
chat-frontend/src/App.jsx - Chat page → Chat composer: renders
chat-frontend/src/pages/App.jsx - Chat page → API client: loads sessions
chat-frontend/src/pages/App.jsx - Chat composer → API client: sends queries
chat-frontend/src/components/ChatWindow.jsx - Login and register → API client: calls auth
chat-frontend/src/services/api.js - Login and register → Auth context: sets session
chat-frontend/src/context/AuthContext.jsx - Auth context → API client: uses auth service
chat-frontend/src/context/AuthContext.jsx - API client → FastAPI routes: HTTP requests
chat-frontend/src/services/api.js - FastAPI routes → Auth routes: mounts routes
backend/api/index.py - Auth routes → JWT and passwords: hashes and signs
backend/app/auth/routes.py - Auth routes → MongoDB: reads and writes users
backend/app/auth/routes.py - FastAPI routes → Research agent: dispatches query
backend/api/index.py - FastAPI routes → Chat memory: manages sessions
backend/api/index.py - FastAPI routes → PDF indexing: indexes upload
backend/api/index.py - Research agent → RAG retrieval: retrieves context
backend/app/agent/research_agent.py - Research agent → Chat memory: loads and saves history
backend/app/agent/research_agent.py - Research agent → Gemini model: invokes model
backend/app/agent/research_agent.py - RAG retrieval → Web search: searches web
backend/app/rag/rag_pipeline.py - RAG retrieval → Text chunker: chunks results
backend/app/rag/rag_pipeline.py - RAG retrieval → Vector store: loads and creates indexes
backend/app/rag/rag_pipeline.py - PDF indexing → Text chunker: chunks PDF text
backend/app/rag/pdf_chunks.py - PDF indexing → Vector store: creates PDF index
backend/app/rag/pdf_chunks.py - Chat memory → MongoDB: stores conversations
backend/app/memory/memory_manager.py - Vector store → FAISS index: persists vectors
- RAG retrieval → Wikipedia source: may retrieve knowledge