Igniter installer for Phoenix apps that adds:
live_react@xyflow/react(React Flow)- Vite-based frontend scaffolding compatible with LiveReact
- Example
ReactFlowLiveroute rendering a graph component
Add the installer package to your Phoenix project and run:
mix igniter.install react_flowOr, if the dependency is already present:
mix react_flow.installmix.exs: adds{:live_react, "~> 1.1"}and updatesassets.*aliasesconfig/dev.exs: adds:live_reactdev config and npm watcherconfig/prod.exs: adds:live_reactprod config with SSR disabled by defaultlib/<app>_web.ex: importsLiveReactinhtml_helpers/0root.html.heex: wraps app assets withLiveReact.Reload.vite_assetsassets/: creates Vite + React Flow starter files- Router and LiveView: adds
/react-flowand an exampleReactFlowLive
Run:
mix deps.get
npm install --prefix assetsThen start your Phoenix server and open /react-flow.