# PromptScale Blueprint // Mermaid.ai & Eraser.io Clone
> Visual Flowchart & Markdown Canvas with isolated Web Worker rendering, syntax error recovery, and High-DPI PNG/SVG export.

---

## ⚡ Quickstart: Run Locally in Under 60 Seconds

### 1. Prerequisites
- **Node.js:** `v18.x` or higher
- **Package Manager:** `pnpm` (recommended) or `npm`

### 2. Clone & Install
```bash
git clone https://github.com/your-username/mermaid-canvas-promptscale.git
cd mermaid-canvas-promptscale

pnpm install
```

### 3. Launch Development Server
```bash
pnpm run dev
```
Open [http://localhost:3000](http://localhost:3000) in your browser. Start typing Mermaid diagram syntax or pick a template from the header dropdown.

---

## 🧪 Testing & Regression Gates

```bash
# Run unit tests on AST parser and canvas transform matrix
pnpm test

# Run worker communication integration test
pnpm run test:worker
```

---

## 🤖 Feeding This Blueprint to Your AI Coding Agent

1. Open **Cursor / Claude Code / Windsurf**.
2. Paste the contents of `mermaid-flowchart-canvas.plan.md`.
3. Kickoff prompt:
   > *"I have loaded the Mermaid Canvas technical blueprint. Do not write any code yet. Verify the Web Worker architecture and matrix transform equations, ask up to 3 clarifying questions, and then proceed with Phase 1."*
4. Run each phase sequentially to prevent monolithic file creep.
