How zuramai/chatllm works
Main Components
a. Frontend Layer (Vue.js Application):
• UI Components (src/components/ui/*)
• Domain Components (src/components/domain/*)
• Views/Pages (src/views/*)
• State Management (src/store/*)
• Router (src/router/*)
b. Core Processing Layer:
• WebGPU Integration (src/composables/useWebGPU.ts)
• LLM Processing (src/composables/useLLM.ts)
• Model Management (src/composables/useModel.ts)
• Database Operations (src/composables/useDb.ts)
c. Web Worker Layer:
• Background Processing (src/web-worker.ts)
Specific Elements
┌─────────────────────────────────────────────────────────┐
• Vue.js Frontend │
• ┬───────────────┬──────────────┬─────────────┤
• Views │ UI Components │ Router │ Store │
• (Pages) │ │ │ (Pinia) │
• ┬─────┴───────┬───────┴──────┬───────┴─────────────┘
┌─────▼─────────────▼──────────────▼───────────────────┐
• Core Processing Layer │
• ┬──────────────┬────────────┬──────────┤
• Model │ LLM │ WebGPU │ DB │
• Manager │ Service │ Service │ Service │
• ┬───────┴──────┬───────┴─────┬──────┴────┬─────┘
┌──────▼──────────────▼──────────────▼───────────▼─────┐
• Web Worker Layer │
• (Background Processing & GPU Tasks) │
• ┘
Technical Details to Highlight
• Vue 3 component architecture
• WebGPU implementation for GPU acceleration
• Pinia state management
• Web Worker implementation for background processing
• Local database integration