172 Commits
Author SHA1 Message Date
Sanjib DevnathandGitHub f1e1f4cbab 🔧 fix(ci): use GitHub App bot for release and auto-pass Docker check (#7)
The release workflow pushes version bump commits directly to main, but
branch protection rules block the default GITHUB_TOKEN from bypassing
required status checks and PR requirements. Using a dedicated GitHub
App (sanjibdevnathlabs-release-bot) generates installation tokens that
are permitted through the ruleset bypass list, and keeps the bot
identity on release commits instead of a personal account.

The Docker Build workflow previously used a paths filter, causing it to
not trigger at all for non-Docker PRs — leaving the required
github/docker-build-check status permanently pending. Now the workflow
always triggers but checks for Docker-related file changes first,
skipping builds when unnecessary while still reporting the status check
as passed.
2026-03-13 14:29:36 +05:30
63209f9d5a feat: add test suite, CI/CD pipeline, setup wizard, and upstream feature ports (#6)
Establish comprehensive quality infrastructure for a project that previously
had zero tests, enabling confident refactoring and community contributions
with automated guardrails. Port upstream enhancements for font normalization,
image element support, and arrow binding preservation.

🏗️ Testing infrastructure:
- Unit tests for SQLite persistence layer and element validation helpers
- Integration tests for REST API, WebSocket broadcast, and arrow binding
- E2E tests with Playwright for canvas rendering and real-time sync
- Vitest + Playwright configuration with proper isolation

👷 CI/CD pipeline:
- Auto-versioning from conventional commits on push to main
- Auto-publish to NPM and Docker Hub on GitHub release
- Matrix testing across Node 18/20/22 with pinned dependencies
- Docker health check with diagnostic logging on failure
- Preserve rollup status checks for branch protection gates

📦 Developer experience:
- Interactive setup wizard for first-time configuration
- Canvas clear confirmation and scene description tools
- Frontend helpers extracted for testability

🔧 Upstream feature ports:
- Font family normalization (string names to numeric IDs)
- Image element support with file management API
- Arrow binding preservation through server round-trips
- Vite config fix for font subsetting worker chunk names
- Idempotent database initialization for standalone Docker mode

🐛 Docker fixes:
- Set EXCALIDRAW_DB_PATH in both Dockerfiles to writable /app/data/
- Make initDb() idempotent and closeDb() reset-safe for test isolation

🎯 Provides the safety net needed for rapid iteration — every PR is
validated across 120 test cases before merge, and releases are fully
automated from commit to published package.

Co-authored-by: sanjibdevnathlabs <devnath.sanjib@gmail.com>
2026-03-13 12:08:07 +05:30
sanjibdevnathlabs 4c50472ee4 Startup fixes 2026-03-13 08:53:20 +05:30
79e959ae45 🐛 fix(ci): grant contents:write permission for release asset upload (#5)
The npm-publish workflow needs write access to upload tarballs to
GitHub releases. Read-only caused "Resource not accessible by integration".

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 10:53:53 +05:30
a16f7821fb Chore/reset version to 1.0.0 (#4)
* 🔧 chore: reset version to 1.0.0 for independent NPM package

This is a new scoped package (@sanjibdevnath/mcp-excalidraw-local),
so versioning starts fresh at 1.0.0 rather than continuing upstream's
numbering.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore: trigger PR

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
v1.0.0
2026-02-19 10:49:36 +05:30
a1553891c4 📝 docs: replace ASCII architecture diagram with Excalidraw-generated PNG (#3)
Dogfood our own tool — the architecture diagram is now drawn in
Excalidraw and exported as PNG, replacing the ASCII art block.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 10:41:32 +05:30
7143b5e41e feat: add SQLite persistence, multi-tenancy, auto-sync, and CI/Docker improvements (#1)
Replace in-memory storage with SQLite (WAL mode), add workspace-based
multi-tenancy with auto-detection via server.listRoots(), and embed the
canvas server into the MCP process for single-process operation.

🔧 Core enhancements:
- SQLite persistence with versioning, element history, and search
- Multi-tenancy: isolated canvases per workspace (SHA-256 tenant IDs)
- Embedded canvas lifecycle (single node process starts MCP + canvas)
- Auto-sync with 3s debounce and manual override toggle
- Configurable canvas port via CANVAS_PORT env var
- 6 new MCP tools (search, history, tenants, projects)
- Workspace switcher UI with dropdown search
- Sync normalization to prevent bound-text breakage on reload

🐳 Docker & CI improvements:
- BuildKit cache mounts for faster npm installs across builds
- Skip native compilation in frontend-builder stage (--ignore-scripts)
- Build only linux/amd64 on PRs, multi-arch on push to main
- Docker Hub registry with proper build tools for better-sqlite3
- CI and Docker status check gates (github/ci-status-check, github/docker-build-check)

📦 Package & publishing:
- Renamed to @sanjibdevnath/mcp-excalidraw-local (v3.0.0)
- Updated npm-publish workflow for scoped package
- Updated bin entry, keywords, and files list

📝 Documentation:
- README with UI screenshots, architecture diagram, and full feature docs
- Updated agent skill with 32-tool cheatsheet and workflow playbooks
- Fork attribution and upstream comparison table

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-19 10:17:29 +05:30
yctimlin 9883dce220 add gif demo 2026-02-14 13:23:52 +08:00
yctimlinandGitHub db0c0a3dea docs: update arrow examples in SKILL.md (#44) 2026-02-13 15:51:22 +08:00
yctimlinandGitHub 913f9b89b7 Updates to Excalidraw MCP server and documentation (#43) 2026-02-13 00:20:01 +08:00
yctimlinandGitHub 4a17c47b54 Feat/canvas toolkit v2 (#41)
* feat: enhance Excalidraw MCP with advanced canvas toolkit features

- Rename skill to `excalidraw-skill` with expanded playbook and cheatsheet.
- Add new MCP tools for iterative refinement: `describe_scene` and `get_canvas_screenshot`.
- Implement layout tools (`align_elements`, `distribute_elements`) and `duplicate_elements`.
- Add file I/O support for `.excalidraw` JSON and image export (PNG/SVG).
- Introduce named snapshots for canvas state management.
- Add server-side element CRUD and WebSocket handlers for real-time sync.
- Normalize `points` format for arrows and lines.

* docs: update README with v2.0 features and official MCP comparison

* feat: implement arrow binding and edge-to-edge routing

* fix: enhance security with path sanitization and improve export error handling

* feat: add viewport control, design guide, and excalidraw.com URL export

* feat: enhance excalidraw.com export with proper scene formatting and labels
2026-02-12 18:09:56 +08:00
yctimlin 1359720f66 feat: Add Zod and OpenCode AI SDK dependencies and agent skill files. 2026-01-26 00:37:06 +08:00
d73fa53cde Feat/excalidraw skill (#38)
* feat(skill): add excalidraw-mcp skill with export/import helpers

* fix(skill): correct url trailing-slash normalization in scripts

* feat(skill): add create/update/delete helpers and document CRUD test

* docs: restructure README and document skill usage

* docs: make README skill guidance tool-agnostic and SEO-friendly

* docs: add Claude Code skill installation instructions

* feat: Introduce skill creation tools and an agent-browser skill with templates and reference documentation.

* fix(frontend): keep server element ids for WS updates

Ensure WS delete/update events match scene element IDs by disabling ID regeneration when converting server payloads.

* feat: Add Zod library and OpenCode AI SDK dependencies, and introduce new Excalidraw skill scripts for element deletion and health checks.

* chore: Install project dependencies including Zod and OpenCode AI SDK, and add an Excalidraw reference cheatsheet.

---------

Co-authored-by: YC Lin <yclin@YCdeMacBook-Air.local>
2026-01-26 00:17:18 +08:00
YC Linandyctimlin 45af2758cf fix(frontend): point index.html at main.tsx 2026-01-25 01:09:31 +08:00
Scott Friedmanandyctimlin fe4bf8e787 Fix: Batch endpoint now respects element IDs from MCP server
The batch creation endpoint was always generating new IDs, ignoring IDs
passed from the MCP server. This caused sync issues where the MCP server
would think elements were created with specific IDs, but the canvas had
different IDs.

This fix makes the batch endpoint behave like the single element endpoint:
it now respects passed IDs (for MCP sync) or generates new ones if not provided.

Fixes the 'MCP tool registration issues' mentioned in the roadmap.
2026-01-25 00:29:37 +08:00
yctimlin 381bc98bff refactor: improve type safety in Mermaid integration
- Replace all `any` types with proper Excalidraw types
- Add proper type imports from @excalidraw/excalidraw
- Improve MermaidConversionResult interface with ExcalidrawElement[] and BinaryFiles
- Add mermaidDiagram and config fields to WebSocketMessage interface
- Remove unused ElementBinding interface
- Remove all `as any` type casts throughout App.tsx
- Fix Vite security vulnerability (1 of 6 moderate vulns)

Changes:
- frontend/src/App.tsx: Restored proper TypeScript types, removed 12+ `as any` casts
- frontend/src/utils/mermaidConverter.ts: Added proper return types
- package-lock.json: Updated vite to fix security issue

Remaining security issues:
- 5 moderate vulnerabilities from @excalidraw/mermaid-to-excalidraw dependencies
- These are upstream issues in dompurify, nanoid, and mermaid packages
- No fixes available without major version upgrades
- Risk is acceptable for this use case (diagram rendering)
2025-11-08 00:34:25 +08:00
yctimlinandGitHub 27a7c65b55 Merge pull request #31 from frNNcs/feature/mermaid-integration
Add Mermaid Diagram Integration to MCP Excalidraw
2025-11-07 23:02:26 +08:00
francisco b8e2de76f1 feat: implement WebSocket-based Mermaid conversion with auto-sync
- Add WebSocket message handler for mermaid_convert type
- Make handleWebSocketMessage async to support conversion
- Add automatic backend sync after diagram generation
- Integrate convertMermaidToExcalidraw utility
- Remove test button and handleMermaidTest function
- Fix: Add missing Excalidraw CSS import for proper UI rendering
- Enhance server endpoint with WebSocket broadcast support
- Add mermaid_convert to WebSocketMessageType union
2025-11-01 13:58:23 -03:00
francisco dce247f4d6 fix: resolve TypeScript compilation errors in App.tsx and complete Mermaid test function 2025-11-01 13:58:22 -03:00
francisco 98b7c6ec69 docs: add Mermaid diagram support documentation to README 2025-11-01 13:58:22 -03:00
francisco f8c003db71 feat: add create_from_mermaid MCP tool and frontend integration with test button 2025-11-01 13:58:22 -03:00
francisco c1cecf282c feat: add POST /api/elements/from-mermaid endpoint for Mermaid conversion 2025-11-01 13:58:22 -03:00
francisco daa4431098 feat: add Mermaid conversion types to types.ts 2025-11-01 13:58:22 -03:00
francisco f8c0c85491 feat: add Mermaid to Excalidraw converter utility in frontend 2025-11-01 13:58:22 -03:00
francisco 95e4478d1f feat: install @excalidraw/mermaid-to-excalidraw and mermaid dependencies 2025-11-01 13:58:22 -03:00
yctimlinandGitHub cfb2ada4f4 Merge pull request #30 from yctimlin/docker-update
Docker update
2025-11-01 17:21:12 +08:00
yctimlin 7bb804945b Update Vite configuration to set project root and adjust build output directory 2025-11-01 08:51:35 +00:00
yctimlin 2c510c500d Refactor GitHub Actions workflow to always push Docker images and improve tag handling for pull requests 2025-11-01 07:06:01 +00:00
yctimlin 5fdfed92b6 update ci pipeline 2025-10-31 17:40:52 +00:00
yctimlin 6b0aa01ab0 update pipeline 2025-10-31 17:35:31 +00:00
yctimlin 5d6b8d0033 Add comprehensive GitHub Actions CI/CD workflows and update documentation 2025-10-31 17:00:48 +00:00
yctimlin 4cfe5ce1fc update readme 2025-10-31 16:47:43 +00:00
yctimlin 07f7b20be0 update readme 2025-10-31 16:21:19 +00:00
yctimlin e72dc1e3e0 update docker files 2025-10-31 16:07:51 +00:00
yctimlinandGitHub 5d28ec4256 Merge pull request #28 from kweinmeister/main
feat: add configuration option for log file path
2025-10-20 00:57:44 +08:00
yctimlin 8f8c395858 Fix group_elements to append instead of replace groups 2025-10-18 22:59:31 +08:00
yctimlin cb70a5cc6d Fix group_elements and ungroup_elements operations 2025-10-18 22:23:40 +08:00
Karl Weinmeister b5297cb947 feat: add configuration option for log file path 2025-10-18 07:31:20 -05:00
Gianluca Venturini 4215fffb78 Log metadata in log file 2025-10-12 22:30:28 -07:00
Gianluca Venturini 7411414e42 Fix group_elements and ungroup_elements operations 2025-10-12 22:30:08 -07:00
yctimlinandGitHub 0ac96964fc Merge pull request #25 from ctchen222/docs/readme-figure
docs: set figure aligned
2025-09-22 01:16:22 +08:00
CHENG-TING CHEN 71e94307da fix: set figure aligned 2025-09-19 15:16:21 +08:00
yctimlinandGitHub 2fb5d4686d Merge pull request #21 from yctimlin/dev
Dev
2025-08-20 23:45:47 +08:00
yctimlin 5043a67385 Refactor project structure and enhance TypeScript support
- Updated package.json to point to compiled TypeScript files in the dist directory.
- Improved TypeScript configuration with stricter type checks and removed JavaScript support.
- Migrated frontend entry point to TypeScript and added a new App component with enhanced functionality.
- Implemented a new server structure with TypeScript, including WebSocket support and improved element management.
- Updated README to reflect changes in architecture and usage instructions.
- Added comprehensive type definitions for Excalidraw elements and server responses.
2025-08-20 15:31:42 +00:00
yctimlin fcd3cc077a add docs 2025-08-20 15:04:16 +00:00
yctimlin a07a53c22a update logging messages 2025-08-07 16:11:22 +00:00
songmd b1f2aacfad fix: 优化元素处理逻辑,移除本地存储,直接通过HTTP服务器进行元素的创建、更新和删除操作。更新了前端与后端的同步机制,增强了错误处理和日志记录,确保操作的成功反馈。 2025-08-07 20:34:51 +08:00
songmd 60c8af9ca8 Fix MCP delete/update methods and add frontend sync functionality
- Fix MCP server update_element method parameter parsing issue
- Add comprehensive delete operation debugging and validation
- Implement frontend sync button with real-time status feedback
- Add elements sync API endpoint (/api/elements/sync) for manual synchronization
- Enhance WebSocket message handling with proper element validation
- Add binding validation and cleanup for Excalidraw elements
- Improve error handling and logging throughout the sync process
- Add sync status tracking and user feedback in the UI
2025-08-06 19:55:25 +08:00
yctimlinandGitHub 1831a621ac Merge pull request #13 from PhantomPayne/patch-1
Support windows
2025-07-16 14:23:19 +08:00
Thomas PayneandGitHub 03a381274a Support windows
This fix made it work on windows for me.

based on https://stackoverflow.com/questions/34842738/if-name-main-equivalent-in-javascript-es6-modules/63193714#63193714
2025-07-15 23:33:39 -04:00