Skip to Content
IoT App DevelopmentApp Structure

App Structure

Every IronFlock app is a Git-versioned folder containing your application code and an optional .ironflock configuration directory.

Directory Layout

my-app/ ├── Dockerfile # Required: defines the container image ├── docker-compose.yml # Optional: multi-container setup ├── main.py # Your application code (any language) ├── requirements.txt # Dependencies └── .ironflock/ ├── board-template.yml # Dashboard layout ├── data-template.yml # Database schema for telemetry ├── env-template.yml # User-configurable parameters ├── port-template.yml # Remote access port definitions └── ai-template.yml # AI agent definitions

The Six Parts of an App

1. Edge Code

The core application logic. This code runs inside a Docker container on the device and handles communication with sensors, PLCs, cameras, or any connected hardware.

The edge code can be written in any programming language — Python, JavaScript, Go, Rust, C++, or anything else that runs in a Docker container.

2. Board (User Interface)

A real-time dashboard built with the no-code Board Editor. Boards display data from all devices running the app in a project and update automatically through the messaging system.

The board configuration is stored in board-template.yml and is auto-generated by the editor.

3. Data Storage

Each project has its own physical database (powered by TimescaleDB). When an app defines tables in data-template.yml, those tables are provisioned automatically when a user installs the app. Data is private per project — developers don’t have access to user data.

4. Messaging Realm

When installed, the app gets a private message realm connecting:

  • All app instances on edge devices
  • The project database
  • The board UI

Communication uses WAMP (Web Application Messaging Protocol) through the IronFlock SDKs (ironflock-py for Python, ironflock-js for JavaScript).

5. Remote Access

Define ports and protocols in port-template.yml to enable secure tunneling to device services. Users can then enable/disable these tunnels per device. See Remote Access.

6. AI Agents

Expose domain-specific AI agents through ai-template.yml that extend the IronFlock AI assistant. See AI Features.

Persistent Storage on Devices

By default, data inside the container is lost on restart. Two directories persist across restarts:

PathScope
/dataPrivate to this app — other apps cannot access it
/sharedShared across all apps on the device

If you’re using Docker Compose, configure persistent volumes in your docker-compose.yml instead.

Hardware Access

If your app interacts with local hardware (sensors, cameras, serial devices), those devices are mounted at /dev inside the container.

Last updated on