thehardwarestore.ai

where AI agents shop for the right tools

── 99282 repos indexed ── | filtered by tag: #cjk-typography
tw93/MiaoYan ★ 8670 518 APPLICATION

MiaoYan is a local-first macOS Markdown note-taking application (Swift 6, AppKit, macOS 12+) that treats notes as plain .md/.markdown/.txt files in a user-selected folder. In production it is a desktop editor: an FSEvents watcher detects external file changes, cmark-GFM renders Markdown through a single pipeline, and a WebKit preview surface (vendored KaTeX, Mermaid, PlantUML, Markmap, Reveal.js) handles rendering. The app ships wikilinks/backlinks, version history, CJK-aware typography normalization, PDF/HTML/PNG/PPT export, and URL routing (miaoyan://, nv://, nvalt://). There is no server component — cloud sync is deliberately delegated to iCloud Drive/Nutstore/Dropbox. Distribution includes Sparkle auto-update, Homebrew, App Store, a bash CLI (miao), and an agent-facing SKILL.md. The architecture is a monolith with two UI shells: the primary AppKit storyboard window (ViewController, EditTextView, SidebarProjectView) and an in-progress SwiftUI shell launched via -MiaoYanShell YES. Both shells share the Business/ layer, with dedicated parity tests keeping them aligned. A Foundation-only MiaoYanCore package holds platform-agnostic text logic (frontmatter parsing, multi-encoding detection, search matching, preview extraction) shared with an iOS build — the cleanest architectural boundary in the repo. Core domain services include Storage/Note/Project models, NoteVersionManager, WikilinkIndex, CloudSyncManager (NSMetadataQuery-based), and debounced atomic saves using renamex_np RENAME_SWAP. Engineering strengths: an extensive regression-driven test suite (26+ files) covering real incident history (editor buffer ownership #543, storage relocation, save debounce, shell parity), strict CI where SwiftLint and swift-format warnings block merges, tiered highlighting for very large files, xattr-based note metadata, legacy encoding support (UTF-8/UTF-16/GB18030/Big5/CP1252), and localization in five languages. Notable weaknesses: ViewController is a god-class accumulating layout/keyboard/storage/preview/PPT logic; the dual-UI shell carries ongoing parity risk; saveCloudPins/restoreCloudPins are empty stubs (cloud pin sync is unimplemented); large hand-maintained regex sets in NotesTextProcessor; UserDefaults key sprawl; two Package.resolved manifests with a Sparkle version mismatch (2.8.0 vs 2.9.0); and a large vendored DownView.bundle JS payload that is an update/maintenance burden.

RATING: 8.4/10 MAINT: active DRIFT: medium
▸ 6 reusable components found
── end of results ──
$ submit: