System Architecture
High-Level Overview
┌─────────────────────────────────────────────────────────────┐
│ Client Layer │
│ (Web UI, CLI, SDKs, Custom Applications) │
└─────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ REST API Server │
│ (Express.js, TypeScript, Port 3000) │
└─────────┬───────────────────────────────┬───────────────────┘
│ │
▼ ▼
┌──────────────────────┐ ┌──────────────────────────────┐
│ MCP Client Manager │ │ Indexing Engine │
│ (Data Source Layer) │ │ (Vector + Graph Indexing) │
└──────────┬───────────┘ └────────┬─────────────────────┘
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────┐
│ Storage Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ MongoDB │ │ Qdrant │ │Memgraph │ │ Redis │ │
│ │(Metadata)│ │ (Vectors)│ │ (Graph) │ │ (Cache) │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────────┘Core Components
1. REST API Server
2. MCP Client Manager
3. Indexing Engine
4. Query Engine (LightRAG)
Storage Architecture
Why Four Databases?
MongoDB (Document Database)
Qdrant (Vector Database)
Memgraph (Graph Database)
Redis (Cache)
Data Flow
Indexing Flow
Query Flow
Scalability Patterns
Horizontal Scaling
Vertical Scaling
Performance Characteristics
Latency Breakdown
Throughput
Indexing Speed
Concurrency Model
Security Architecture
Authentication & Authorization
Encryption
Sensitive Data
Monitoring & Observability
Metrics
Logging
Deployment Architectures
Development
Production (Small)
Production (Large)
Technology Choices
Why Express.js?
Why TypeScript?
Why Model Context Protocol?
Why LightRAG?
Next Steps
Last updated
Was this helpful?