b00fe3ec9e
- Backend: Express + WebSocket proxy (tsx watch, strict TS, ESM) - Frontend: React 19 + Vite + Monaco + Tailwind v4 + Tauri v2 - pnpm workspace at root for single-install workflow - AGENTS.md with architectural constraints and commands - Removed Tauri greet demo, added minimal App shell - No external database, Git-as-Database philosophy
1.5 KiB
1.5 KiB
typst-leaf 🍂
A completely self-hostable, high-performance editor for Typst, built on the philosophy of "Git as the Database."
Features:
- Instant Preview: Sub-50ms incremental compilation using
tinymist. - Vim Mode: First-class support via Monaco.
- Git Native: No hidden databases. Your projects are just folders with
.git. - Hybrid: Run it in Docker on your server, or as a native desktop app via Tauri.
📂 Repository Structure
typst-leaf/
├── typst-leaf-backend/ # Node.js/TS server (manages tinymist & git)
├── typst-leaf-frontend/ # React + Monaco frontend (includes Tauri)
├── VISION.md # Project philosophy and architecture
└── AGENTS.md # Guidelines for AI coding assistants
🚀 Quick Start (Development)
Prerequisites:
- Node.js 20+
- pnpm
- Rust (for Tauri)
tinymistbinary installed in your PATH.
# 1. Install dependencies
pnpm install
# 2. Start the backend (Port 4000)
cd typst-leaf-backend
pnpm dev
# 3. Start the web frontend (Port 3000)
# (In a new terminal)
cd typst-leaf-frontend
pnpm dev
# 4. Start Tauri Desktop App (Optional)
# (In a new terminal)
cd typst-leaf-frontend
pnpm tauri dev
🏗️ Architecture
- Editor: Monaco Editor
- LSP:
tinymist(via WebSocket proxy) - Communication:
ws://localhost:4000/lsp-> Tinymist Language Serverws://localhost:4000/preview-> Tinymist Preview Service