How sumanthmandava07/support-knowledge-copilot works
This is a support-knowledge copilot: a user uploads support documents, asks questions in a web chat, and receives an answer with source citations. The backend also offers document management and retrieval evaluation. The graph follows the visible chat and document flows; several frontend-to-backend links are evidenced by fetch calls, while internals not shown in the excerpts are omitted. The README content was empty, so product scope is inferred from the source tree and sampled code.
Main entry points: App.jsx Web app routes · ChatService.java Answer orchestration · ChatController.java Chat endpoints · Documents.jsx Document manager
Components 22
Web interface
- Web app routes
support-knowledge-frontend/src/App.jsx - Chat workspace
support-knowledge-frontend/src/pages/Dashboard.jsx - Document manager
support-knowledge-frontend/src/pages/Documents.jsx - Evaluation screen
support-knowledge-frontend/src/pages/Evaluation.jsx - Login screen
support-knowledge-frontend/src/pages/Login.jsx - Profile screen
support-knowledge-frontend/src/pages/Profile.jsx - Workspace navigation
support-knowledge-frontend/src/components/Sidebar.jsx - Page header
support-knowledge-frontend/src/components/Header.jsx - Citation display
support-knowledge-frontend/src/components/CitationCard.jsx
Backend API
- Chat endpoints
src/main/java/com/copilot/controller/ChatController.java - Document endpoints
src/main/java/com/copilot/controller/DocumentController.java - Chat request
src/main/java/com/copilot/model/ChatRequest.java - Answer and citations
src/main/java/com/copilot/model/ChatResponse.java
Knowledge and retrieval
- Document ingestion
src/main/java/com/copilot/service/DocumentService.java - Chunk and vector stores
src/main/java/com/copilot/service/DocumentService.java - Hybrid retrieval
src/main/java/com/copilot/service/RetrievalService.java - Retrieval evaluation
src/main/java/com/copilot/service/EvaluationService.java - Evaluation questions
src/main/resources/evaluation/evaluation.json
Answer generation
- Answer orchestration
src/main/java/com/copilot/service/ChatService.java - Citation verification
src/main/java/com/copilot/service/CitationVerifierService.java
Other components
- User
- Chat model
Connections 28
- User → Web app routes: opens
support-knowledge-frontend/src/App.jsx - Web app routes → Chat workspace: routes to
support-knowledge-frontend/src/App.jsx - Web app routes → Document manager: routes to
support-knowledge-frontend/src/App.jsx - Web app routes → Evaluation screen: routes to
support-knowledge-frontend/src/App.jsx - Web app routes → Login screen: routes to
support-knowledge-frontend/src/App.jsx - Web app routes → Profile screen: routes to
support-knowledge-frontend/src/App.jsx - Chat workspace → Chat endpoints: requests chat
- Document manager → Document endpoints: manages documents
support-knowledge-frontend/src/pages/Documents.jsx - Document manager → Workspace navigation: renders
support-knowledge-frontend/src/pages/Documents.jsx - Document manager → Page header: renders
support-knowledge-frontend/src/pages/Documents.jsx - Evaluation screen → Workspace navigation: renders
support-knowledge-frontend/src/pages/Evaluation.jsx - Evaluation screen → Page header: renders
support-knowledge-frontend/src/pages/Evaluation.jsx - Profile screen → Workspace navigation: renders
support-knowledge-frontend/src/pages/Profile.jsx - Profile screen → Page header: renders
support-knowledge-frontend/src/pages/Profile.jsx - Chat endpoints → Chat request: accepts
src/main/java/com/copilot/controller/ChatController.java - Chat endpoints → Answer orchestration: delegates to
src/main/java/com/copilot/controller/ChatController.java - Chat endpoints → Retrieval evaluation: invokes
src/main/java/com/copilot/controller/ChatController.java - Answer orchestration → Hybrid retrieval: searches
src/main/java/com/copilot/service/ChatService.java - Answer orchestration → Citation verification: checks support
src/main/java/com/copilot/service/ChatService.java - Answer orchestration → Chat model: requests completion
src/main/java/com/copilot/service/ChatService.java - Answer orchestration → Answer and citations: constructs
src/main/java/com/copilot/service/ChatService.java - Chat endpoints → Answer and citations: returns
src/main/java/com/copilot/controller/ChatController.java - Citation verification → Answer orchestration: provides support
src/main/java/com/copilot/service/ChatService.java - Document endpoints → Document ingestion: delegates to
src/main/java/com/copilot/controller/DocumentController.java - Document ingestion → Chunk and vector stores: stores chunks
src/main/java/com/copilot/service/DocumentService.java - Hybrid retrieval → Chunk and vector stores: searches
src/main/java/com/copilot/service/RetrievalService.java - Retrieval evaluation → Hybrid retrieval: evaluates results
src/main/java/com/copilot/service/EvaluationService.java - Retrieval evaluation → Evaluation questions: loads questions
src/main/java/com/copilot/service/EvaluationService.java