# konetipraneethkumar/unified-knowledge-hub architecture

> Architecture diagram of the GitHub repository konetipraneethkumar/unified-knowledge-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/konetipraneethkumar/unified-knowledge-hub
- Repository: https://github.com/konetipraneethkumar/unified-knowledge-hub

## Overview

This is a personal knowledge-management and search product: users connect sources, manage indexed knowledge, and search it; accounts and device pairing support access and source management. The backend exposes authentication, connector, device, knowledge-item, search, and agent APIs, with hybrid retrieval and vector storage as internal layers. The React frontend presents chat and workspace views, but the sampled chat uses a local mock search service rather than the backend API. Backend ingestion details and several API implementations were not sampled, so uncertain connections are omitted or marked unverified.

Main entry points: [`backend/app/main.py`](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/main.py) (FastAPI app), [`backend/app/services/knowledge_items.py`](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/knowledge_items.py) (Knowledge service), [`frontend/src/app/router.tsx`](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/router.tsx) (Page router), [`backend/app/api/search.py`](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/search.py) (Search API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_web_app["Web app<br/>[App.tsx]"]
  node_router["Page router<br/>[router.tsx]"]
  node_layout["App layout<br/>[AppLayout.tsx]"]
  node_chat_page["Search chat<br/>[ChatPage.tsx]"]
  node_chat_window["Chat window<br/>[ChatWindow.tsx]"]
  node_mock_search["Mock search"]
  node_mock_data["Demo knowledge<br/>[mockKnowledge.ts]"]
  node_workspace["Workspace pages<br/>[WorkspacePages.tsx]"]
end

subgraph group_api["Backend API"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_auth_api["Authentication API<br/>[auth.py]"]
  node_connectors_api["Connector API<br/>[connectors.py]"]
  node_devices_api["Device API<br/>[devices.py]"]
  node_knowledge_api["Knowledge API<br/>[knowledge_items.py]"]
  node_search_api["Search API<br/>[search.py]"]
  node_agent_api["Agent API<br/>[agent.py]"]
  node_orchestrator["Agent orchestrator<br/>[orchestrator.py]"]
  node_agent_tools["Agent tools<br/>[tools.py]"]
end

subgraph group_retrieval["Knowledge and retrieval"]
  node_knowledge_service["Knowledge service<br/>[knowledge_items.py]"]
  node_hybrid_search["Hybrid retrieval<br/>[hybrid.py]"]
  node_embeddings["Embedding service<br/>[embeddings.py]"]
  node_vector_storage[("Vector storage<br/>[vector_storage.py]")]
  node_document_extraction["Document extraction"]
  node_local_files["Local file connector"]
end

subgraph group_identity["Identity and persistence"]
  node_security["Session security<br/>[security.py]"]
  node_database[("Database sessions<br/>[database.py]")]
  node_models["Domain models<br/>[models.py]"]
end

node_user(("User"))

node_user -->|"uses"| node_web_app
node_web_app -->|"loads"| node_router
node_router -->|"renders"| node_layout
node_router -->|"routes to"| node_chat_page
node_router -->|"routes to"| node_workspace
node_chat_page -->|"renders"| node_chat_window
node_chat_page -->|"calls"| node_mock_search
node_mock_search -->|"searches"| node_mock_data
node_api_app -->|"registers"| node_auth_api
node_api_app -->|"registers"| node_connectors_api
node_api_app -->|"registers"| node_devices_api
node_api_app -->|"registers"| node_knowledge_api
node_api_app -->|"registers"| node_search_api
node_api_app -->|"registers"| node_agent_api
node_search_api -->|"calls"| node_hybrid_search
node_search_api -->|"calls"| node_knowledge_service
node_search_api -->|"uses"| node_embeddings
node_hybrid_search -->|"uses"| node_knowledge_service
node_hybrid_search -->|"uses"| node_embeddings
node_hybrid_search -->|"uses"| node_vector_storage
node_knowledge_api -->|"calls"| node_knowledge_service
node_agent_api -->|"calls"| node_orchestrator
node_agent_api -->|"uses"| node_agent_tools
node_auth_api -->|"authenticates"| node_security
node_auth_api -->|"uses"| node_database
node_security -->|"uses"| node_database
node_security -->|"checks credentials"| node_models
node_database -.->|"persists"| node_models
node_connectors_api -.->|"may dispatch"| node_local_files
node_local_files -.->|"may extract"| node_document_extraction
node_document_extraction -.->|"may index"| node_knowledge_service
node_knowledge_service -.->|"may store vectors"| node_vector_storage

click node_web_app "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/App.tsx"
click node_router "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/router.tsx"
click node_layout "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/layouts/AppLayout.tsx"
click node_chat_page "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/components/ChatPage.tsx"
click node_chat_window "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/components/ChatWindow.tsx"
click node_mock_search "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/services/mockSearchService.ts"
click node_mock_data "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/data/mockKnowledge.ts"
click node_workspace "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/workspace/WorkspacePages.tsx"
click node_api_app "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/main.py"
click node_auth_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/auth.py"
click node_connectors_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/connectors.py"
click node_devices_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/devices.py"
click node_knowledge_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/knowledge_items.py"
click node_search_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/search.py"
click node_agent_api "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/agent.py"
click node_orchestrator "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/agents/orchestrator.py"
click node_agent_tools "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/agents/tools.py"
click node_knowledge_service "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/knowledge_items.py"
click node_hybrid_search "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/retrieval/hybrid.py"
click node_embeddings "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/embeddings.py"
click node_vector_storage "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/vector_storage.py"
click node_document_extraction "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/document_extraction.py"
click node_local_files "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/local_filesystem.py"
click node_security "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/core/security.py"
click node_database "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/core/database.py"
click node_models "https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/models/models.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_app,node_router,node_layout,node_chat_page,node_chat_window,node_mock_search,node_mock_data,node_workspace,node_user toneBlue
class node_api_app,node_auth_api,node_connectors_api,node_devices_api,node_knowledge_api,node_search_api,node_agent_api,node_orchestrator,node_agent_tools toneAmber
class node_knowledge_service,node_hybrid_search,node_embeddings,node_vector_storage,node_document_extraction,node_local_files toneMint
class node_security,node_database,node_models toneRose
```

## Components

### Web application

- [Web app](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Page router](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/router.tsx): `frontend/src/app/router.tsx`
- [App layout](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/app/layouts/AppLayout.tsx): `frontend/src/app/layouts/AppLayout.tsx`
- [Search chat](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/components/ChatPage.tsx): `frontend/src/features/chat/components/ChatPage.tsx`
- [Chat window](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/components/ChatWindow.tsx): `frontend/src/features/chat/components/ChatWindow.tsx`
- [Mock search](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/services/mockSearchService.ts): `frontend/src/features/chat/services/mockSearchService.ts`
- [Demo knowledge](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/chat/data/mockKnowledge.ts): `frontend/src/features/chat/data/mockKnowledge.ts`
- [Workspace pages](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/frontend/src/features/workspace/WorkspacePages.tsx): `frontend/src/features/workspace/WorkspacePages.tsx`

### Backend API

- [FastAPI app](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/main.py): `backend/app/main.py`
- [Authentication API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/auth.py): `backend/app/api/auth.py`
- [Connector API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/connectors.py): `backend/app/api/connectors.py`
- [Device API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/devices.py): `backend/app/api/devices.py`
- [Knowledge API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/knowledge_items.py): `backend/app/api/knowledge_items.py`
- [Search API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/search.py): `backend/app/api/search.py`
- [Agent API](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/api/agent.py): `backend/app/api/agent.py`
- [Agent orchestrator](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/agents/orchestrator.py): `backend/app/agents/orchestrator.py`
- [Agent tools](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/agents/tools.py): `backend/app/agents/tools.py`

### Knowledge and retrieval

- [Knowledge service](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/knowledge_items.py): `backend/app/services/knowledge_items.py`
- [Hybrid retrieval](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/retrieval/hybrid.py): `backend/app/retrieval/hybrid.py`
- [Embedding service](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/embeddings.py): `backend/app/services/embeddings.py`
- [Vector storage](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/vector_storage.py): `backend/app/services/vector_storage.py`
- [Document extraction](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/document_extraction.py): `backend/app/services/document_extraction.py`
- [Local file connector](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/services/local_filesystem.py): `backend/app/services/local_filesystem.py`

### Identity and persistence

- [Session security](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [Database sessions](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Domain models](https://github.com/konetipraneethkumar/unified-knowledge-hub/blob/main/backend/app/models/models.py): `backend/app/models/models.py`

### Other components

- **User**

## Connections

- User → Web app: uses
- Web app → Page router: loads (evidence: `frontend/src/app/App.tsx`)
- Page router → App layout: renders (evidence: `frontend/src/app/router.tsx`)
- Page router → Search chat: routes to (evidence: `frontend/src/app/router.tsx`)
- Page router → Workspace pages: routes to (evidence: `frontend/src/app/router.tsx`)
- Search chat → Chat window: renders (evidence: `frontend/src/features/chat/components/ChatPage.tsx`)
- Search chat → Mock search: calls (evidence: `frontend/src/features/chat/components/ChatPage.tsx`)
- Mock search → Demo knowledge: searches (evidence: `frontend/src/features/chat/services/mockSearchService.ts`)
- FastAPI app → Authentication API: registers (evidence: `backend/app/main.py`)
- FastAPI app → Connector API: registers (evidence: `backend/app/main.py`)
- FastAPI app → Device API: registers (evidence: `backend/app/main.py`)
- FastAPI app → Knowledge API: registers (evidence: `backend/app/main.py`)
- FastAPI app → Search API: registers (evidence: `backend/app/main.py`)
- FastAPI app → Agent API: registers (evidence: `backend/app/main.py`)
- Search API → Hybrid retrieval: calls (evidence: `backend/app/api/search.py`)
- Search API → Knowledge service: calls (evidence: `backend/app/api/search.py`)
- Search API → Embedding service: uses (evidence: `backend/app/api/search.py`)
- Hybrid retrieval → Knowledge service: uses (evidence: `backend/app/retrieval/hybrid.py`)
- Hybrid retrieval → Embedding service: uses (evidence: `backend/app/retrieval/hybrid.py`)
- Hybrid retrieval → Vector storage: uses (evidence: `backend/app/retrieval/hybrid.py`)
- Knowledge API → Knowledge service: calls (evidence: `backend/app/api/knowledge_items.py`)
- Agent API → Agent orchestrator: calls (evidence: `backend/app/api/agent.py`)
- Agent API → Agent tools: uses (evidence: `backend/app/api/agent.py`)
- Authentication API → Session security: authenticates (evidence: `backend/app/api/auth.py`)
- Authentication API → Database sessions: uses (evidence: `backend/app/api/auth.py`)
- Session security → Database sessions: uses (evidence: `backend/app/core/security.py`)
- Session security → Domain models: checks credentials (evidence: `backend/app/core/security.py`)
- Database sessions → Domain models: persists
- Connector API → Local file connector: may dispatch
- Local file connector → Document extraction: may extract
- Document extraction → Knowledge service: may index
- Knowledge service → Vector storage: may store vectors
