How l33tkr3w/llamacards works
Main Components
a) Client-Side Layer:
• HTML5 Canvas/DOM for node-based interface
• WebSocket client
• JavaScript runtime environment
• Card management UI
b) Server-Side Layer:
• Quart ASGI Server component
• WebSocket Server handler
• Card Processing Engine
• Model Integration Layer
c) External Services:
• Ollama AI Models container
• Database for RAG (Retrieval-Augmented Generation)
Component Relationships
• Bidirectional WebSocket connection between client and server
• HTTP/HTTPS connections for initial page load
• Data flow between server and Ollama models
• Database connections for embedding storage and retrieval
Specific Implementation Details
a) Card System Architecture:
• Card Types (Input, Output, Vision, RAG, Repeater)
• Card Connection Manager
• Card State Manager
b) Processing Pipeline:
• Concurrent processing handler
• Sequential processing handler
• Real-time update broadcaster
Detailed Component Specifications
For each major component, include:
• Technology stack (Quart, aiohttp, HTTPX)
• Primary responsibilities
• Input/Output specifications
• Key interfaces
External Services Layer (Ollama/Storage)
Remember to maintain a balance between detail and clarity, focusing on the real-time, node-based nature of the application while clearly showing how the different components interact to process and manage the AI model interactions.