A visual programming blogging application built with Node-RED that allows users to post messages, filter by sender, and translate content to multiple languages in real-time.
Built in November 2021. This Node-RED application demonstrates visual flow-based programming to create a functional blogging system with translation capabilities using minimal custom code.
- Real-Time Messaging: Post and view messages instantly with automatic UI updates.
- Dynamic Filtering: Filter messages by sender name with real-time feedback.
- Multi-Language Translation: Real-time translation to Hebrew, Spanish, and French.
- Visual Dashboard: Fully interactive UI built with Node-RED Dashboard components.
- Visual Programming: Logic implemented primarily through visual flows for transparency.
- Custom Node Integration: Custom
lower-casenode implementation for text processing. - API Integration: Integration with Google Translate API for real-time localization.
- Clean Flow Design: Organized, named, and documented visual logic paths.
-
Low-Code Environment: Rapid development and prototyping with Node-RED.
-
Live Editing: Real-time deployment and testing of flow changes.
-
Interactive UI: Built-in dashboard system for immediate user feedback.
-
📝 Post text messages with content and sender information
-
🔍 Filter messages by sender name with real-time updates
-
🌐 Translate messages to multiple languages (Hebrew, Spanish, French)
-
💾 In-memory message storage
-
🎨 Interactive dashboard UI
-
⚡ Real-time message updates
-
🔄 Dynamic filtering and translation
- Visual Logic First: Prioritize built-in nodes over custom function code.
- Loose Coupling: UI, logic, and data processing are separated by message flows.
- Stateless Processing: Nodes primarily process data without external side effects.
- Event-Driven: All actions are triggered by user input or incoming API events.
graph TB
subgraph "User Interface"
A[Dashboard UI<br/>localhost:1880/ui]
B[Text Input: Content]
C[Text Input: Sender]
D[Dropdown: Language]
E[Filter: Sender Name]
end
subgraph "Node-RED Flow Engine"
F[HTTP POST<br/>Message Input]
G[Store Message<br/>Memory Context]
H[Filter Logic<br/>By Sender]
I[Translation API<br/>Google Translate]
J[Message List<br/>Display Logic]
end
subgraph "Data Layer"
K[In-Memory Storage<br/>Context Object]
end
subgraph "External Services"
L[Google Translate API<br/>translate.googleapis.com]
end
B --> F
C --> F
F --> G
G --> K
K --> H
E --> H
H --> J
D --> I
I --> L
L --> I
I --> J
J --> A
style A fill:#e1f5ff
style K fill:#fff4e1
style L fill:#ffe1e1
style F fill:#e8f5e9
style I fill:#f3e5f5
sequenceDiagram
participant User
participant Dashboard
participant NodeRED
participant Memory
participant TranslateAPI
User->>Dashboard: Enter message & sender
Dashboard->>NodeRED: POST message
NodeRED->>Memory: Store message
Memory-->>NodeRED: Confirm storage
NodeRED-->>Dashboard: Return all messages
Dashboard-->>User: Display messages
User->>Dashboard: Select language
Dashboard->>NodeRED: Request translation
NodeRED->>TranslateAPI: Translate text
TranslateAPI-->>NodeRED: Return translated text
NodeRED-->>Dashboard: Display translated messages
Dashboard-->>User: Show translated content
User->>Dashboard: Filter by sender
Dashboard->>NodeRED: Apply filter
NodeRED->>Memory: Query messages
Memory-->>NodeRED: Return filtered messages
NodeRED-->>Dashboard: Display filtered results
Dashboard-->>User: Show filtered messages
- Node.js (v14 or higher)
- npm or pnpm
- Clone the repository:
git clone https://github.com/orassayag/node-red-blog.git
cd node-red-blog- Install dependencies:
npm installStart Node-RED:
npm startRun Tests:
npm test- Start Node-RED:
npm start- Access the applications:
- Node-RED Editor: http://localhost:1880
- Dashboard UI: http://localhost:1880/ui
The application runs with default Node-RED settings. To customize:
- Edit Node-RED settings in
~/.node-red/settings.js - Modify flow configurations in the Node-RED editor
- Deploy changes using the "Deploy" button
- Navigate to the dashboard UI
- Enter message content in the "Content" field
- Enter sender name in the "Sender" field
- Click submit to post the message
- View the message in the list of all messages
- Use the "Sender" filter dropdown or input
- Select or type a sender name
- Messages update in real-time to show only matching sender
- Clear filter to view all messages
- Select target language from the "Language" dropdown:
- Hebrew (he)
- Spanish (es)
- French (fr)
- All messages are translated automatically
- Change language selection to see messages in different languages
node-red-blog/
├── lower-case.js # Custom lower-case node implementation
├── package.json # Project dependencies and node definitions
├── package-lock.json # Locked dependency versions
├── misc/ # Documentation and resources
│ └── Node-Red App.docx.pdf # Original assignment details
├── .github/ # GitHub configuration (rulesets)
├── .vscode/ # VS Code settings
├── CONTRIBUTING.md # Contribution guidelines
├── INSTRUCTIONS.md # Detailed setup and usage instructions
├── LICENSE # MIT License
└── README.md # This file
A custom Node-RED node that converts text to lowercase. Defined in package.json:
"node-red": {
"nodes": {
"lower-case": "lower-case.js"
}
}Messages are stored in Node-RED's context object:
- Scope: Flow or global context
- Persistence: Memory only (lost on restart)
- Structure: Array of objects with
contentandsenderfields
Uses Google Translate API (unofficial endpoint):
https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl={lang}&dt=t&q={text}
Note: This is an unofficial API and may have limitations. For production use, consider Google Cloud Translation API.
Built with node-red-dashboard:
- Text input fields
- Dropdown selectors
- Template nodes for custom HTML
- Real-time data binding
- Observer Pattern: The dashboard UI automatically observes and reacts to changes in the message context.
- Strategy Pattern: Different translation languages are handled by a unified translation strategy within the API nodes.
- Singleton Pattern: The flow and global context objects act as singletons for storing message data across nodes.
- Minimal Function Nodes: Uses built-in nodes wherever possible
- Visual Flow Design: Logic represented visually for easy understanding
- Node Naming: All nodes have descriptive names
- Flow Organization: Organized into logical sections
- Error Handling: Proper error handling in critical paths
To export your flow:
- Select all nodes (Ctrl+A or Cmd+A)
- Menu → Export → Clipboard
- Save as
flows.json
To import a flow:
- Menu → Import → Clipboard
- Paste the JSON
- Click "Import"
- Deploy the flow
- Messages are not persisted (stored in memory only)
- Translation requires internet connection
- Unofficial Google Translate API may have rate limits
- Single server instance (no clustering support)
Contributions to this project are released to the public under the project's open source license.
Everyone is welcome to contribute. Contributing doesn't just mean submitting pull requests—there are many different ways to get involved, including answering questions and reporting issues.
Please feel free to contact me with any question, comment, pull-request, issue, or any other thing you have in mind.
See CONTRIBUTING.md for detailed contribution guidelines.
For questions, issues, or contributions:
- GitHub Issues: https://github.com/orassayag/node-red-blog/issues
- Email: orassayag@gmail.com
- Or Assayag - Initial work - orassayag
- Or Assayag orassayag@gmail.com
- GitHub: https://github.com/orassayag
- StackOverflow: https://stackoverflow.com/users/4442606/or-assayag?tab=profile
- LinkedIn: https://linkedin.com/in/orassayag
This application has an MIT license - see the LICENSE file for details.
- Built for educational and research purposes
- Respects robots.txt and implements rate limiting
- Uses user-agent rotation to avoid detection
- Implements polite crawling practices