# 心飞MD **Repository Path**: itxinfei/xfmd ## Basic Information - **Project Name**: 心飞MD - **Description**: 心飞MD轻量级Markdown编辑器 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-11-12 - **Last Updated**: 2026-12-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # xinfeimd [简体中文](README.md) · **English**
A local-first Markdown editor. Tauri 2 + Vue 3 + Milkdown, Windows desktop. The reference point is pinned to Typora 1.14.15. The goal is to carry over how it *works*, not to reproduce how it *looks*. --- ## 1. Why build another Markdown editor There is no shortage of options. What is scarce is something that satisfies all of the following: - Install and write. No sign-in, no sync, no subscription - What lands on disk is a plain `.md` file you can open in Notepad — no vault, no proprietary format - Full functionality offline; AI features are off by default - Theme, fonts and spacing are yours to change Typora half-satisfies the first two and fails the last two. Obsidian goes the other way: powerful, but a proprietary vault and plugins with broad permissions. So this project keeps its scope narrow: **a local editor a writer can actually live in**. Not a notes platform, not a knowledge base, not cloud collaboration. Narrow scope makes the trade-offs ugly. They are written down here instead of buried in a PRD. ## 2. Three rules that don't bend **1. The disk is the only truth.** Whatever the in-memory state looks like, there is exactly one path to persistence: transaction → atomic write → undo stack. Pull the power mid-save and the file is either the old version or the new one, never half of each. If another program touched the file, the editor will not silently overwrite it — it asks first. **2. No account, no cloud.** No registration, no login, no upload. Want cross-device sync? Use Syncthing, Git, or a network drive. That's your call, and the editor stays out of it. What you get in exchange is concrete: you know exactly where every character ends up and with what permissions. **3. AI is a plugin, not a foundation.** Offline first. Plugins run sandboxed; a crash there does not affect typing or saved files. No default-on network capability. ## 3. Current state Still in L1 — full coverage of Typora's existing feature set is the hard gate for release. Progress is tracked against the 77 `T-xxx` items in `docs/Typora功能清单.md`, not against a vague "mostly done". Working today: | Capability | Status | |---|---| | Editor core (Milkdown / ProseMirror) | connected | | File tree, multi-document switching, document lifecycle | connected | | Find & replace (`FindReplaceBar`) | connected | | Quick open (`QuickOpen`) | connected | | Format toolbar, table insert, link dialog | connected | | View modes, auto-save, status bar | connected | | Outline panel, preferences, help | connected | | Scroll and zoom details | connected | Items not yet done are marked `BLOCKED` in the checklist rather than quietly deleted — that is a hard constraint (C-02). Size: 34 frontend files / 4,831 lines; 2 Rust files / 648 lines. ## 4. Architecture ``` src/ frontend ├── components/ 17 components: editor container, file tree, outline, find bar, dialogs ├── composables/ state and commands ├── plugins/ extension points └── styles/ tokens.css is the single source of design variables src-tauri/src/ native side: file IO, atomic writes, window and menus ``` | Layer | Choice | Why | |---|---|---| | Shell | Tauri 2 | An order of magnitude smaller than Electron, memory stays bounded | | Editor | Milkdown 7 (ProseMirror) | WYSIWYG with a real document model underneath; undo and custom commands are tractable | | Framework | Vue 3 + TypeScript | Fine-grained components suit a panel-heavy UI | | Build | Vite 8 | — | ## 5. Quality gates One unusual thing about this project: **development is driven mainly by AI coding agents; humans keep only scope approval, requirement sign-off, and release authorization**. That sounds risky, so it ships with a full constraint system: - `docs/大模型开发契约.md`: 22 hard constraints C-01..C-22 covering read-only baselines, no silent scope cuts, a single write path, zero-permission plugins, and no self-certification - `pnpm gates`: nine gate stages (doc / ui / ui-evidence / stage1 / merge / security / release / baseline) - Evidence before status: claiming "passed" requires the gate output plus the path to `docs/benchmarks/gates/last-run.json` - Baseline documents change only through a CR with regenerated hashes; editing the gate script or its evidence is the most serious violation This exists to solve the failure mode AI development is worst at: **declaring its own work finished**. If the gate fails, nothing else matters. ## 6. Getting started Requirements: Node 20+, pnpm, Rust stable, MSVC build tools on Windows. ```bash pnpm install pnpm dev # Vite hot reload pnpm tauri dev # desktop ``` Build: ```bash pnpm build pnpm tauri build ``` Read [`CLAUDE.md`](CLAUDE.md) first for the document loading order and dev constraints. Baselines live in [`docs/`](docs/): PRD, UI spec, Typora feature checklist, stability and memory plan, AI development contract. ## 7. Roadmap - **L1** (in progress): 100% coverage of Typora 1.14.15, verified item by item - **L2**: plugin system with zero-permission sandboxing - **L3**: AI features, offline by default, explicitly enabled Nothing from L2 or L3 goes in before L1 is done (C-03). ## 8. License Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE). Author: itxinfei (心飞为你飞)