Initial scaffold: pnpm workspace monorepo with backend + frontend
- 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
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# typst-leaf 🍂
|
||||
|
||||
A completely self-hostable, high-performance editor for [Typst](https://typst.app/), 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
|
||||
|
||||
```text
|
||||
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)
|
||||
* `tinymist` binary installed in your PATH.
|
||||
|
||||
```bash
|
||||
# 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 Server
|
||||
* `ws://localhost:4000/preview` -> Tinymist Preview Service
|
||||
|
||||
Reference in New Issue
Block a user