Find a file
2026-02-28 23:52:49 +03:00
.github/workflows Add GitHub Actions workflow for Windows + macOS builds 2026-02-28 20:55:26 +03:00
.vscode Initial commit: Tauri + CanvasKit + React editor scaffold 2026-02-27 15:48:29 +03:00
desktop Fix app identifier to net.dannote.open-pencil, add CLI/headless plan to PLAN.md 2026-02-28 23:51:22 +03:00
docs Sync specs and docs with master: polygon/star tools, resizable panels, code quality 2026-02-28 23:25:57 +03:00
openspec Sync specs and docs with master: polygon/star tools, resizable panels, code quality 2026-02-28 23:25:57 +03:00
public Fix .fig import/export round-trip 2026-02-28 15:12:24 +03:00
src Replace relative imports with @/ alias 2026-02-28 23:08:45 +03:00
tests Live component-instance sync with override support 2026-02-28 19:57:52 +03:00
.gitignore OpenSpec baseline specs, VitePress docs, Windows build support 2026-02-28 17:32:17 +03:00
.oxfmtrc.json Add oxlint, oxfmt, typescript-go 2026-02-27 15:52:55 +03:00
AGENTS.md Add figma-use reference to AGENTS.md 2026-02-28 23:27:36 +03:00
bun.lock OpenSpec baseline specs, VitePress docs, Windows build support 2026-02-28 17:32:17 +03:00
COMPARISON.md Fix text disappearing on window resize 2026-02-28 19:08:16 +03:00
components.d.ts Fix all lint, typecheck, and formatting issues 2026-02-28 22:57:33 +03:00
index.html Migrate React → Vue 3 + VueUse + Reka UI 2026-02-27 21:25:31 +03:00
oxlint.json Fix all lint, typecheck, and formatting issues 2026-02-28 22:57:33 +03:00
package.json Fix PR review: remove .openpencil from docs, kbd tags for shortcuts, trailing newline 2026-02-28 17:32:18 +03:00
PLAN.md Fix app identifier to net.dannote.open-pencil, add CLI/headless plan to PLAN.md 2026-02-28 23:51:22 +03:00
playwright.config.ts Skip stability check: toMatchSnapshot, 2.1s → 1.3s 2026-02-28 07:44:20 +03:00
README.md Merge remote-tracking branch 'origin/master' into add-vitepress-docs 2026-02-28 23:52:49 +03:00
screenshot.png Add screenshot to README 2026-02-28 23:36:55 +03:00
tsconfig.json Replace relative imports with @/ alias 2026-02-28 23:08:45 +03:00
tsconfig.node.json Initial commit: Tauri + CanvasKit + React editor scaffold 2026-02-27 15:48:29 +03:00
vite.config.ts Replace relative imports with @/ alias 2026-02-28 23:08:45 +03:00

OpenPencil

Open-source, AI-native design editor. Figma alternative built from scratch with full .fig file compatibility.

Status: Active development. Not ready for production use.

OpenPencil

Features

  • Figma .fig file import — open native Figma files directly
  • Figma clipboard — copy/paste between OpenPencil and Figma
  • Vector networks — complex boolean shapes and open paths, like Figma
  • Auto-layout — constraint-based layout matching Figma behavior
  • Components & instances — with live sync, overrides, component sets
  • Pen tool — bezier curves with tangent handles
  • Inline text editing — multi-line text with system fonts
  • Undo/redo — all operations are undoable
  • Snap guides — edge and center snapping
  • Color picker — HSV, hue/alpha sliders, hex input, gradients
  • ~5 MB install, works fully offline — no account, no server, no internet required

Tech Stack

Layer Tech
UI Vue 3, VueUse, Reka UI
Styling Tailwind CSS 4
Rendering Skia (CanvasKit WASM)
Layout Yoga WASM
File format Kiwi binary (vendored) + Zstd + ZIP
Color culori
Desktop Tauri v2
Testing Playwright (visual regression), bun:test (unit)
Tooling Vite 7, oxlint, oxfmt, typescript-go

Getting Started

bun install
bun run dev

Scripts

Command Description
bun run dev Dev server at http://localhost:1420
bun run build Production build
bun run check Lint + typecheck
bun run test E2E visual regression
bun run test:update Regenerate screenshot baselines
bun run test:unit Unit tests
bun run tauri dev Desktop app (requires Rust)

Desktop App

Requires Rust, the Tauri CLI, and platform-specific prerequisites (Tauri v2 guide).

bun run tauri dev                      # Dev mode with hot reload
bun run tauri build                    # Production build
bun run tauri build --target universal-apple-darwin  # macOS universal

Cross-compilation to other platforms requires their respective toolchains or CI (e.g. GitHub Actions).

Platform Prerequisites

macOS

Install Xcode Command Line Tools:

xcode-select --install

Windows

  1. Install Rust — make sure the default toolchain is stable-msvc:
    rustup default stable-msvc
    
  2. Install Visual Studio Build Tools with the "Desktop development with C++" workload (MSVC compiler + Windows SDK)
  3. WebView2 is pre-installed on Windows 10 (1803+) and Windows 11. If missing, download from Microsoft

Linux

Install system dependencies (Debian/Ubuntu):

sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
  libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

For other distros, see the Tauri v2 prerequisites.

Project Structure

src/
  components/     Vue SFCs (canvas, panels, toolbar, color picker)
  composables/    Canvas input, keyboard shortcuts, rendering
  stores/         Editor state (Vue reactivity)
  engine/         Scene graph, renderer, layout, clipboard, undo, vector, snap
  kiwi/           Figma file format (Kiwi codec, .fig import)
    kiwi-schema/  Vendored from evanw/kiwi
  types.ts        Shared types
  constants.ts    UI colors, defaults, thresholds
desktop/          Tauri v2 (Rust + config)
tests/
  e2e/            Playwright visual regression
  engine/         Unit tests

License

MIT