How sumityesane/intelligent-clinical-document-assistant works
MedDoc AI is a clinical-document workspace: users upload PDFs or TXT files, browse and manage indexed records, then ask citation-backed questions with conversation continuity and optional SSE streaming. The backend coordinates document ingestion, metadata, retrieval, and response generation; the frontend provides the dashboard, upload, library, and chat experience. The README documents ChromaDB and Gemini integrations. Some subsystem links below rely on explicit README statements or SOURCE INDEX references because their implementation excerpts were not provided.
Main entry points: __init__.py Service coordinator · main.py FastAPI application · App.tsx Workspace dashboard · ChatInterface.tsx Clinical chat
Components 20
Workspace UI
- Workspace dashboard
frontend/src/App.tsx - File upload
frontend/src/components/FileUpload.tsx - Document library
frontend/src/components/DocumentList.tsx - Clinical chat
frontend/src/components/ChatInterface.tsx - Source citations
frontend/src/components/SourceCitations.tsx
API Layer
- Document API client
frontend/src/api/documents.ts - Query API client
frontend/src/api/query.ts - FastAPI application
backend/main.py - Upload endpoint
backend/routers/upload.py - Document endpoints
backend/routers/documents.py - Query endpoints
backend/routers/query.py - Health endpoint
backend/routers/health.py
Document and AI Processing
- Service coordinator
backend/services/__init__.py - Document ingestion
backend/services/ingestion.py - RAG pipeline
backend/services/rag.py
Application State
- Document metadata
backend/services/document_store.py - Conversation history
backend/services/conversation_store.py
External Services
- ChromaDB vectors
- Gemini generation
Other components
- Clinical user
Connections 26
- Clinical user → Workspace dashboard: uses
README.md - Workspace dashboard → File upload: renders
frontend/src/App.tsx - Workspace dashboard → Document library: renders
frontend/src/App.tsx - Workspace dashboard → Clinical chat: renders
frontend/src/App.tsx - Workspace dashboard → Document API client: loads, deletes
frontend/src/App.tsx - File upload → Document API client: uploads
frontend/src/components/FileUpload.tsx - Clinical chat → Query API client: sends queries
frontend/src/components/ChatInterface.tsx - Clinical chat → Source citations: renders
frontend/src/components/ChatInterface.tsx - Document API client → FastAPI application: HTTP requests
README.md - Query API client → FastAPI application: HTTP and SSE
frontend/src/api/query.ts - FastAPI application → Upload endpoint: registers
backend/main.py - FastAPI application → Document endpoints: registers
backend/main.py - FastAPI application → Query endpoints: registers
backend/main.py - FastAPI application → Health endpoint: registers
backend/main.py - FastAPI application → Service coordinator: initializes
backend/main.py - Upload endpoint → Service coordinator: delegates
backend/routers/upload.py - Document endpoints → Service coordinator: delegates
backend/routers/documents.py - Query endpoints → Service coordinator: delegates
backend/routers/query.py - Health endpoint → Service coordinator: checks status
backend/routers/health.py - Service coordinator → Document ingestion: ingests files
backend/services/__init__.py - Service coordinator → RAG pipeline: runs queries
backend/services/__init__.py - Service coordinator → Document metadata: reads, updates
backend/services/__init__.py - Service coordinator → Conversation history: stores turns
backend/services/__init__.py - Document ingestion → ChromaDB vectors: writes chunks
backend/services/ingestion.py - RAG pipeline → ChromaDB vectors: retrieves chunks
backend/services/rag.py - RAG pipeline → Gemini generation: generates answers
README.md