How vbuyel/llm_semantic_file_system works
Semantic FS is an event-driven file platform with a dashboard, Google OAuth, GCS/Drive operations, an AI assistant, semantic indexing, and live activity history. The main user flow is dashboard request → gateway → file or AI service; file uploads also lead to text extraction and Kafka events, which support vector indexing and event logging. The graph preserves README-documented service flows and source-visible UI and upload calls. Several service internals were not excerpted, so links based only on documented architecture cite the README; unsampled implementation details are not inferred.
Main entry points: main.py File Operations · gateway_router.py Gateway API · api.js Dashboard API · broker.py Kafka Broker
Components 22
Dashboard
- Dashboard UI
ui/js/app.js - Dashboard API
ui/js/api.js - Live Event UI
ui/js/components/events/base.js
Gateway and Auth
- Gateway API
src/gateway_auth/v1/gateway_router.py - Google OAuth
src/gateway_auth/v1/oauth_router.py
File Management
- File Operations
src/file_ops/v1/main.py - GCS Adapter
src/file_ops/adapters/gcs_ops.py - Drive Adapter
src/file_ops/adapters/google_drive_ops.py - Text Extraction
src/file_ops/adapters/text_extractor.py
AI and Search
- LLM Service
src/llm/v1/main.py - AI Agent
src/llm/adapters/agent.py - Document Search
src/llm/adapters/rag_search.py - Web Search
src/llm/adapters/web_search.py - LLM Kafka Adapter
src/llm/adapters/kafka.py
Events and Storage
- Kafka Broker
src/kafka/broker.py - Vector DB Service
src/vector_db/v1/main.py - Vector Index
src/vector_db/adapters/database.py - Event DB Service
src/event_db/v1/main.py - Event Store Adapter
src/event_db/adapters/database.py
Other components
- User
- Cloud File Storage
- PostgreSQL
Connections 27
- User → Dashboard UI: uses
- Dashboard UI → Dashboard API: requests
ui/js/app.js - Dashboard API → Gateway API: calls REST
ui/js/api.js - Dashboard UI → Live Event UI: starts events
ui/js/app.js - Live Event UI → Dashboard API: connects WebSocket
ui/js/components/events/base.js - Dashboard API → Google OAuth: submits callback
ui/js/api.js - Gateway API → Google OAuth: routes auth
src/gateway_auth/v1/main.py - Gateway API → File Operations: proxies file requests
- Gateway API → LLM Service: proxies AI request
- File Operations → GCS Adapter: dispatches storage
src/file_ops/v1/main.py - File Operations → Drive Adapter: dispatches storage
src/file_ops/v1/main.py - GCS Adapter → Cloud File Storage: reads and writes
- Drive Adapter → Cloud File Storage: reads and writes
- File Operations → Text Extraction: extracts text
- File Operations → Kafka Broker: publishes events
- LLM Service → AI Agent: runs agent
src/llm/v1/main.py - AI Agent → Document Search: invokes document search
src/llm/adapters/agent.py - AI Agent → Web Search: invokes web search
src/llm/adapters/agent.py - Document Search → LLM Kafka Adapter: requests search
src/llm/adapters/rag_search.py - LLM Kafka Adapter → Kafka Broker: sends commands
- Kafka Broker → Vector DB Service: delivers commands
- Vector DB Service → Vector Index: indexes and queries
- Vector Index → PostgreSQL: persists vectors
- Kafka Broker → Event DB Service: delivers events
- Event DB Service → Event Store Adapter: records events
src/event_db/v1/main.py - Event Store Adapter → PostgreSQL: persists logs
- Event DB Service → Gateway API: forwards live events