Skip to content

System as Code Experience

The System as Code Experience in Coreflux provides a revolutionary approach to IoT orchestration by combining documentation and implementation in a single, executable document using LOT Notebooks.

What is System as Code?

System as Code is a paradigm that allows you to create complete, self-documenting IoT systems using LOT Notebooks (.lotnb files). These notebooks combine:

  • Documentation: Markdown cells explain your system architecture and logic
  • Code: Executable LOT code cells define models, rules, actions, and routes
  • Visualization: Real-time data charts and diagrams
  • Documentation and Code in One


    Combines markdown documentation with executable LOT code, creating self-documenting IoT systems.

  • End-to-End Solutions


    Define complete IoT orchestrations with models, rules, actions, and routes all in one place.

  • Shareable and Reusable


    Create templates for common use cases that can be shared across teams and organizations.

Key Features

  • Interactive Development: Write, execute, and see results in real-time
  • Documentation First: Explain your system before implementing it
  • Automatic Deployment: Execute cells to deploy components to your broker
  • Visualization: Built-in charting for time-series data
  • Seamless Integration: Direct connection to your Coreflux MQTT broker
  • Version Control: Notebook files can be stored in Git repositories

When to Choose System as Code

The System as Code Experience is ideal for:

  • System Architects: Designing complete IoT solutions
  • Solution Developers: Building end-to-end IoT applications
  • Documentation Teams: Creating comprehensive guides with working examples
  • Collaborative Teams: Sharing knowledge and implementation in one document

Use Cases

Coreflux LOT Notebooks excel at creating complete, deployable IoT solutions for specific business needs:

Asset Management Notification Center

Create a notebook that: - Defines models to transform asset data - Sets up rules for access control - Creates actions to trigger alerts based on asset conditions - Implements email routes for notifications - Provides complete documentation of the notification system

Manufacturing Process Data Pipeline

Develop a notebook that: - Models sensor data from manufacturing equipment - Creates rules to secure sensitive production data - Defines actions to respond to production anomalies - Sets up routes to connect multiple factories - Documents the entire pipeline from sensors to analytics

Getting Started

To begin using the System as Code Experience:

  1. Install Coreflux MQTT Broker:
  2. Follow the MQTT Broker installation guide to set up your Coreflux MQTT Broker
  3. Ensure your broker is running and accessible

  4. Explore Ready-to-Use Notebook Examples:

  5. Temperature Monitoring System: A complete example of monitoring and alerting based on temperature readings
  6. Browse additional LOT Notebook Samples to find examples relevant to your use case
  7. Download examples to use as templates for your own projects

  8. Set Up Your Environment to Run the Examples:

  9. Install Visual Studio Code: Download and install VS Code
  10. Install LOT Notebooks Extension:

    • Open VS Code Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
    • Search for and install the LOT Notebooks extension
  11. Connect to Your Coreflux Broker:

  12. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  13. Type "LOT Notebook: Change Credentials" and select it
  14. Enter your broker details:
    • URL (e.g., mqtt://localhost:1883)
    • Username (default is "root")
    • Password
  15. The extension will test the connection and notify you if it's successful

  16. Open and Run the Example Notebooks:

  17. Open the downloaded notebook files (.lotnb) in VS Code
  18. Execute the code cells to deploy the components to your Coreflux broker
  19. Observe the system in action using an MQTT client like MQTT Explorer

  20. Create Your Own Notebook:

  21. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  22. Type "LOT Notebook: Create New Notebook" and select it
  23. Add markdown cells to document your system
  24. Add code cells with LOT definitions (models, rules, actions)
  25. Execute cells to deploy your system components to your Coreflux broker

Next Steps