greentic-flow-builder 0.1.0

AI-powered Adaptive Card flow builder with visual graph editor and demo runner
Documentation

greentic-flow-builder

CI CodeQL crates.io License: MIT Rust 1.94+

AI-powered Adaptive Card flow builder with a 3-layer template system, visual graph editor, and web-based demo runner. Generate Microsoft Adaptive Cards from natural-language prompts, compose multi-step flows, and preview them in a React-Flow based editor — all driven by a small Rust binary.

Features

  • 3-layer template system — 6 themes, 15 primitives, 42 presets across 10 categories (navigation, content, HR, finance, helpdesk, dashboards, schedule, communication, alerts, data)
  • Compose escape hatch — custom cards built from arrays of primitive sections
  • Web UI — chat-driven LLM generation (OpenAI), React Flow graph editor, inline JSON editor, theme switcher, demo runner
  • External template packs — bring your own presets/primitives/themes via local directories or remote .tar.gz archives
  • Deterministic rendering — Handlebars + JSON Schema validation + Adaptive Cards v1.5 post-processing

Quick Start

Install

cargo install greentic-flow-builder

Or via cargo binstall (pre-built binaries):

cargo binstall greentic-flow-builder

Launch the web UI

greentic-flow-builder ui --openai-api-key sk-... --port 3000

Then open http://localhost:3000.

Render a card from the CLI

greentic-flow-builder render --preset menu-card --theme corporate \
  --data-json '{"brand":"Acme","title":"Hi","items":[{"id":"a","title":"A"}]}'

List presets

greentic-flow-builder list
greentic-flow-builder list --category hr
greentic-flow-builder list --json

Validate data against a preset schema

greentic-flow-builder validate --template menu-card --data-json '{...}'

CLI Reference

Command Purpose
ui Launch the web UI (OpenAI chat + visual graph editor)
list List all presets, optionally filtered by category
schema Print the JSON schema for a preset
render Render a preset or compose a custom card from CLI data
validate Validate input data against a preset schema

Run greentic-flow-builder --help for full flags.

API (when UI is running)

Endpoint Purpose
GET /api/templates All presets grouped by category
GET /api/templates/:name Full schema + example for one preset
GET /api/primitives Primitive manifest
GET /api/themes List themes
GET /api/themes/:name Full theme (tokens + host_config)
GET /api/discovery/search?q=... Keyword preset search
POST /api/render Render preset OR compose sections
POST /api/render-flow Render multi-card flow
POST /api/chat LLM chat (returns JSON content)

External Template Packs

Load custom presets, primitives, or themes alongside the built-ins:

greentic-flow-builder ui --openai-api-key sk-... \
  --template-pack ./my-pack \
  --template-pack https://example.com/custom.tar.gz

Pack structure:

my-pack/
├── pack.json              { "name", "version", "description" }
├── primitives/            Optional
├── themes/                Optional
└── presets/
    └── category/
        ├── name.hbs
        └── name.schema.json

External packs override built-in entries by name (with a stderr warning). Multiple --template-pack args merge in order.

Development

# Full local CI
./ci/local_check.sh

# Standard Rust commands
cargo build
cargo test --workspace --all-features
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings

See CLAUDE.md for architecture details and conventions.

License

MIT — see LICENSE.