A React-based canvas visualizer for the wrkflw workflow engine. Provides real-time visualization of workflow execution with interactive controls.
npm install # or bun install
Start the development server:
npm run dev # or bun run dev
The app will be available at http://localhost:3000.
npm run build # or bun run build
Preview the production build:
npm run preview # or bun run preview
First, start the wrkflw backend with the API server:
# From the root directory deno run --allow-all examples/api-server-example.ts
This will:
cd frontend npm install npm run dev
Open http://localhost:3000 in your browser.
The frontend communicates with the backend API:
GET /api/workflows - List all workflows
GET /api/workflows/:id - Get workflow details
GET /api/workflows/:id/runs - List runs for a workflow
POST /api/workflows/:id/runs - Create a new run
GET /api/runs/:runId - Get run details
Modify the CSS files to customize the appearance:
App.css: Main layout and sidebar stylesWorkflowVisualizer.css: Canvas and header stylesStepNode.css: Step node appearance and animationsAdjust the graph layout in WorkflowVisualizer.tsx:
const nodeWidth = 220
const nodeHeight = 100
const horizontalGap = 100
const verticalGap = 80
Customize status colors in StepNode.tsx:
const getStatusColor = () => {
switch (status) {
case 'success': return '#4CAF50'
case 'failed': return '#F44336'
case 'running': return '#2196F3'
default: return '#999'
}
}
Vite provides instant HMR. Changes to React components will reflect immediately without losing state.
Open React DevTools to inspect component state and props. The browser console shows API requests and responses.
The dev server proxies /api/* requests to http://localhost:8000. This avoids CORS issues during development.
If workflows don't load:
vite.config.tsIf a run appears stuck:
If TypeScript errors occur:
npm run build -- --force
Or check for missing dependencies:
npm install
When adding new features:
types.tsSame license as the parent wrkflw project.