How kwokkwok/silo works
High-Level Architecture Overview
a) Client-Side Applications
• Web Application (React-based)
• Browser Extension
• Mobile Interface
b) Core Features
• Chat System
• Image Generation
• Web Copilot (Browser Extension Feature)
• Multi-language Support
c) External Services
• SiliconCloud API
• Other AI Model APIs (Gemini, Claude, X-AI/Grok, OpenAI)
Detailed Component Breakdown
A. Presentation Layer:
• Pages (/src/pages/)
• Chat Interface
• Image Generation Interface
• Web Copilot Interface
• Components (/src/components/)
• Header
• Guide
• Model Selectors
• Message Renderers
B. Business Logic Layer:
• Services (/src/services/)
• API Integration
• Prompt Management
• Store (/src/store/)
• Application State
• Storage Management
• Utils (/src/utils/)
• Chat Utilities
• Image Generation
• Model Management
• Environment Configuration
C. Extension-Specific Components:
• Background Scripts
• Content Scripts
• Extension UI
Data Flow Representation
• User input flow
• API request/response paths
• State management flow
• Extension communication flow
Implementation Details
Technical stack indicators:
• React/Vite
• Tailwind CSS
• WXT (Extension Framework)
• Local Storage
• i18n System
Key Interactions
Highlight:
• Model switching mechanism
• API key management
• Theme switching
• Language switching
• Extension-specific features (text selection, page summary)
This architecture should emphasize the project's unique characteristics: being purely frontend, supporting multiple AI models, and functioning both as a web application and browser extension.