How clidey/whodb works
Main Components Overview
The system should be represented as a three-tier architecture with these main components:
a. Frontend Layer (React Application)
• As a single block with subcomponents:
• UI Components (/frontend/src/components)
• Pages (/frontend/src/pages)
• State Management (/frontend/src/store)
• GraphQL Client Integration
b. Backend Core (Go Service)
• Following key components:
• GraphQL Server (core/graph)
• Authentication System (core/src/auth)
• LLM Integration Layer (core/src/llm)
• Plugin System (core/src/plugins)
• Router (core/src/router)
c. Database Connectors
• Supported databases as separate components:
• PostgreSQL
• MySQL
• SQLite3
• MongoDB
• Redis
• ElasticSearch
• ClickHouse
Component Relationships and Data Flow
• Backend → Database Connectors: Database-specific protocols
• LLM Integration → External Services (Ollama, ChatGPT, Anthropic)
Detailed Component Breakdown
Frontend (Blue Section):
┌─ Frontend Layer ─────────────────┐
• ┌─ Components ─┐ ┌─ Pages ────┐ │
• Graph │ │ - Chat │ │
• Editor │ │ - Graph │ │
• Sidebar │ │ - Storage │ │
• ┘ └────────────┘ │
• ┌─ Store ──────┐ ┌─ Config ───┐ │
• Auth │ │ - GraphQL │ │
• Database │ │ - Routes │ │
• ┘ └────────────┘ │
• ┘
Backend (Green Section):
┌─ Backend Core ──────────────────┐
• ┌─ GraphQL API ┐ ┌─ Auth ────┐ │
• Resolvers │ │ - Login │ │
• Schema │ │ - Logout │ │
• ┘ └──────────┘ │
• ┌─ LLM Engine ─┐ ┌─ Router ─┐ │
• Ollama │ │ - Routes │ │
• ChatGPT │ │ - Middle │ │
• Anthropic │ │ ware │ │
• ┘ └──────────┘ │
• ┘
Database Layer (Yellow Section):
┌─ Database Connectors ───────────┐
• ┌─ SQL ───────┐ ┌─ NoSQL ────┐ │
• PostgreSQL│ │ - MongoDB │ │
• MySQL │ │ - Redis │ │
• SQLite3 │ │ │ │
• ┘ └──────────┘ │
• ┌─ Search ────┐ │
• Elastic │ │
• ClickHouse│ │
• ┘ │
• ┘
Technical Details
• GraphQL endpoint (/graphql)
• WebSocket connections for real-time features
• Authentication flow
• Database connection pooling
• LLM integration points