Backend Breakdown
The backend is a Node.js server using Express. It manages flow execution, node orchestration, configuration, and data persistence.
Tech Stack
Node.js
Express
TypeScript
PostgreSQL or SQLite for storage
Optional Redis for caching/memory
Folder Structure (Example)
bashCopyEdit/backend
├── api/ # Flow and node execution endpoints
├── nodes/ # Built-in and custom node logic
├── services/ # LLM providers, memory, tools
├── flows/ # Flow definitions and validation
├── database/ # DB connection + models
└── utils/ # Error handling, logging, helpers
Core Backend Responsibilities
Executing flows (resolving nodes in order)
Managing inputs, outputs, and runtime memory
Routing API requests from the frontend
Validating flow structure and payloads
Handling user data (if enabled)
Storing flows and execution history in the database
Execution Flow
When a flow is triggered:
Input is received from chat or API
Flow graph is fetched and validated
Each node is executed in sequence, respecting dependencies
Outputs are returned, stored, or passed to downstream systems
Last updated