Skip to main content

Frontend Architecture

The apptor flow frontend is an Angular 18+ application built entirely with standalone components. It includes a visual workflow designer, an admin dashboard, AI-powered workflow creation, real-time execution monitoring, and the A2UI dynamic UI system.


Technology Stack​

ConcernTechnology
FrameworkAngular 18+
LanguageTypeScript
Diagram libraryGoJS
State managementRxJS observables (service-based)
UI iconsreact-icons (documentation site) / Angular Material (app)
HTTPAngular HttpClient
Real-timeSSE (EventSource), WebSocket
Node configassets/node-configurations.json

Application Structure​

src/app/
├── core/
│ ├── services/ ← Shared API services, auth, notifications
│ └── guards/ ← Route guards (authGuard, adminGuard, superAdminGuard)
├── features/
│ ├── auth/ ← Login, forgot password, reset password, OAuth callbacks
│ ├── dashboard/ ← Flows list, FlowsService
│ ├── workflow-designer/ ← GoJS designer, properties panel, toolbars, builders
│ ├── admin/ ← Admin dashboard, users, API keys, analytics
│ ├── public-workflow/ ← Public form execution, chat interface
│ ├── vector-store/ ← Knowledge base, RAG collections
│ └── ai-workflow-creator/ ← AI chat for workflow generation
└── shared/
└── components/
└── a2ui/ ← A2UI renderer and 24 component types

Routing​

Public Routes (no auth required)​

PathComponentDescription
/loginLoginComponentLogin page
/forgot-passwordForgotPasswordComponentPassword reset request
/reset-passwordResetPasswordComponentPassword reset form
/auth/callbackAuthCallbackComponentOIDC OAuth callback
/oauth-callbackOAuthCallbackComponentIntegration OAuth callback
/drive-oauth-callbackDriveOAuthCallbackComponentGoogle Drive OAuth
/w/:urlSlugPublicFormComponentExecute a published workflow
/public/:urlSlugPublicFormComponentExecute a published workflow (alt URL)

Authenticated App Routes​

PathComponentDescription
/flowsDashboardComponentAll workflows list (default home)
/designer/:processIdWorkflowDesignerComponentOpen a specific workflow in the designer
/designerWorkflowDesignerComponentOpen designer with no workflow
/process-instancesProcessInstancesComponentExecution history (all workflows)
/process-instances/:processIdProcessInstancesComponentExecution history (specific workflow)
/process-instance/:instanceId/raw-dataRawDataViewComponentRaw execution log data
/connectionsIntegrationsComponentIntegration/connection management
/secretsSecretsManagementComponentOrganization secrets
/knowledge-baseVectorStoreComponentRAG knowledge base collections
/knowledge-base/:collectionIdCollectionDetailComponentIndividual collection
/form-builder/:publishedWorkflowIdFormBuilderComponentForm builder for published workflows
/organizationOrganizationComponentOrganization settings

Admin Routes (requires adminGuard)​

PathDescription
/adminAdmin dashboard
/admin/usersUser management
/admin/api-keysAPI key management
/admin/secretsSecrets management
/admin/settingsOrganization settings
/admin/integrationsIntegration management
/admin/idpsIdentity provider management
/admin/api-specsOpenAPI spec management
/admin/process-analyticsProcess execution analytics
/admin/ai-analyticsAI usage analytics
/admin/dead-letter-queueFailed message queue
/admin/organizationsSuper admin: all organizations
/admin/verticalsSuper admin: vertical integrations
/admin/organizations/:orgId/overviewOrg context: overview
/admin/organizations/:orgId/usersOrg context: users
/admin/organizations/:orgId/api-keysOrg context: API keys

Key Components​

Workflow Designer​

The designer is the core feature. It is composed of:

WorkflowDesignerComponent (container — app-workflow-designer)
├── SidebarPanelComponent ← Left: flows list, tabs
├── DesignerComponent ← Center: GoJS diagram canvas
│ └── (GoJS Diagram Library)
├── PropertiesPanelComponent ← Right: node property editor
├── DesignerToolbarComponent ← Top: save, publish, execute, layout toggle
├── ActionBrowserComponent ← Modal: node palette to add new nodes
├── ExecutionConsoleComponent ← Bottom: real-time execution logs (SSE)
├── TabBarComponent ← Multi-tab support (multiple open workflows)
├── VersionHistoryPanelComponent ← Slide-out: version history and publish
└── PublishConfirmationModalComponent ← Modal: publish confirmation

DesignerComponent (GoJS Integration)​

The DesignerComponent wraps GoJS and handles:

  • Node templates — custom GoJS templates per node type (icon, label, status indicator)
  • Connection types — visually distinct line styles per connection type (sequenceFlow, trueFlow, falseFlow, errorFlow, timeoutFlow, toolConnection)
  • Layout — left-to-right (LR) or top-to-bottom (TB), switchable from toolbar
  • Execution highlighting — nodes flash/highlight as they execute (fed from SSE log stream)
  • Events emitted:
    • Node selected → PropertiesPanel opens
    • Node double-click → PropertiesPanel focused
    • Connection drawn → condition config opens if applicable
    • Property changed → diagram updates, hasUnsavedChanges set to true
  • Config: src/app/features/workflow-designer/config/gojs-config.ts

