Socket
Book a DemoInstallSign in
Socket

@auto-engineer/flowlang

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@auto-engineer/flowlang

Domain-specific language for building event-driven applications with type-safe schemas and GraphQL API generation. Plugin for the Auto Engineer CLI that enables defining business flows, data transformations, and integrations using TypeScript-based syntax.

latest
npmnpm
Version
0.7.1
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@auto-engineer/flowlang

Domain-specific language for building event-driven applications with type-safe schemas and GraphQL API generation. Plugin for the Auto Engineer CLI that enables defining business flows, data transformations, and integrations using TypeScript-based syntax.

Installation

This is a plugin for the Auto Engineer CLI. Install both the CLI and this plugin:

npm install -g @auto-engineer/cli
npm install @auto-engineer/flowlang

Configuration

Add this plugin to your auto.config.ts:

export default {
  plugins: [
    '@auto-engineer/flowlang',
    // ... other plugins
  ],
};

Commands

This plugin provides the following commands:

  • create:example - Create an example project with FlowLang
  • export:schema - Export flow schema to JSON

What is FlowLang?

FlowLang is a declarative language for describing business processes, data flows, and system integrations. It combines:

  • Type Safety: Full TypeScript integration with compile-time validation
  • Event-Driven Architecture: Built on top of the Emmett event sourcing framework
  • GraphQL Integration: Schema generation and resolver creation
  • Message Bus Support: Support for inter-service communication
  • Flow Orchestration: Define workflows with branching logic and error handling

Key Features

Fluent API Design

Define business flows using chainable API:

import { flow } from '@auto-engineer/flowlang';

const orderFlow = flow('place-order')
  .input<PlaceOrderCommand>()
  .validate(command => /* validation logic */)
  .process(async (command, ctx) => {
    // Business logic here
    return { orderId: generateId(), status: 'confirmed' };
  })
  .emit<OrderPlaced>()
  .build();

Schema Generation

Generate GraphQL schemas from flow definitions:

// Flows are converted to GraphQL mutations and queries
// Input types become GraphQL input types
// Output events become GraphQL object types

Integration Support

Support for external service integrations:

const flow = flow('payment-processing')
  .integration('stripe', StripePaymentGateway)
  .integration('email', EmailService)
  .process(async (command, ctx) => {
    const payment = await ctx.integrations.stripe.charge(command.amount);
    await ctx.integrations.email.sendReceipt(command.email, payment);
    return payment;
  });

Testing Support

Testing utilities for flow validation:

import { testFlow } from '@auto-engineer/flowlang/testing';

describe('order flow', () => {
  it('should process valid orders', async () => {
    const result = await testFlow(orderFlow)
      .withInput({ productId: '123', quantity: 2 })
      .expectEvent<OrderPlaced>()
      .run();

    expect(result.orderId).toBeDefined();
  });
});

Architecture

FlowLang builds on several core concepts:

  • Flows: The main building blocks that define business processes
  • Messages: Strongly-typed data structures for communication
  • Integrations: External service connectors with retry and error handling
  • Context: Runtime environment providing access to integrations and utilities
  • Registry: Central repository for flow definitions and metadata

Getting Started

  • Install the plugin (see Installation above)
  • Create your first flow project:
    auto create:example
    
  • Explore the generated example flows in the flows/ directory
  • Define your own business flows using the FlowLang API
  • Export your schema for GraphQL integration:
    auto export:schema
    

Integration with Auto Engineer

FlowLang works with other Auto Engineer plugins:

  • @auto-engineer/emmett-generator: Generates backend infrastructure from FlowLang schemas
  • @auto-engineer/react-graphql-generator: Creates React components from flow-generated GraphQL schemas
  • @auto-engineer/server-implementer: Implements flow handlers with AI assistance
  • @auto-engineer/information-architect: Generates information architecture from flow definitions

This plugin-based approach allows building applications from high-level flow definitions to production code.

FAQs

Package last updated on 29 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts