This index covers the cross-cutting parts of Sowel's data model: the three-layer architecture, the entity relationship diagram, the plugin distribution layer, the reactive data flow, the event bus events, and the API surface.
Per-entity details are split across five focused pages aligned with the core concepts:
Sowel separates concerns into three distinct layers, with orchestration entities (Modes, Recipes, Calendars) operating across them.
+-------------------------------------------------------------+
| ORCHESTRATION |
| Modes -- Recipes -- Calendars -- Buttons |
| Cross-cutting state machines that drive Equipments / Zones |
+-------------------------------------------------------------+
| LAYER 1 -- TOPOLOGY (Zones) |
| Spatial structure of the home |
| Hierarchical: Home -> Floor -> Room |
| Aggregates data automatically from child Equipments |
+-------------------------------------------------------------+
| LAYER 2 -- FUNCTIONAL (Equipments) |
| What the user sees and controls |
| Placed IN a Zone |
| Binds to one or more physical Devices |
+-------------------------------------------------------------+
| LAYER 3 -- PHYSICAL (Devices) |
| Hardware discovered from integration plugins |
| Auto-discovered, raw data and orders |
| Never directly manipulated by the end user |
+-------------------------------------------------------------+
Guiding principle: A Device is what's on the network. An Equipment is what's in the room.
Since spec 053, everything that ships out of band is a plugin -- both integrations and recipes. The PackageManager downloads them from GitHub and the appropriate loader (PluginLoader for integrations, RecipeLoader for recipes) instantiates them at runtime.
typePackageType="integration"|"recipe";interfacePluginManifest{id:string;// unique plugin id, used in DB and registryname:string;version:string;// semverdescription:string;icon:string;// Lucide icon namerepo:string;// GitHub owner/repo -- required for backup/restore reinstalltype?:PackageType;// defaults to "integration"author?:string;sowelVersion?:string;// minimum compatible Sowel versionsettings?:IntegrationSettingDef[];}interfaceInstalledPackage{manifest:PluginManifest;enabled:boolean;installedAt:string;type:PackageType;}interfacePluginInfoextendsOmit<InstalledPackage,"type">{status:IntegrationStatus;// connected | disconnected | error | not_configureddeviceCount:number;offlineDeviceCount:number;latestVersion?:string;// populated when registry has a newer version}
CREATETABLEplugins(idTEXTPRIMARYKEY,-- manifest.idversionTEXTNOTNULL,enabledINTEGERNOTNULLDEFAULT1,installed_atTEXTNOTNULLDEFAULT(datetime('now')),manifestTEXTNOTNULL,-- JSON: full PluginManifesttypeTEXTNOTNULLDEFAULT'integration');
Integration settings are stored in the generic settings table under keys like integration.<id>.<settingKey>.