Thanks for your interest in contributing! This guide will help you get started.
# Clone the repository
git clone https://github.com/Wintersta7e/mz-interaction-builder.git
cd mz-interaction-builder
# Install dependencies (use --no-bin-links on WSL)
npm install --no-bin-links
# Start development server with HMR
npm run devsrc/
├── main/ # Electron main process
│ └── ipc/ # File, dialog, project IPC handlers
├── preload/ # contextBridge (window.api)
└── renderer/src/ # React application
├── components/ # Canvas, panels, toolbar, context menu
├── edges/ # Custom edge component
├── nodes/ # BaseNode + 5 node types
├── hooks/ # Custom React hooks
├── stores/ # Zustand state management
├── lib/ # Export pipeline, graph traversal, search, utilities
├── styles/ # CSS variables and global styles
└── types/ # TypeScript interfaces
All checks must pass before submitting a PR:
npm run typecheck # TypeScript (node + web configs)
npm run lint # ESLint
npm test # Vitest unit tests
npm run build # Full production buildCI runs these automatically on every pull request.
- Fork the repository
- Create a feature branch from
main(git checkout -b feature/my-feature) - Make your changes
- Ensure all quality checks pass
- Submit a pull request against
main
Use concise, descriptive commit messages:
feat: add node duplication shortcutfix: edge not rendering when zoomed outperf: memoize node componentsrefactor: extract search logic into hooktest: add graph traversal edge casesdocs: update keyboard shortcuts table
- TypeScript strict mode — no
anycasts - Functional React components with hooks
- Zustand for state management (targeted selectors, no full-store subscriptions)
- Tailwind CSS for styling (use CSS variables for theme colors)
- Add to
InteractionNodeTypeunion intypes/index.ts - Create data interface extending
BaseNodeData - Create component in
nodes/with Handle positioning - Register in
nodes/index.tsnodeTypes object - Add to
NodePalette.tsxdrag items - Add default data in
Canvas.tsxgetDefaultNodeData() - Add property editor section in
PropertiesPanel.tsx - Add export logic in
lib/export/index.ts - Add tests for the new node type
Use the issue templates for bug reports and feature requests.