A Next.js application for visualizing and customizing workflow process data. This tool allows you to configure workflow stages, routing rules, and approval processes in an intuitive interface.
- Workflow Visualization: View all workflow stages and routing rules in a clean, organized interface
- Stage Management:
- Drag and drop to reorder stages
- Edit stage properties (name, description, SLA)
- Configure available actions (submit, approve, reject, sendback)
- Set notification recipients for each action
- Add new stages to the workflow
- Routing Rules:
- View and edit conditional routing rules
- Configure trigger stages and conditions
- Set target stages for routing actions
- Add new routing rules
- Data Export: Export modified workflows as JSON files
- Multiple Workflows: Switch between different workflow configurations
- Node.js 18.17 or later
- npm or yarn
-
Navigate to the project directory:
cd workflow-customizer -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
The application provides a comprehensive workflow management system with multiple views:
The main page at / displays all available workflows in a professional table layout:
Features:
- Statistics Dashboard: View total workflows, active, draft, and inactive counts
- Search Functionality: Search workflows by name, ID, or description
- Filter Options: Filter by workflow type and status
- Workflow Table: Displays key information for each workflow:
- Workflow name and description
- Type and status (with color-coded badges)
- Number of stages and routing rules
- Last modified date
- Actions:
- Click on a workflow name to view details
- Duplicate workflows with one click
- Delete workflows (with confirmation)
- Create new workflows with the "New Workflow" button
Click on any workflow in the list to access the detailed management interface at /workflow/[id]. This provides a professional interface similar to enterprise workflow management systems:
-
Header Section:
- Workflow title with status badge (Active/Inactive)
- Workflow ID and type information
- Action buttons: Edit, Duplicate, Delete, and Back
-
Navigation Tabs:
- General: Workflow-wide settings
- Stages: Stage configuration (default view)
- Routing: Routing rules management
- Products: Product-specific configurations
-
Stages Tab (Two-Panel Layout):
- Left Panel: List of all workflow stages (draggable to reorder)
- Right Panel: Detailed settings for the selected stage
- General, Notifications, and Assigned Users tabs
- Stage name and description
- SLA configuration
- Available actions (Submit, Approve, Reject, Send Back)
- Hidden fields configuration
You can customize the workflow route by reordering stages using drag and drop:
- Click and hold the numbered circle badge on any stage card
- Drag the stage to a new position in the workflow
- Release to drop the stage in its new position
- The stage numbers will automatically update to reflect the new order
- A visual overlay shows which stage you're dragging
- Click the "Edit" button on any stage card
- Modify the stage properties:
- Name: The stage identifier
- Description: Additional context about the stage
- SLA: Service level agreement time
- SLA Unit: Time unit (hours, days, minutes)
- Configure available actions:
- Toggle each action (submit, approve, reject, sendback)
- Set notification recipients for each action
- Click "Save Changes"
- Click the "Edit" button on any routing rule card
- Modify the rule properties:
- Name: Rule identifier
- Description: Rule purpose
- Trigger Stage: Which stage triggers this rule
- Condition: Field, operator, and value for the condition
- Action: Type and target stage
- Click "Save Changes"
- New Stage: Click "+ Add Stage" button above the stages list
- New Routing Rule: Click "+ Add Rule" button above the routing rules list
- Make your desired changes to the workflow
- Click the "Export JSON" button in the header
- A JSON file will be downloaded with your modifications
workflow-customizer/
├── app/
│ ├── page.tsx # Workflow list page (home)
│ ├── workflow/
│ │ └── [id]/
│ │ └── page.tsx # Dynamic workflow detail page
│ └── layout.tsx # Root layout
├── components/
│ ├── WorkflowTable.tsx # Workflow list table component
│ ├── WorkflowSelector.tsx # Workflow dropdown selector (legacy)
│ ├── StageCard.tsx # Stage display card (legacy)
│ ├── StageEditor.tsx # Stage editing modal (legacy)
│ ├── StageList.tsx # Stage list sidebar (for detail view)
│ ├── StageDetailPanel.tsx # Stage detail panel (for detail view)
│ ├── RoutingRuleCard.tsx # Routing rule display card (legacy)
│ └── RoutingRuleEditor.tsx # Routing rule editing modal (legacy)
├── types/
│ ├── workflow.ts # Workflow data type definitions
│ └── workflow-list.ts # Workflow list item type definitions
├── lib/
│ └── workflow-loader.ts # Workflow data loading utilities
└── public/
└── mockdata/ # Sample workflow JSON files
├── workflow_01.json
├── workflow_02.json
└── workflow_03.json
interface Workflow {
document_reference_pattern: string;
stages: Stage[];
routing_rules: RoutingRule[];
notifications: any[];
notification_templates: any[];
products: any[];
}interface Stage {
name: string;
description: string;
sla: string;
sla_unit: string;
available_actions: AvailableActions;
hide_fields: HideFields;
assigned_users: string[];
is_hod?: boolean;
}interface RoutingRule {
name: string;
description: string;
trigger_stage: string;
condition: {
field: string;
operator: 'eq' | 'lt' | 'gt' | 'lte' | 'gte' | 'ne';
value: string;
};
action: {
type: 'NEXT_STAGE' | 'SKIP_STAGE' | 'NOTIFY';
parameters: {
target_stage?: string;
};
};
}- Next.js 15: React framework with App Router
- TypeScript: Type-safe development
- Tailwind CSS: Utility-first styling
- React Hooks: State and effect management
- @dnd-kit: Modern drag and drop toolkit for React
npm run buildnpm startnpm run lintThis project is created for Carmen Software workflow customization purposes.