A React-based prototype for designing and testing HR workflows.
Users can:
- Drag & drop workflow nodes onto a canvas
- Connect steps visually
- Configure details for each node type
- Validate the flow
- Run a mock simulation to see step-by-step execution
This is front-end only and uses simple mock APIs for automation metadata and simulation.
Canvas & modeling
- Drag workflow node types from the left palette onto the central canvas
- Move nodes, connect them with edges, and rearrange the workflow visually
- Custom renderers for each node type (Start, Task, Approval, Automated, End)
Configuration panels
- Right sidebar shows Node details for the currently selected node
- Forms differ per node type (e.g., assignee for Tasks, approver role for Approvals)
- Start / Task nodes support dynamic key–value fields (metadata & custom fields)
Validation & simulation
- Built-in validation before running a simulation:
- Exactly one Start node
- At least one End node
- Non-End nodes must have at least one outgoing connection
- No cycles (acyclic graph requirement)
- Start node cannot have incoming edges
- Test workflow panel simulates execution step-by-step using a mock API
- Outputs a simple log describing each executed node
- Framework: React 18
- Build tool: Vite
- Language: TypeScript
- Canvas: React Flow
- State management: Zustand
- Node.js 18+
- npm
npm installnpm run devThen open the URL shown in the terminal.
npm run build
npm run preview- Start, Task, Approval, Automated, End
- Each node type has its own configuration form and data fields
Before running a simulation, the workflow is validated:
- Exactly one Start node
- At least one End node
- Start node has no incoming edges
- Every non-End node has at least one outgoing edge
- No cycles (graph must be acyclic)
If validation fails, errors are displayed in the Test workflow panel and the simulation is not run.
The Test workflow panel:
- Runs validation.
- If valid, serializes the graph to a
WorkflowDTO. - Calls a mock
simulateWorkflowfunction (a stand-in forPOST /simulate). - Displays a simple execution log.
src/
main.tsx
App.tsx
index.css
types/
workflow.ts
store/
useWorkflowStore.ts
api/
automationsApi.ts
simulateApi.ts
components/
layout/
AppLayout.tsx
canvas/
WorkflowCanvas.tsx
nodeTypes/
StartNode.tsx
TaskNode.tsx
ApprovalNode.tsx
AutomatedStepNode.tsx
EndNode.tsx
panels/
NodeDetailsPanel.tsx
StartNodeForm.tsx
TaskNodeForm.tsx
ApprovalNodeForm.tsx
AutomatedNodeForm.tsx
EndNodeForm.tsx
SandboxPanel.tsx
common/
KeyValueEditor.tsx
useWorkflowStore (Zustand) holds:
- Nodes, edges, selected node id
- Handlers for React Flow (
onNodesChange,onEdgesChange,onConnect) - Helpers:
addNodeOfType,updateNodeData,validate,serialize
automationsApi.ts– mockGET /automationssimulateApi.ts– mockPOST /simulate
- Import/export workflow JSON
- Undo/redo, better canvas UX
- More node types (branches, parallel steps)
- Real backend integration instead of mocks