PropertiesPanelComponent​

The PropertiesPanelComponent is a dynamic form driven by the node definition from node-configurations.json. For each selected node it renders:

  1. The node's type-specific properties as form controls
  2. Conditional property visibility (properties that only show when another property has a specific value — controlled by visibleWhen rules in the JSON config)
  3. Common properties: timeout, retry, loop configuration
  4. For connections: connection type selector + JUEL condition expression editor
  5. Flow settings (when no node selected): workflow name, description, layout direction, global variables

Special property editors (custom components):

Property TypeComponentUsed For
documentBuilderDocumentBuilderComponentMongoDB document construction
multiDocumentBuilderMultiDocumentBuilderComponentMultiple MongoDB documents
multiQueryEditorMultiQueryEditorComponentSQL multi-statement editor
variableMappingsVariableMappingsComponentSet Variable / output mappings
pipelineBuilderPipelineBuilderComponentMongoDB aggregation pipeline
fieldSelectorFieldSelectorComponentField selection from schema
conditionalConfigConditionalConfigComponentConditional expression builder
integrationSelectIntegrationSelectComponentConnection/integration picker
connectionSelectConnectionSelectComponentConnection picker (typed)
collectionSelectCollectionSelectComponentKnowledge base collection picker
domainActionSelectDomainActionSelectorComponentDomain action picker
processDropdownProcessDropdownComponentWorkflow picker (for Call Process)
codeCodeEditorComponentScript editor (JS/Python)

Key Services​

FlowsService​

Central service for workflow CRUD and state management.

API calls:

  • GET /api/flows → load all workflows
  • GET /api/flows/:flowId → load specific workflow definition
  • POST /api/flows → create workflow
  • PUT /api/flows/:flowId → save workflow
  • DELETE /api/flows/:flowId → delete workflow

Observables:

  • flows$ — list of all workflows
  • currentFlow$ — currently open workflow
  • hasUnsavedChanges$ — dirty state flag
  • isSaving$ — save in progress

NodeConfigurationService​

Loads and caches assets/node-configurations.json. Provides:

  • getNodeDefinition(nodeType) — get the full definition for a node type
  • getNodeProperties(nodeType) — get all properties for a node type
  • getCommonProperties() — timeout, retry, loop available on all nodes

WorkflowStateService​

Tracks per-tab editing state:

  • Which process is currently being edited
  • Draft auto-save
  • Multi-tab synchronization via TabManagerService

PublicWorkflowSSEService​

Manages the SSE connection for real-time execution log streaming. Connects to:

GET /process/instance/{processInstanceId}/logs

Returns Publisher<Event<ExecutionLogEntry>> and forwards log entries to the execution console.


A2UI System​

A2UI (AI-to-UI) is the system where an AI Task node generates interactive UI components that are rendered live in the chat interface.

How it works​

24 A2UI Component Types​

Layout

ComponentProps
A2UIRowchildren, gap, align, justify, wrap, padding
A2UIColumnchildren, gap, align, justify, padding, layout
A2UICardchild, title, subtitle, elevation, padding
A2UITabstabs[], activeTab
A2UIModalchildren, title, open, closeAction, size
A2UIDividerorientation, thickness, color

Display

ComponentProps
A2UITexttext, usageHint (h1–h5/caption/body), color, align, weight
A2UIImageurl, alt, usageHint, fit, width, height, borderRadius
A2UIIconname, size (xs/sm/md/lg/xl), color
A2UIBadgetext, variant (primary/secondary/success/error/warning/info), size
A2UIProgressBarvalue, max, showLabel, color, height

Interactive

ComponentProps
A2UIButtonchild, action {name, context}, variant, size, disabled, loading, icon
A2UITextFieldtext, label, type (shortText/number/date/longText), validationRegexp, required
A2UITextAreavalue, placeholder, label, rows, disabled, required, maxLength, resize
A2UISelectvalue, options[], placeholder, label, disabled, multiple
A2UIMultipleChoiceselections, options[], maxAllowedSelections, label
A2UICheckboxvalue, label, disabled, indeterminate
A2UIRadiovalue, options[], label, orientation (horizontal/vertical)
A2UISlidervalue, min, max, step, label, marks[]
A2UIDateTimeInputvalue, type (date/time/datetime), label, min, max
A2UIFileUploadaction, accept, multiple, maxSize, label, dragDrop

Data

ComponentProps
A2UIListitems, template, emptyText, keyField, loadMore
A2UITabledata, columns[], sortable, selectable, pagination, emptyText
A2UIDataCarddata, children

Button actions trigger workflow continuation via the A2UIActionController (/a2ui/actions). The action name and context data are posted back to the backend, which resumes the workflow with the user's input.