SiYuan is a privacy-first, local-first personal knowledge management system with a block-based WYSIWYG editor, AI assistant integration, cloud sync, and a plugin ecosystem. It is architected as a Go kernel (Gin HTTP API + WebSocket) paired with a TypeScript/Electron frontend, supporting desktop (Windows, macOS, Linux), mobile (Android, iOS, HarmonyOS), and browser/Docker deployment. The kernel handles all data operations: block tree persistence as JSON `.sy` files, SQLite indexing with FTS5 and SQLCipher encryption, attribute-view databases (tables, galleries, kanban), backlink resolution, full-text search, and sync via multiple providers (SiYuan cloud, S3, WebDAV, LAN). The frontend provides a rich editing experience with Markdown, LaTeX, Mermaid, mind maps, PDF annotation, flashcards (FSRS), and an agent chat interface. External dependencies include the Lute Markdown parser, dejavu sync library, Pandoc for document conversion, and PDF.js for PDF rendering. The system exposes a comprehensive REST API with contract-based validation and auto-generated TypeScript types, enabling third-party integrations and a community marketplace for plugins, themes, and templates.