Skip to content

Latest commit

Β 

History

History
64 lines (51 loc) Β· 1.46 KB

index.mdx

File metadata and controls

64 lines (51 loc) Β· 1.46 KB

Introduction

Visual programming for React and NodeJs πŸš€

import DocsFlow from '../components/demos/DocsFlow'

What is DataStory?

DataStory ships a React component:

<DataStory />

... which connects to a computation server:

const app = new Application();

app.register([
  coreNodeProvider,
  // ... your custom nodes here πŸ’«
]);

... that executes your diagram with real time feedback:

// async generator magic ✨
const executor = app.getExecutor(diagram)

Tell me more

We may execute diagrams directly via the UI or in headless/serverless environments and seamlessly convert between UI rendered, JSON serialized and programmically created diagrams/nodes to build any application you can think of.

// A diagram created programmatically πŸ€–
const diagram = core.getDiagramBuilder()
  .add('Signal')
  .add('Sleep', { duration: 500 })
  .add('ConsoleLog')
  .get()

// Serializable πŸ“¦
const saved = JSON.stringify(diagram)

// Open saved diagrams πŸ”§
const restored = JSON.parse(saved)

We may customize the platform to our needs and easily add our own nodes using well defined patterns:

// Custom node
const MyBusinessProcessor = {
  type: 'My Business Processor',
  inputs: ['ideas'],
  outputs: ['unicorns'],
  
  async *run({ input, output }) {
    // logic goes here 🧠
  },
};

// A diagram is a node and a node is a diagram 🀯
const NestedNode = diagram

... and much more - Let's get building! πŸš€