Declarative apps concepts

Mach5 declarative apps package data models, pages, actions, approvals, navigation, dashboards, notebooks, AI assistants, and workflow entry points into one application spec.

Use declarative apps when you want to turn data and workflows into a reusable operational experience: a triage console, investigation app, approval app, remediation console, partner app, or internal data product.

Applications list in Mach5

Application detail with compiled model

Running declarative application

What is a declarative app?

A declarative app is a named Application resource. Instead of hand-coding UI and backend glue, you describe the app structure in a spec. Mach5 compiles the spec into an app experience.

An app can define:

AreaPurpose
display_name and descriptionPublic app identity.
routeWhere the app appears in Mach5.
tagsApp discovery and organization.
modelsData objects the app works with.
pagesList, detail, form, dashboard, and custom pages.
actionsUser, row, bulk, workflow, and connector-backed actions.
statesApp-level or record-level state model.
approvalsApproval policies for sensitive actions.
navigationApp navigation menu.
layoutApp shell and page layout hints.
aiAI investigation and generation settings.
assistantsApp-specific AI assistants.
defaultsDefault warehouse, filters, limits, and conventions.

Application resource shape

A minimal application spec looks like this:

{
  "display_name": "SOC Triage",
  "description": "Review, enrich, and route high-priority security findings.",
  "route": "/apps/soc-triage",
  "tags": ["security", "triage"],
  "models": [],
  "pages": [],
  "actions": [],
  "navigation": [],
  "assistants": []
}

In storage and APIs, the app is an Application resource with spec and status:

{
  "name": "soc-triage",
  "spec": {
    "display_name": "SOC Triage",
    "description": "Review, enrich, and route high-priority security findings.",
    "route": "/apps/soc-triage"
  },
  "status": {
    "state": "draft",
    "observed_generation": 1,
    "diagnostics": [],
    "runtime_hash": "",
    "compiled_model": {}
  }
}

App lifecycle

Declarative apps move through a simple lifecycle.

StageDescription
DraftAuthor the spec and iterate quickly.
ValidateCheck structure, references, actions, pages, and model definitions.
PreviewCompile and inspect the generated app before publishing.
PublishMake the app available to users.
RunUsers query models, open pages, trigger actions, request approvals, and use assistants.
UpdateApply a new spec generation and recompile.

The app status records compile state, diagnostics, runtime hash, and compiled model output.

Models

Models describe the app’s core objects. A model usually points to a data source and identifies a key field.

{
  "models": [
    {
      "name": "finding",
      "source": {
        "type": "sql",
        "sql": "SELECT * FROM findings WHERE severity IN ('critical', 'high')"
      },
      "key": "finding_id",
      "display_fields": ["finding_id", "severity", "service", "summary"],
      "state_field": "status"
    }
  ]
}

Compiled models expose:

FieldMeaning
nameModel name.
sourceQuery or data source definition.
keyUnique record key.
display_fieldsFields to show in lists, pickers, and summaries.
state_fieldOptional field used for workflow state.

Pages

Pages define how users interact with models and app resources.

Common page patterns:

Page patternUse it for
listTable or queue of records.
detailRecord overview with sections, evidence, and actions.
formCreate or update structured input.
dashboardEmbedded dashboard view.
notebookGuided analysis or investigation notebook.
customApp-specific composition.

Example list page:

{
  "pages": [
    {
      "name": "findings",
      "type": "list",
      "model": "finding",
      "title": "Findings",
      "fields": [
        { "name": "severity", "label": "Severity", "type": "string" },
        { "name": "service", "label": "Service", "type": "string" },
        { "name": "summary", "label": "Summary", "type": "string" },
        { "name": "status", "label": "Status", "type": "string" }
      ],
      "row_actions": ["assign_owner", "open_investigation"]
    }
  ]
}

Example detail page:

