Quick Start
Prerequisites
Before getting started, ensure you have the following installed:
- Node.js: Version 18.17 or later.
- eKuiper Instance: A running instance of LF Edge eKuiper (typically reachable via port
9081). - OpenRouter API Key (Optional): Required if you wish to use the AI Assistant features.
Installation
-
Clone the repository:
git clone https://github.com/ankur-paan/ekuiper-manager.git cd ekuiper-manager -
Install dependencies:
npm install -
Configure Environment Variables: Create a
.env.localfile in the root directory and add your OpenRouter key if you intend to use AI features:OPENROUTER_API_KEY=your_api_key_here
Running the Application
Development Mode
To run the manager with hot-reloading enabled:
npm run dev
The application will be available at http://localhost:3000.
Production Build
To create an optimized production build:
npm run build
npm run start
Connecting Your First eKuiper Instance
Once the UI is running, you need to link it to your eKuiper engine.
- Open the Manager: Navigate to
http://localhost:3000in your browser. - Add Server: Click on the Connections or Add Server button in the sidebar.
- Configure Connection:
- Name: A nickname for your instance (e.g.,
Factory-Edge-01). - URL: The full address of your eKuiper API (e.g.,
http://192.168.1.100:9081).
- Name: A nickname for your instance (e.g.,
- Verification: The manager will attempt to fetch system info. If successful, you will see the eKuiper version and status on the Dashboard.
Basic Usage Example
Creating a Stream with AI
Instead of writing complex SQL manually, you can use the built-in AI Stream Generator:
- Navigate to Streams > Create New.
- Select AI Generator.
- Enter a prompt: "Create an MQTT stream for temperature and humidity on topic sensors/data."
- Review the generated JSON and click Submit.
Tracing a Rule
To debug data flow in real-time:
- Go to the Rules section.
- Select an active rule and click the Trace icon.
- The Rule Topology will appear, showing a visual map of your data from Source to Sink.
- View live message attributes (spans) as they move through each operator.
Troubleshooting Connection Issues
If the manager cannot connect to your eKuiper instance:
- CORS: If running eKuiper and the Manager on different domains, ensure eKuiper is configured to allow requests or use the Manager's built-in Proxy Mode (enabled by default for server-side requests).
- Network Reachability: Ensure the machine running the Next.js app can
pingthe eKuiper host. - Logs: Check the terminal running
npm run devfor detailed API proxy error messages.