trowel-bricksBuilding Features

When building new features in Prax, you typically work across both frontend and backend.


1. Create or Extend a Node

To create a new node:

bashCopyEdit/backend/nodes/my-custom-node/
tsCopyEdit// index.ts
export default {
  name: "MyCustomNode",
  inputs: ["text"],
  outputs: ["result"],
  run: async ({ text }) => {
    const result = doSomething(text)
    return { result }
  }
}

2. Register Node in Frontend

Update the frontend node registry so it appears in the visual editor.

tsCopyEdit/frontend/flows/nodes/index.ts

import MyCustomNode from './my-custom-node'
export const nodeRegistry = {
  ...,
  'my-custom-node': MyCustomNode
}

3. Add a UI Panel for Node Settings

Each node has a configurable panel in the editor. Add a component for user input.


4. Add API or Utility Logic

If the node uses external APIs, create a service:

Last updated