{
  "name": "finding_detail",
  "type": "detail",
  "model": "finding",
  "title": "Finding detail",
  "sections": [
    {
      "type": "fields",
      "title": "Summary",
      "fields": [
        { "name": "finding_id", "label": "Finding ID", "type": "string", "readonly": true },
        { "name": "severity", "label": "Severity", "type": "string" },
        { "name": "summary", "label": "Summary", "type": "string" }
      ]
    },
    {
      "type": "dashboard",
      "title": "Evidence",
      "dashboard": "finding-evidence"
    }
  ],
  "actions": ["open_investigation", "create_ticket"]
}

Fields

Fields define how records and action inputs are displayed.

{
  "name": "severity",
  "label": "Severity",
  "type": "string",
  "required": true,
  "readonly": false,
  "default_value": "medium",
  "enum_values": [
    { "value": "critical", "label": "Critical" },
    { "value": "high", "label": "High" },
    { "value": "medium", "label": "Medium" },
    { "value": "low", "label": "Low" }
  ],
  "help": "Choose the highest severity supported by evidence."
}

Compiled fields include name, label, type, required flag, readonly flag, default value, enum values, help text, and source metadata.

Actions

Actions let users and agents do work from the app.

Common action kinds:

KindUse it for
workflowStart an Axon workflow.
connectorCall an approved connector effect.
navigateMove to another page.
commentAdd record activity.
transactionApply controlled state changes.
assistantAsk an app assistant to generate or enrich output.

Example workflow action:

{
  "actions": [
    {
      "name": "create_ticket",
      "label": "Create ticket",
      "kind": "workflow",
      "workflow": "CreateFindingTicket@v1",
      "requires_confirmation": true,
      "approval": "ticket_creation",
      "input_fields": [
        { "name": "assignee", "label": "Assignee", "type": "string", "required": true },
        { "name": "priority", "label": "Priority", "type": "string", "default_value": "P2" }
      ],
      "post_action": {
        "behavior": "navigate",
        "target_page": "finding_detail"
      }
    }
  ]
}

Approvals

Approvals protect sensitive app actions.

{
  "approvals": [
    {
      "name": "disable_user",
      "action": "disable_okta_user",
      "approver_role": "security-admin",
      "required": true,
      "reason_template": "Disable {{ record.user }} because {{ input.reason }}"
    }
  ]
}

Use approvals for destructive or high-impact operations such as account disablement, policy changes, production remediation, package deletion, or workflow reruns.

Navigation defines the app menu.

{
  "navigation": [
    { "label": "Findings", "page": "findings" },
    { "label": "Approvals", "page": "approval_queue" },
    { "label": "Dashboards", "page": "overview" }
  ]
}

Assistants and AI

Apps can include AI assistants that understand the app’s models, pages, actions, and workflows.

{
  "assistants": [
    {
      "name": "triage_assistant",
      "kind": "investigation",
      "description": "Summarize evidence and recommend next actions for a finding.",
      "model": "finding",
      "tools": ["query_related", "open_investigation", "create_ticket"]
    }
  ],
  "ai": {
    "default_assistant": "triage_assistant",
    "instructions": "Use evidence first. Recommend actions only when confidence is high."
  }
}

Bundles and declarative resources

Apps can be installed with other resources as a bundle. A bundle may include an application, dashboards, notebooks, workflows, synthetic data, connections, and other resource documents.

Each document uses a uniform apply envelope:

kind: Application
metadata:
  name: soc-triage
spec:
  display_name: SOC Triage
  description: Review, enrich, and route security findings.
  route: /apps/soc-triage

A bundle manifest describes the package:

kind: Bundle
metadata:
  name: soc-triage-app
spec:
  bundle_version: 1.0.0
  description: SOC triage app with dashboard, notebook, and Axon workflow.

Next steps

Analytics Cookies

Help us understand website usage.

Necessary storage remembers your choice. With your consent, Mach5 also uses PostHog analytics to measure website traffic and interactions.

Change this anytime from Cookie Settings in the footer. Privacy Notice.