Get started

Komod development

KOFA's features are provided by Komods: small plugins that are loaded at run time (sensor, controller, camera, AI, display) and that you connect through typed ports in KOFA's graph editor. You can write a Komod without knowing the KOFA source code: you only need the .NET 10 SDK, two NuGet packages and a template.

Tip

In a hurry? Jump to the tutorial: in 15 minutes you build two cooperating Komods, a thermometer and a thermostat.

What you get

Tool What it is for
Kofa.Abstractions The server-side Komod SDK: KomodBase, ports, the common data types.
Kofa.Abstractions.Ui The SDK of the browser (Blazor) part: tiles, pages, settings editors.
Kofa.Komod.Template dotnet new templates (and Visual Studio / Rider project templates) that create a ready project skeleton.
Kofa.Pack (kofa-pack) Checks and packs the Komod into a .komod file, publishes it to the Komod store.

All of them are available from the NuGet source https://kofa.kncsk.hu/nuget/v3/index.json after the installation.

How a Komod is built

 ┌────────────────────┐   typed port     ┌────────────────────┐
 │  Server side       │ ───────────────▶ │  Another Komod     │
 │  KomodBase<T>      │   (e.g. Scalar)  │                    │
 │  ports, settings   │                  └────────────────────┘
 └─────────┬──────────┘
           │ SignalR (live data, commands)
 ┌─────────▼──────────┐
 │  Browser side      │   tile, page, settings editor
 │  Blazor component  │   (optional, KOFA loads it from the running server)
 └────────────────────┘
  • The server part does the work: it declares ports, receives settings, and reads and writes data in a main loop. See Anatomy of a Komod.
  • The browser part only displays and sends commands; it has no ports of its own. See User interface (UI).
  • Both go into one package (.komod, a zip) that KOFA loads and unloads at run time. See The package.

How the documentation is organized

Part Contents
Setup and usage Installing KOFA, first-time setup, and exporting and installing KOFA Lite, with screenshots.
Get started Installation and the first two Komods.
Concepts Ports, settings, lifecycle, package.
How-to guides One task each: UI, hardware, files, relay, extension.
Packaging and publishing Build, .komod file, installation, Komod store.
Reference Data types, attributes, API, MSBuild properties.

The "API" and "Attributes" reference pages are generated from the code, so they always describe the SDK that is currently released.