How slbytes15/workflow-orchestration-engine works
This is a multi-tenant workflow and Saga orchestration engine. Teams author and validate DAG workflows in the React studio, persist and manage their lifecycle through the API, then execute and inspect runs in dashboards with live updates. Backend stages include tenant authentication, graph validation and workflow persistence, execution with compensation and durable idempotency, and event-triggered dispatch; MongoDB stores tenant, workflow, and execution state. The README documents major capabilities not fully visible in sampled code; those links are cited to it, and unsampled implementation details are not inferred beyond that documentation.
Main entry points: execution.service.ts Execution service · executionApi.ts Execution API client · App.tsx React application · workflow.routes.ts Workflow routes
Components 26
Workflow Studio
- React application
frontend/src/App.tsx - Workflow catalog
frontend/src/pages/WorkflowsPage.tsx - Graph editor
frontend/src/components/workflow/nodes/NodePreview.tsx - Graph validation
frontend/src/graphValidation.ts - Workflow state mapping
frontend/src/workflowState.ts - Workflow API client
frontend/src/api/workflowApi.ts
Tenant API
- Tenant authentication
backend/src/middleware/tenantAuth.middleware.ts - Tenant resolver
backend/src/services/tenantResolver.ts - Workflow routes
backend/src/routes/workflow.routes.ts - Workflow service
backend/src/services/workflow.service.ts - Workflow validators
backend/src/validators/workflow-graph.validator.ts
Orchestration
- Execution routes
backend/src/routes/execution.routes.ts - Execution service
backend/src/services/execution.service.ts - Saga runtime
backend/src/services/execution.runtime.ts - Durable idempotency
backend/src/services/executionIdempotency.ts - Change stream watcher
backend/src/services/changeStreamWatcher.service.ts
Monitoring
- Execution API client
frontend/src/api/executionApi.ts - Execution dashboard
frontend/src/pages/ExecutionsPage.tsx - Analytics dashboard
frontend/src/pages/AnalyticsPage.tsx - WebSocket event hub
backend/src/services/executionWebSocket.ts - WebSocket ticket service
backend/src/services/executionTicket.service.ts
Persistence
- Workflow records
backend/src/models/workflow.model.ts - Execution records
backend/src/models/WorkflowExecution.ts - Tenant and API key records
backend/src/models/tenant.model.ts
Other components
- Workflow team
- MongoDB
Connections 32
- Workflow team → React application: authors workflows
- React application → Workflow catalog: opens catalog
frontend/src/App.tsx - React application → Execution dashboard: opens dashboard
frontend/src/App.tsx - Workflow catalog → Graph editor: edits graph
frontend/src/pages/WorkflowsPage.tsx - Graph editor → Graph validation: validates graph
frontend/src/components/workflow/nodes/NodePreview.tsx - Workflow catalog → Workflow API client: requests workflows
frontend/src/pages/WorkflowsPage.tsx - React application → Workflow API client: manages lifecycle
frontend/src/App.tsx - Workflow API client → Workflow routes: sends REST requests
- Workflow routes → Tenant authentication: authenticates tenant
backend/src/routes/workflow.routes.ts - Tenant authentication → Tenant resolver: resolves API key
backend/src/middleware/tenantAuth.middleware.ts - Tenant resolver → Tenant and API key records: reads tenant keys
backend/src/services/tenantResolver.ts - Workflow routes → Workflow validators: validates input
backend/src/routes/workflow.routes.ts - Workflow routes → Workflow service: delegates workflow actions
backend/src/routes/workflow.routes.ts - Workflow service → Workflow records: persists workflows
backend/src/services/workflow.service.ts - Workflow state mapping → Workflow API client: maps API data
frontend/src/workflowState.ts - Execution dashboard → Execution API client: requests execution data
frontend/src/pages/ExecutionsPage.tsx - Execution API client → Execution routes: sends REST requests
- Execution routes → Tenant authentication: authenticates tenant
backend/src/routes/execution.routes.ts - Execution routes → Durable idempotency: reserves run key
backend/src/routes/execution.routes.ts - Execution routes → Execution service: delegates execution
backend/src/routes/execution.routes.ts - Execution service → Workflow records: loads workflow
backend/src/services/execution.service.ts - Execution service → Saga runtime: executes graph
backend/src/services/execution.service.ts - Execution service → Execution records: stores run results
backend/src/services/execution.service.ts - Execution service → WebSocket event hub: publishes updates
backend/src/services/execution.service.ts - Change stream watcher → Workflow records: matches active workflows
backend/src/services/changeStreamWatcher.service.ts - Change stream watcher → Execution service: dispatches matching events
backend/src/services/changeStreamWatcher.service.ts - MongoDB → Change stream watcher: streams inserts
- Execution API client → WebSocket ticket service: requests socket ticket
- WebSocket ticket service → Tenant authentication: requires tenant auth
backend/src/routes/executionWsTicket.routes.ts - Execution API client → WebSocket event hub: opens authenticated socket
- WebSocket event hub → Execution dashboard: streams run status
- Analytics dashboard → Execution API client: loads run metrics