Author: Project Documentation Date: November 26, 2023
The n8n Frontend is a modern web application built using React and TypeScript that provides a visual workflow editor for AI and data processing tasks. The application allows users to create, configure, and execute workflows by connecting different types of nodes in a visual graph interface.
- Interactive node-based workflow editor using ReactFlow
- Drag and drop interface for adding new nodes
- Custom edge connections between nodes
- Snap-to-grid functionality for precise node placement
- Collapsible sidebar for node selection
The application supports several specialized node types:
- Prompt Node: Input node for user prompts
- Agent Node: Processing node with customizable options
- LLM Node: Language Model integration node
- Memory Node: State management node
- Vector Database Node: Document storage and retrieval node
- Output Node: Results display node
- Modal dialogs for node configuration
- Draggable and resizable UI components
- Real-time workflow execution
- Run/Stop controls for workflow execution
- Chatbot interface for interaction
- React.js with TypeScript
- Vite as build tool
@xyflow/react
for flow visualizationReactMarkdown
for markdown renderingKaTeX
for mathematical expressions
The main application component manages:
- Workflow state management
- Node and edge handling
- Server communication
- UI state management
A dedicated chat interface that provides:
- Real-time communication
- Message history
- Markdown rendering support
- Expandable/collapsible interface
The frontend integrates with a backend service through RESTful API endpoints:
- Workflow execution endpoint
- File upload for Vector Database
- Real-time status updates
The application is deployed using:
- GitHub Pages for hosting
- Continuous deployment through GitHub Actions
- Vite build system for production optimization
- Adaptive layout
- Responsive modals
- Dynamic sidebar
- Custom scrollbars
- Drag and drop functionality
- Real-time feedback
- Loading states
- Error handling
Potential improvements for future versions:
- Workflow templates
- Node grouping
- Undo/redo functionality
- Workflow export/import
- Additional node types
- Enhanced error handling
- Performance optimizations