Visual editor for Squidie workflows.
Squid Studio uses Squidie as the workflow runtime and editor-spec boundary. Studio owns the embedded Phoenix UI; host applications still own runtime configuration, storage, queues, workers, authorization, and redaction.
Add both packages to a host application when the Studio UI should author, validate, preview, or inspect Squidie workflows:
defp deps do
[
{:squidie, "~> 0.1.3"},
{:squid_studio, "~> 0.1.0"}
]
endHosts should configure Squidie directly in the host application:
config :squidie,
repo: MyApp.Repo,
queue: "default"Squid Studio does not start workers or choose storage. Host applications expose only the workflows, runs, action registry, and visibility scope that a user is allowed to access.
Add Squid Studio as a dependency, then mount it from the host router:
defmodule MyAppWeb.Router do
use MyAppWeb, :router
import SquidStudio.Web.Router
scope "/dev" do
pipe_through :browser
squid_studio "/squid-studio"
end
endHost applications can provide workflow data by implementing SquidStudio.Web.Resolver:
defmodule MyApp.SquidStudioResolver do
@behaviour SquidStudio.Web.Resolver
@impl true
def resolve_user(conn), do: conn.assigns[:current_user]
@impl true
def resolve_access(_user), do: :all
@impl true
def resolve_workflows(_user) do
[
%{
id: "workflow",
name: "Workflow",
nodes: [],
edges: []
}
]
end
endThen pass it to the mount macro:
squid_studio "/squid-studio", resolver: MyApp.SquidStudioResolvermix deps.get
mix assets.build
cd standalone
mix phx.serverVisit http://localhost:4000.
Run validation with:
mix precommit