# bugkingg/videomind architecture

> Architecture diagram of the GitHub repository bugkingg/videomind, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bugkingg/videomind
- Repository: https://github.com/bugkingg/videomind

## Overview

VideoMind accepts video links, builds transcript-backed video knowledge, and provides AI summaries and conversational Q&A, with login and conversation history as supporting workflows. The documented web client calls the Java service, which coordinates asynchronous work and streaming updates; the Python agent handles AI processing. Agent internals and frontend calls are supported by sampled source, while Java, queue, and deployment details rely on the README because their source files are not in the supplied tree. The README also documents user authentication, cookie support, and multi-instance SSE routing.

Main entry points: [`video-mind-agent/app/agent/service.py`](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/service.py) (Agent orchestration), [`video-mind-java`](https://github.com/bugkingg/videomind/tree/master/video-mind-java) (Spring API), [`video-mind-web/src/views/Home.vue`](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/views/Home.vue) (Home workflow), [`video-mind-agent/app/agent/graph.py`](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/graph.py) (Intent routing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["Vue application<br/>[App.vue]"]
  node_home["Home workflow<br/>[Home.vue]"]
  node_summary_ui["Summary streaming<br/>[useSummary.ts]"]
  node_chat_ui["Chat streaming<br/>[useChat.ts]"]
  node_history_ui["History lookup<br/>[useHistory.ts]"]
  node_auth_ui["Authentication<br/>[useAuth.ts]"]
  node_sse_parser["SSE parsing<br/>[sseParser.ts]"]
end

subgraph group_coordination["Backend coordination"]
  node_java_api["Spring API"]
  node_task_queue["Async task queue"]
  node_sse_routing["SSE routing"]
  node_identity_db[("Business database")]
  node_redis[("Redis")]
end

subgraph group_video_ai["Video AI"]
  node_agent_http["Agent HTTP service<br/>[web_server.py]"]
  node_fetcher["Video parser<br/>[fetch_video.py]"]
  node_orchestrator["Agent orchestration<br/>[service.py]"]
  node_routing_graph["Intent routing<br/>[graph.py]"]
  node_summary["Summary generation"]
  node_qa["Video Q&amp;A<br/>[video_qa.py]"]
  node_intent["Intent classification"]
  node_reranker["Result reranking<br/>[reranker.py]"]
end

subgraph group_persistence["Data and retrieval"]
  node_video_store[("Video and transcript store")]
  node_vector_store[("Vector retrieval<br/>[vector_store.py]")]
  node_transcript_cache["Transcript chunking<br/>[store.py]"]
  node_conversation_store[("Conversation memory")]
end

node_viewer(("VideoMind user"))
node_llm["LLM provider"]
node_embedding_api["Embedding provider"]

node_viewer -->|"uses"| node_web
node_web -->|"opens"| node_home
node_home -->|"requests summary"| node_summary_ui
node_home -->|"asks questions"| node_chat_ui
node_home -->|"views history"| node_history_ui
node_web -->|"signs in"| node_auth_ui
node_summary_ui -->|"submits and streams"| node_java_api
node_chat_ui -->|"submits and streams"| node_java_api
node_history_ui -->|"requests records"| node_java_api
node_auth_ui -->|"authenticates"| node_java_api
node_summary_ui -->|"parses events"| node_sse_parser
node_chat_ui -->|"parses events"| node_sse_parser
node_java_api -->|"reads and writes"| node_identity_db
node_java_api -->|"locks and routes"| node_redis
node_java_api -->|"dispatches tasks"| node_task_queue
node_task_queue -->|"delivers work"| node_agent_http
node_agent_http -->|"invokes"| node_orchestrator
node_orchestrator -->|"requests parsing"| node_fetcher
node_orchestrator -->|"saves and loads"| node_video_store
node_orchestrator -->|"chunks transcript"| node_transcript_cache
node_orchestrator -->|"indexes and retrieves"| node_vector_store
node_orchestrator -->|"routes requests"| node_routing_graph
node_routing_graph -->|"classifies intent"| node_intent
node_routing_graph -->|"selects summary"| node_summary
node_routing_graph -->|"selects Q&amp;A"| node_qa
node_orchestrator -->|"reranks retrieval"| node_reranker
node_orchestrator -->|"loads and saves memory"| node_conversation_store
node_summary -->|"generates summary"| node_llm
node_qa -->|"generates answer"| node_llm
node_orchestrator -->|"updates memory"| node_llm
node_orchestrator -->|"requests embeddings"| node_embedding_api
node_java_api -->|"streams results"| node_sse_routing
node_sse_routing -->|"delivers summary events"| node_summary_ui
node_sse_routing -->|"delivers answer events"| node_chat_ui
node_fetcher -.->|"provides transcript"| node_video_store

click node_web "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/App.vue"
click node_home "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/views/Home.vue"
click node_summary_ui "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useSummary.ts"
click node_chat_ui "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useChat.ts"
click node_history_ui "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useHistory.ts"
click node_auth_ui "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useAuth.ts"
click node_sse_parser "https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/utils/sseParser.ts"
click node_java_api "https://github.com/bugkingg/videomind/tree/master/video-mind-java"
click node_task_queue "https://github.com/bugkingg/videomind/tree/master/video-mind-java"
click node_sse_routing "https://github.com/bugkingg/videomind/tree/master/video-mind-java"
click node_identity_db "https://github.com/bugkingg/videomind/tree/master/video-mind-java"
click node_redis "https://github.com/bugkingg/videomind/tree/master/video-mind-java"
click node_agent_http "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/web_server.py"
click node_fetcher "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/fetch_video.py"
click node_orchestrator "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/service.py"
click node_routing_graph "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/graph.py"
click node_summary "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/video_summarizer.py"
click node_qa "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/video_qa.py"
click node_intent "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/intent_classifier.py"
click node_reranker "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/reranker.py"
click node_video_store "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/video_repository.py"
click node_vector_store "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/vector_store.py"
click node_transcript_cache "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/transcripts/store.py"
click node_conversation_store "https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/conversation_repository.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,node_home,node_summary_ui,node_chat_ui,node_history_ui,node_auth_ui,node_sse_parser,node_viewer toneBlue
class node_java_api,node_task_queue,node_sse_routing,node_identity_db,node_redis toneAmber
class node_agent_http,node_fetcher,node_orchestrator,node_routing_graph,node_summary,node_qa,node_intent,node_reranker toneMint
class node_video_store,node_vector_store,node_transcript_cache,node_conversation_store toneRose
class node_llm,node_embedding_api toneIndigo
```

## Components

### Web client

- [Vue application](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/App.vue): `video-mind-web/src/App.vue`
- [Home workflow](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/views/Home.vue): `video-mind-web/src/views/Home.vue`
- [Summary streaming](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useSummary.ts): `video-mind-web/src/composables/useSummary.ts`
- [Chat streaming](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useChat.ts): `video-mind-web/src/composables/useChat.ts`
- [History lookup](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useHistory.ts): `video-mind-web/src/composables/useHistory.ts`
- [Authentication](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/composables/useAuth.ts): `video-mind-web/src/composables/useAuth.ts`
- [SSE parsing](https://github.com/bugkingg/videomind/blob/master/video-mind-web/src/utils/sseParser.ts): `video-mind-web/src/utils/sseParser.ts`

### Backend coordination

- [Spring API](https://github.com/bugkingg/videomind/tree/master/video-mind-java): `video-mind-java`
- [Async task queue](https://github.com/bugkingg/videomind/tree/master/video-mind-java): `video-mind-java`
- [SSE routing](https://github.com/bugkingg/videomind/tree/master/video-mind-java): `video-mind-java`
- [Business database](https://github.com/bugkingg/videomind/tree/master/video-mind-java): `video-mind-java`
- [Redis](https://github.com/bugkingg/videomind/tree/master/video-mind-java): `video-mind-java`

### Video AI

- [Agent HTTP service](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/web_server.py): `video-mind-agent/web_server.py`
- [Video parser](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/fetch_video.py): `video-mind-agent/fetch_video.py`
- [Agent orchestration](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/service.py): `video-mind-agent/app/agent/service.py`
- [Intent routing](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/agent/graph.py): `video-mind-agent/app/agent/graph.py`
- [Summary generation](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/video_summarizer.py): `video-mind-agent/app/services/video_summarizer.py`
- [Video Q&A](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/video_qa.py): `video-mind-agent/app/services/video_qa.py`
- [Intent classification](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/intent_classifier.py): `video-mind-agent/app/services/intent_classifier.py`
- [Result reranking](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/services/reranker.py): `video-mind-agent/app/services/reranker.py`

### Data and retrieval

- [Video and transcript store](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/video_repository.py): `video-mind-agent/app/repositories/video_repository.py`
- [Vector retrieval](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/vector_store.py): `video-mind-agent/app/repositories/vector_store.py`
- [Transcript chunking](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/transcripts/store.py): `video-mind-agent/app/transcripts/store.py`
- [Conversation memory](https://github.com/bugkingg/videomind/blob/master/video-mind-agent/app/repositories/conversation_repository.py): `video-mind-agent/app/repositories/conversation_repository.py`

### Other components

- **VideoMind user**
- **LLM provider**
- **Embedding provider**

## Connections

- VideoMind user → Vue application: uses
- Vue application → Home workflow: opens
- Home workflow → Summary streaming: requests summary
- Home workflow → Chat streaming: asks questions
- Home workflow → History lookup: views history
- Vue application → Authentication: signs in
- Summary streaming → Spring API: submits and streams
- Chat streaming → Spring API: submits and streams
- History lookup → Spring API: requests records
- Authentication → Spring API: authenticates
- Summary streaming → SSE parsing: parses events
- Chat streaming → SSE parsing: parses events
- Spring API → Business database: reads and writes
- Spring API → Redis: locks and routes
- Spring API → Async task queue: dispatches tasks
- Async task queue → Agent HTTP service: delivers work
- Agent HTTP service → Agent orchestration: invokes
- Agent orchestration → Video parser: requests parsing
- Agent orchestration → Video and transcript store: saves and loads
- Agent orchestration → Transcript chunking: chunks transcript
- Agent orchestration → Vector retrieval: indexes and retrieves
- Agent orchestration → Intent routing: routes requests
- Intent routing → Intent classification: classifies intent
- Intent routing → Summary generation: selects summary
- Intent routing → Video Q&A: selects Q&A
- Agent orchestration → Result reranking: reranks retrieval
- Agent orchestration → Conversation memory: loads and saves memory
- Summary generation → LLM provider: generates summary
- Video Q&A → LLM provider: generates answer
- Agent orchestration → LLM provider: updates memory
- Agent orchestration → Embedding provider: requests embeddings
- Spring API → SSE routing: streams results
- SSE routing → Summary streaming: delivers summary events
- SSE routing → Chat streaming: delivers answer events
- Video parser → Video and transcript store: provides transcript
