Process App
Features & Capabilities
Process App - Features & Capabilities Report
Template Version: 1.0.0 Generated: 2026-01-22 Package:
@epicdm/flowstate-app-processApp ID:process
Table of Contents
- Overview
- App Identity
- Feature Categories
- Capabilities
- Data Models
- User Workflows
- Integration Points
- Commands & Keybindings
- Architecture Summary
- Quality & Compliance
Overview
Purpose
The Process App is the visual process design and workflow documentation application for FlowState. It provides interactive flowchart visualization with ReactFlow, hierarchical subprocess navigation, full process editing with command-based undo/redo, configurable approval workflows, a visual JSON Schema editor for entity templates, and comprehensive execution statistics with analytics dashboards.
Target Users
| User Type | Description | Primary Use Cases |
|---|---|---|
| Process Designers | Create and maintain process definitions | Design flowcharts, configure steps, define connections |
| Workflow Managers | Oversee process execution and approvals | Configure approvals, monitor statistics, track executions |
| Business Analysts | Document organizational processes | Create process documentation, define templates |
| Developers | Integrate technical components | Configure API calls, scripts, agent tasks |
| Stakeholders | Review and approve processes | Review definitions, participate in approval workflows |
Value Proposition
- Visual Process Design: Interactive flowchart editor with drag-and-drop step palette
- Hierarchical Navigation: Subprocess drill-down with breadcrumb trail
- Command-Based Editing: Full undo/redo support with auto-save
- Approval Workflows: Multi-approver gates with configurable thresholds
- Schema Editor: Visual JSON Schema design for entity creation templates
- Execution Analytics: Comprehensive statistics with charts and metrics
- Integration Ready: API calls, scripts, and AI agent task support
App Identity
| Property | Value |
|---|---|
| ID | process |
| Display Name | Process |
| Package Name | @epicdm/flowstate-app-process |
| Version | 1.0.0 |
| Category | technical |
| Icon | Workflow |
| Color | #6366f1 |
| Base Path | /process |
| Permissions | database, notifications |
Entry Points
| Entry Point | Path | Description |
|---|---|---|
| Main Export | src/index.ts | Primary package export |
| Standalone | src/standalone.tsx | Standalone app entry |
| App Component | src/App.tsx | Main React component with routing |
| Plugin | src/plugin.ts | FlowState plugin registration |
| Process Viewer | src/ProcessViewerApp.tsx | Main process viewer orchestrator |
Feature Categories
Category 1: Process Viewer
Core process visualization and navigation
Feature: Process List View
| Property | Details |
|---|---|
| ID | process-list |
| Status | Implemented |
| Priority | High |
Description: Browseable list of processes with search and filter capabilities by status and category.
User Story: As a process designer, I want to browse and search processes so that I can quickly find the process I need to view or edit.
Acceptance Criteria:
- [x] Display processes in a scrollable list
- [x] Search by process title, name, or description
- [x] Filter by process status (draft, active, archived, all)
- [x] Filter by process category
- [x] Highlight selected process
- [x] Show process metadata (version, status badge)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ProcessListView | src/components/ProcessListView.tsx | Process list with search/filter |
| useProcessList | src/hooks/useProcessList.ts | Process query hook |
Feature: Flowchart Visualization
| Property | Details |
|---|---|
| ID | flowchart-view |
| Status | Implemented |
| Priority | High |
Description: Interactive flowchart rendering using ReactFlow with custom node types for each process step type.
User Story: As a user, I want to see processes as visual flowcharts so that I can understand the process flow at a glance.
Acceptance Criteria:
- [x] Render process steps as nodes with type-specific styling
- [x] Display connections between steps as edges
- [x] Support pan and zoom on the canvas
- [x] Highlight selected step
- [x] Auto-layout using Dagre algorithm
- [x] Custom node types for all step categories
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ProcessFlowchartView | src/components/ProcessFlowchartView.tsx | Main flowchart component |
| StartEndNode | src/components/nodes/StartEndNode.tsx | Start/End step nodes |
| ActionNode | src/components/nodes/ActionNode.tsx | Action step nodes |
| DecisionNode | src/components/nodes/DecisionNode.tsx | Decision step nodes |
| GatewayNode | src/components/nodes/GatewayNode.tsx | Gateway step nodes |
| SubprocessNode | src/components/nodes/SubprocessNode.tsx | Subprocess step nodes |
| TaskNode | src/components/nodes/TaskNode.tsx | Human task step nodes |
| DelayNode | src/components/nodes/DelayNode.tsx | Delay step nodes |
| ApprovalNode | src/components/nodes/ApprovalNode.tsx | Approval step nodes |
| autoLayout | src/utils/autoLayout.ts | Dagre auto-layout |
| flowTransform | src/utils/flowTransform.ts | Process to ReactFlow transform |
Feature: Subprocess Navigation
| Property | Details |
|---|---|
| ID | subprocess-navigation |
| Status | Implemented |
| Priority | High |
Description: Navigate into subprocess steps to view nested process definitions with breadcrumb trail for hierarchy tracking.
User Story: As a user, I want to navigate into subprocesses so that I can view nested process details without losing my place.
Acceptance Criteria:
- [x] Double-click subprocess steps to drill down
- [x] Display breadcrumb navigation showing hierarchy
- [x] Navigate to any level via breadcrumb clicks
- [x] "Home" breadcrumb to return to process list
- [x] Preserve selection state during navigation
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ProcessBreadcrumb | src/components/ProcessBreadcrumb.tsx | Breadcrumb navigation |
| useProcessNavigation | src/hooks/useProcessNavigation.ts | Navigation stack management |
Feature: Step Detail Panel
| Property | Details |
|---|---|
| ID | step-detail |
| Status | Implemented |
| Priority | High |
Description: Expandable panel showing detailed information about the selected step including type-specific configuration.
User Story: As a user, I want to see step details so that I can understand what each step does.
Acceptance Criteria:
- [x] Display step title and description
- [x] Show step type with icon
- [x] Display type-specific configuration
- [x] Show subprocess link for subprocess steps
- [x] Collapsible panel when no step selected
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ProcessStepDetail | src/components/ProcessStepDetail.tsx | Step detail panel |
Category 2: Process Editor
Visual process editing with undo/redo support
Feature: Step Palette
| Property | Details |
|---|---|
| ID | step-palette |
| Status | Implemented |
| Priority | High |
Description: Drag-and-drop palette of step types organized by category (flow, actions, integration).
User Story: As a process designer, I want to drag step types onto the canvas so that I can quickly build process flows.
Acceptance Criteria:
- [x] Group step types by category
- [x] Display step type with icon and label
- [x] Drag initiation from palette items
- [x] Visual feedback during drag
- [x] Category headers with icons
Implementation:
| Component | Path | Purpose |
|---|---|---|
| StepPalette | src/components/editor/StepPalette.tsx | Draggable step palette |
| STEP_TYPES | src/types/editor.ts | Step type definitions |
Step Types Available:
| Category | Types |
|---|---|
| Flow Control | start, end, decision, parallel-gateway, join-gateway, subprocess, delay |
| Actions | action, human-task, approval, notification |
| Integration | script, api-call, agent-task |
Feature: Editor Toolbar
| Property | Details |
|---|---|
| ID | editor-toolbar |
| Status | Implemented |
| Priority | High |
Description: Toolbar with undo/redo, delete, save status, and publish actions.
User Story: As a process designer, I want editing controls so that I can undo mistakes and publish my changes.
Acceptance Criteria:
- [x] Undo/Redo buttons with disabled state
- [x] Delete selected button
- [x] Dirty/saved indicator
- [x] Saving spinner during auto-save
- [x] Publish button with validation
Implementation:
| Component | Path | Purpose |
|---|---|---|
| EditorToolbar | src/components/editor/EditorToolbar.tsx | Editor toolbar |
| useCommandStack | src/hooks/useCommandStack.ts | Undo/redo stack |
| useAutoSave | src/hooks/useAutoSave.ts | Auto-save logic |
Feature: Step Property Panel
| Property | Details |
|---|---|
| ID | step-property-panel |
| Status | Implemented |
| Priority | High |
Description: Editable property panel for configuring step details with type-specific fields.
User Story: As a process designer, I want to configure step properties so that I can customize step behavior.
Acceptance Criteria:
- [x] Common fields (title, description)
- [x] Type-specific fields based on step type
- [x] Process selector for subprocess steps
- [x] Condition builder for decision steps
- [x] Live updates with auto-save
Implementation:
| Component | Path | Purpose |
|---|---|---|
| StepPropertyPanel | src/components/editor/StepPropertyPanel.tsx | Property editor |
| STEP_FORM_CONFIG | src/types/editor.ts | Form field configuration |
Feature: Command-Based Undo/Redo
| Property | Details |
|---|---|
| ID | command-undo-redo |
| Status | Implemented |
| Priority | High |
Description: Full command pattern implementation for reversible editing operations.
User Story: As a process designer, I want to undo and redo changes so that I can recover from mistakes.
Acceptance Criteria:
- [x] Create/Delete step commands
- [x] Update step property commands
- [x] Move step position commands
- [x] Create/Delete edge commands
- [x] Stack-based undo/redo
- [x] Clear stacks on save
Implementation:
| Component | Path | Purpose |
|---|---|---|
| useCommandStack | src/hooks/useCommandStack.ts | Command stack management |
| useProcessEditor | src/hooks/useProcessEditor.ts | Editor operations |
| Command types | src/types/editor.ts | Command interfaces |
| commands utility | src/utils/commands.ts | Command factory functions |
Feature: Publish Workflow
| Property | Details |
|---|---|
| ID | publish-workflow |
| Status | Implemented |
| Priority | High |
Description: Validation and confirmation dialog for publishing processes.
User Story: As a process designer, I want to publish my process so that it becomes available for execution.
Acceptance Criteria:
- [x] Validation for start/end steps
- [x] Confirmation dialog with process info
- [x] Step and connection count display
- [x] Publish button disabled when invalid
- [x] Status update on successful publish
Implementation:
| Component | Path | Purpose |
|---|---|---|
| PublishDialog | src/components/editor/PublishDialog.tsx | Publish confirmation |
Category 3: Approval Workflows
Configurable multi-approver approval gates
Feature: Approval Step Configuration
| Property | Details |
|---|---|
| ID | approval-config |
| Status | Implemented |
| Priority | High |
Description: Configure approval steps with approvers, threshold, blocking behavior, and instructions.
User Story: As a workflow manager, I want to configure approval steps so that processes require proper authorization.
Acceptance Criteria:
- [x] Add/remove approvers by ID
- [x] Set required approval threshold
- [x] Configure blocking vs non-blocking
- [x] Add approval instructions
- [x] Link documents for review
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ApprovalConfigSection | src/components/approval/ApprovalConfigSection.tsx | Config UI |
| ApprovalStepConfig | src/types/approval.ts | Config type |
Feature: Approval Actions
| Property | Details |
|---|---|
| ID | approval-actions |
| Status | Implemented |
| Priority | High |
Description: Take approval actions (approve, reject, request revision, comment) with required comments.
User Story: As an approver, I want to take approval actions so that I can authorize or request changes to work.
Acceptance Criteria:
- [x] Approve action with optional comment
- [x] Reject action with required comment
- [x] Request revision with required comment
- [x] Add comment without decision
- [x] Action button state management
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ApprovalActionsSection | src/components/approval/ApprovalActionsSection.tsx | Action buttons |
| ApprovalAction | src/types/approval.ts | Action union type |
Feature: Approval Status & History
| Property | Details |
|---|---|
| ID | approval-status |
| Status | Implemented |
| Priority | Medium |
Description: Display approval status badges and timeline of approval events.
User Story: As a user, I want to see approval status and history so that I can track the approval process.
Acceptance Criteria:
- [x] Status badge (pending, approved, rejected, needs-revision)
- [x] Progress indicator for partial approvals
- [x] Event timeline with actor and timestamp
- [x] Comment display in timeline
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ApprovalStatusBadge | src/components/approval/ApprovalStatusBadge.tsx | Status badge |
| ApprovalStatusSection | src/components/approval/ApprovalStatusSection.tsx | Status display |
| ApprovalHistorySection | src/components/approval/ApprovalHistorySection.tsx | Event timeline |
| ApprovalStepPanel | src/components/approval/ApprovalStepPanel.tsx | Combined panel |
Feature: Approval Hooks
| Property | Details |
|---|---|
| ID | approval-hooks |
| Status | Implemented |
| Priority | High |
Description: React hooks for approval state management and configuration.
User Story: As a developer, I want approval hooks so that I can integrate approval functionality into components.
Acceptance Criteria:
- [x] useApproval hook for approval state
- [x] useApprovalConfig hook for configuration
- [x] Approval service for business logic
Implementation:
| Component | Path | Purpose |
|---|---|---|
| useApproval | src/hooks/useApproval.ts | Approval state hook |
| useApprovalConfig | src/hooks/useApprovalConfig.ts | Config hook |
| approvalService | src/services/approvalService.ts | Business logic |
Category 4: Schema Editor
Visual JSON Schema editing for entity templates
Feature: Visual Schema Editor
| Property | Details |
|---|---|
| ID | schema-editor |
| Status | Implemented |
| Priority | Medium |
Description: Visual editor for creating and modifying JSON Schemas with field management.
User Story: As a process designer, I want to visually edit schemas so that I can define data structures without writing JSON.
Acceptance Criteria:
- [x] Add fields with type selection
- [x] Configure field constraints (min/max, pattern, enum)
- [x] Mark fields as required
- [x] Reorder fields via drag-and-drop
- [x] Nested object support
- [x] Array field configuration
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SchemaEditor | src/components/schema-editor/SchemaEditor.tsx | Main editor |
| FieldList | src/components/schema-editor/FieldList.tsx | Field list |
| FieldListItem | src/components/schema-editor/FieldListItem.tsx | Single field |
| FieldEditor | src/components/schema-editor/FieldEditor.tsx | Field config |
| useSchemaEditor | src/hooks/useSchemaEditor.ts | Schema state |
Feature: Entity Template Editor
| Property | Details |
|---|---|
| ID | entity-template |
| Status | Implemented |
| Priority | Medium |
Description: Configure entity creation templates that use base collection schemas with field overrides.
User Story: As a process designer, I want to configure entity templates so that process steps can create tasks, milestones, or projects.
Acceptance Criteria:
- [x] Select target collection (tasks, milestones, projects)
- [x] Override field inclusion
- [x] Set default values
- [x] Variable interpolation support
Implementation:
| Component | Path | Purpose |
|---|---|---|
| EntityTemplateEditor | src/components/schema-editor/EntityTemplateEditor.tsx | Template config |
| EntityTemplate | src/types/schema.ts | Template type |
Feature: Schema Validation & Preview
| Property | Details |
|---|---|
| ID | schema-validation |
| Status | Implemented |
| Priority | Medium |
Description: Real-time schema validation and JSON preview with form preview.
User Story: As a process designer, I want to validate my schema so that I can catch errors before publishing.
Acceptance Criteria:
- [x] Live validation with error display
- [x] JSON Schema preview panel
- [x] Generated form preview
- [x] Validation error highlighting
Implementation:
| Component | Path | Purpose |
|---|---|---|
| SchemaValidator | src/components/schema-editor/SchemaValidator.tsx | Validation UI |
| SchemaPreview | src/components/schema-editor/SchemaPreview.tsx | JSON preview |
| FormPreview | src/components/schema-editor/FormPreview.tsx | Form preview |
| useSchemaValidation | src/hooks/useSchemaValidation.ts | Validation hook |
| schemaValidation | src/utils/schemaValidation.ts | Validation logic |
| schemaTransform | src/utils/schemaTransform.ts | Schema conversion |
Category 5: Execution Statistics
Analytics dashboard for process execution metrics
Feature: Statistics Dashboard
| Property | Details |
|---|---|
| ID | stats-dashboard |
| Status | Implemented |
| Priority | Medium |
Description: Main statistics page with time range selector and metric cards.
User Story: As a workflow manager, I want to see execution statistics so that I can monitor process performance.
Acceptance Criteria:
- [x] Time range toggle (7 days / 30 days)
- [x] Total executions metric
- [x] Success rate with color coding
- [x] Average duration metric
- [x] Currently running count (live)
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ProcessStatsPage | src/pages/ProcessStatsPage.tsx | Stats page |
| StatsHeader | src/components/stats/StatsHeader.tsx | Time range toggle |
| MetricCard | src/components/stats/MetricCard.tsx | Metric display |
| useProcessStats | src/hooks/useProcessStats.ts | Stats data hook |
Feature: Execution Charts
| Property | Details |
|---|---|
| ID | stats-charts |
| Status | Implemented |
| Priority | Medium |
Description: Visual charts for execution data including time series, breakdown, and comparison views.
User Story: As a workflow manager, I want visual charts so that I can identify trends and patterns.
Acceptance Criteria:
- [x] Executions over time stacked area chart
- [x] Status breakdown pie chart
- [x] Process comparison bar chart
- [x] Execution timeline/Gantt chart
- [x] Loading states for all charts
Implementation:
| Component | Path | Purpose |
|---|---|---|
| ExecutionsOverTimeChart | src/components/stats/ExecutionsOverTimeChart.tsx | Time series |
| StatusBreakdownChart | src/components/stats/StatusBreakdownChart.tsx | Pie chart |
| ProcessComparisonChart | src/components/stats/ProcessComparisonChart.tsx | Bar chart |
| ExecutionTimelineChart | src/components/stats/ExecutionTimelineChart.tsx | Timeline |
| statsAggregation | src/utils/statsAggregation.ts | Data aggregation |
Feature: Linked Entities Panel
| Property | Details |
|---|---|
| ID | linked-entities |
| Status | Implemented |
| Priority | Low |
Description: Display projects, milestones, and tasks created by process executions.
User Story: As a workflow manager, I want to see linked entities so that I can track what processes have created.
Acceptance Criteria:
- [x] List entities by type
- [x] Show entity name and creation date
- [x] Show originating process
- [x] Navigate to entity on click
Implementation:
| Component | Path | Purpose |
|---|---|---|
| LinkedEntitiesPanel | src/components/stats/LinkedEntitiesPanel.tsx | Entity list |
| LinkedEntity | src/types/stats.ts | Entity type |
Capabilities
Core Capabilities
| Capability | Description | Implementation |
|---|---|---|
| Visual Process Design | Interactive flowchart editing | ReactFlow with custom nodes |
| Subprocess Navigation | Hierarchical process traversal | Navigation stack with breadcrumbs |
| Command-Based Editing | Reversible undo/redo operations | Command pattern implementation |
| Approval Workflows | Multi-approver authorization | Configurable approval steps |
| Schema Editing | Visual JSON Schema design | Field-based schema builder |
| Execution Analytics | Process performance metrics | Statistics dashboard with charts |
Technical Capabilities
| Capability | Status | Notes |
|---|---|---|
| CRUD Operations | Yes | Full CRUD on processes and steps |
| Real-time Updates | Yes | RxDB reactive subscriptions |
| Offline Support | Yes | RxDB local-first architecture |
| Auto-save | Yes | Debounced auto-save with dirty tracking |
| Keyboard Shortcuts | Yes | Standard shortcuts (Ctrl+Z, Ctrl+Y, etc.) |
| Drag-and-Drop | Yes | Step palette drag to canvas |
| Auto-layout | Yes | Dagre algorithm for automatic positioning |
Integration Capabilities
| Integration | Type | Description |
|---|---|---|
| Projects App | internal | Linked entities from executions |
| RxDB Server | internal | Replication for data sync |
| FlowState Framework | internal | Auth, org context, layout |
| ReactFlow | external | Flowchart rendering library |
| Recharts | external | Statistics chart library |
| Dagre | external | Graph auto-layout algorithm |
Data Models
Collections Used
| Collection | Description | Operations | Primary Hook |
|---|---|---|---|
processes | Process definitions | CRUD, Query | useProcess, useProcessList |
processsteps | Process step records | CRUD, Query | useProcess, useProcessEditor |
Entity Relationships
Process
|
+-- ProcessSteps (hasMany)
|
+-- Outgoing Connections (embedded in nextStepIds)
|
+-- Subprocess Reference (optional)
|
+-- Approval Configuration (optional)
Key Data Flows
User Action --> Component --> Hook --> RxDB Collection --> UI Update
|
+--> Command Stack (for undo/redo)
|
+--> Auto-save (debounced)
|
+--> Replication --> Server
User Workflows
Workflow 1: View a Process
Navigate to and explore a process flowchart
Trigger: Navigate to Processes page
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Browse process list | ProcessListView | Processes displayed |
| 2 | Search/filter as needed | ProcessListView | List filtered |
| 3 | Click process | ProcessListView | Process selected |
| 4 | View flowchart | ProcessFlowchartView | Flowchart rendered |
| 5 | Click step | ProcessFlowchartView | Step highlighted |
| 6 | View step details | ProcessStepDetail | Details shown |
Success Outcome: User understands process flow and step details Failure Handling: Error state shown if process not found
Workflow 2: Edit a Process
Create or modify process steps
Trigger: Toggle edit mode on a process
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Click Edit Mode toggle | ProcessViewerApp | Editor enabled |
| 2 | Drag step from palette | StepPalette | Step created on canvas |
| 3 | Configure step properties | StepPropertyPanel | Properties saved |
| 4 | Connect steps | ProcessFlowchartView | Edge created |
| 5 | Wait for auto-save | EditorToolbar | Changes saved |
| 6 | Click Publish | PublishDialog | Validation shown |
| 7 | Confirm publish | PublishDialog | Process published |
Success Outcome: Process saved and published Failure Handling: Undo available for mistakes, validation prevents invalid publish
Workflow 3: Configure Approval Step
Set up a multi-approver approval gate
Trigger: Select an approval step in edit mode
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Click approval step | ProcessFlowchartView | Step selected |
| 2 | Open approval config | ApprovalConfigSection | Config shown |
| 3 | Add approvers | ApprovalConfigSection | Approvers added |
| 4 | Set threshold | ApprovalConfigSection | Threshold saved |
| 5 | Add instructions | ApprovalConfigSection | Instructions saved |
| 6 | Link documents | ApprovalConfigSection | Documents linked |
Success Outcome: Approval step configured for workflow Failure Handling: Validation ensures required fields
Workflow 4: Review Execution Statistics
Monitor process performance
Trigger: Navigate to Statistics page
Steps:
| Step | Action | Component | Outcome |
|---|---|---|---|
| 1 | Open Stats page | ProcessStatsPage | Dashboard shown |
| 2 | Select time range | StatsHeader | Data filtered |
| 3 | Review metrics | MetricCard | KPIs visible |
| 4 | Analyze charts | Chart components | Trends identified |
| 5 | Review linked entities | LinkedEntitiesPanel | Created items shown |
Success Outcome: User understands process performance Failure Handling: Loading states while data fetches
State Transitions
Process Status States
┌─────────┐ ┌─────────┐ ┌──────────┐
│ Draft │──▶│ Active │──▶│ Archived │
└─────────┘ └─────────┘ └──────────┘
│ │
▼ ▼
(Publish) (Archive)
| From State | To State | Trigger | Side Effects |
|---|---|---|---|
| Draft | Active | Publish | Version increment |
| Active | Archived | Archive | Executions blocked |
| Draft | Draft | Save | Auto-save triggered |
Approval Status States
┌─────────┐ ┌──────────┐
│ Pending │──▶│ Approved │
└─────────┘ └──────────┘
│
├───▶ ┌──────────┐
│ │ Rejected │
│ └──────────┘
│
└───▶ ┌────────────────┐
│ Needs Revision │
└────────────────┘
│
▼
┌─────────┐
│ Pending │
└─────────┘
Integration Points
Internal Integrations
| Integration | Package | Purpose |
|---|---|---|
| FlowState Framework | @epicdm/flowstate-app-framework | App container, auth, layout |
| Collections | @epicdm/flowstate-collections | ProcessModel, ProcessStepModel schemas |
| RxDB React | @epicdm/flowstate-rxdb-react | Reactive subscriptions |
External Integrations
| Integration | Type | Configuration |
|---|---|---|
| ReactFlow | Library | Flowchart rendering |
| Recharts | Library | Statistics charts |
| Dagre | Library | Auto-layout algorithm |
| Lucide React | Library | Icon components |
MCP Integration
| Tool | Purpose | Example Usage |
|---|---|---|
collection-query | Query processes | {"collection": "processes", "selector": {"status": "active"}} |
collection-create | Create process | {"collection": "processes", "data": {...}} |
collection-update | Update process | {"collection": "processes", "id": "...", "data": {"status": "archived"}} |
Commands & Keybindings
Keyboard Shortcuts
| Command | Windows/Linux | macOS | Context |
|---|---|---|---|
| Undo | Ctrl+Z | Cmd+Z | Editor mode |
| Redo | Ctrl+Y | Cmd+Shift+Z | Editor mode |
| Delete Selected | Delete / Backspace | Delete / Backspace | Editor mode |
| Deselect All | Escape | Escape | Editor mode |
| Force Save | Ctrl+S | Cmd+S | Editor mode |
Implementation
| Component | Path | Purpose |
|---|---|---|
| useKeyboardShortcuts | src/hooks/useKeyboardShortcuts.ts | Shortcut handling |
| KEYBOARD_SHORTCUTS | src/types/editor.ts | Shortcut definitions |
Architecture Summary
Directory Structure
src/
├── components/ # UI components
│ ├── approval/ # Approval workflow components (7 files)
│ ├── editor/ # Editor components (6 files)
│ ├── nodes/ # ReactFlow node components (10 files)
│ ├── schema-editor/ # Schema editor components (10 files)
│ ├── stats/ # Statistics components (7 files)
│ ├── Header.tsx # App header
│ ├── Sidebar.tsx # App sidebar
│ ├── ProcessBreadcrumb.tsx
│ ├── ProcessFlowchartView.tsx
│ ├── ProcessHeader.tsx
│ ├── ProcessListView.tsx
│ ├── ProcessStatusBadge.tsx
│ └── ProcessStepDetail.tsx
├── hooks/ # Custom React hooks (14 hooks)
├── pages/ # Page components (5 files)
├── services/ # Business logic services (1 service)
├── types/ # TypeScript definitions (5 files)
├── utils/ # Utility functions (9 files)
├── App.tsx # Main app component
├── ProcessViewerApp.tsx # Process viewer orchestrator
├── plugin.ts # FlowState plugin
├── index.ts # Package exports
└── standalone.tsx # Standalone entry
Key Architectural Patterns
| Pattern | Usage | Example |
|---|---|---|
| State Management | RxDB + local state | Collections for data, useState for UI |
| Command Pattern | Undo/redo | Create/Delete/Update commands |
| Data Flow | Reactive subscriptions | RxDB observables through hooks |
| Component Architecture | Feature-based organization | Components grouped by domain |
| Routing | React Router v6 | Nested routes for processes |
Hooks Overview
| Hook | Purpose | Returns |
|---|---|---|
useProcessList | Query processes with filters | { processes, isLoading, error } |
useProcess | Fetch single process with steps | { process, steps, isLoading, error } |
useProcessNavigation | Subprocess navigation stack | { navigationStack, push, goToLevel, reset } |
useProcessEditor | Editor operations | { createStep, updateStep, deleteStep, publish, ... } |
useCommandStack | Undo/redo stack | { canUndo, canRedo, execute, undo, redo } |
useAutoSave | Debounced auto-save | { triggerSave, forceSave, isSaving } |
useKeyboardShortcuts | Keyboard shortcut handling | Event listener registration |
useApproval | Approval state | { status, decisions, comments, ... } |
useApprovalConfig | Approval configuration | { config, updateConfig } |
useSchemaEditor | Schema editing state | { fields, addField, updateField, schema, ... } |
useSchemaValidation | Schema validation | { isValid, errors, validate } |
useFlowTransform | Process to ReactFlow transform | { nodes, edges } |
useProcessStats | Statistics data | { metrics, executionsByDay, ... } |
Quality & Compliance
Test Coverage
| Test Type | Location | Coverage Target |
|---|---|---|
| Unit Tests | src/__tests__/ | >= 80% |
| Hook Tests | Included in unit tests | >= 80% |
| Utils Tests | Included in unit tests | >= 80% |
| E2E Tests | playwright/ | Critical paths |
Accessibility
| Requirement | Status | Notes |
|---|---|---|
| WCAG 2.1 AA | In Progress | Components use semantic HTML |
| Keyboard Navigation | Yes | Full keyboard support in editor |
| Screen Reader Support | Partial | ARIA labels on interactive elements |
| Focus Management | Yes | Proper focus handling in dialogs |
Security Considerations
| Consideration | Implementation |
|---|---|
| Input Validation | Schema validation for all inputs |
| Authorization | Org/workspace isolation via IDs |
| Data Protection | RxDB encryption support |
FlowState Alignment
Spec-Driven Development
This app follows the FlowState Standard for spec-driven development:
- Requirements:
.flowstate/specs/{{feature-name}}/requirements.md - Design:
.flowstate/specs/{{feature-name}}/design.md - Wireframes:
.flowstate/specs/{{feature-name}}/wireframes.html - Tasks:
.flowstate/specs/{{feature-name}}/tasks.md
Quality Gates
| Gate | Requirement | Status |
|---|---|---|
| Test Coverage | >= 80% statements | In Progress |
| TypeScript Strict | No any without justification | Pass |
| Accessibility | WCAG 2.1 AA | In Progress |
| Documentation | 100% TSDoc on public APIs | In Progress |
| Security | No critical vulnerabilities | Pass |
Appendix
Related Documentation
| Document | Location | Purpose |
|---|---|---|
| FLOWSTATE.md | .flowstate/docs/FLOWSTATE.md | Development workflow |
| TDD.md | .flowstate/steering/TDD.md | Testing standards |
| QUALITY.md | .flowstate/steering/QUALITY.md | Code quality |
Version History
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0.0 | 2026-01-22 | Claude | Initial documentation |