Skip to content

robase/flowlib

Repository files navigation

Flowlib

flowlib

Drop-in AI workflows for your Node.js app.
Documentation · Quick Start · GitHub

MIT License

Flowlib Flow Editor

Try the live demo →


Flowlib is an open-source workflow orchestration library you mount directly into your existing Express, NestJS, or Next.js app. Visual flow editor, AI agent nodes, 50+ built-in integrations, and batch processing — all as a library, not a platform.

Quick Start

npx flowlib-cli init

Or install manually:

npm install @flowlib/core @flowlib/express @flowlib/ui

Backend

import express from 'express';
import { createFlowlibRouter } from '@flowlib/express';

const app = express();

const flowlibRouter = await createFlowlibRouter({
  database: {
    type: 'sqlite',
    connectionString: 'file:./dev.db',
  },
  encryptionKey: process.env.FLOWLIB_ENCRYPTION_KEY, // npx flowlib-cli secret
});

app.use('/flowlib', flowlibRouter);
app.listen(3000);

Frontend

import { Flowlib } from '@flowlib/ui';
import '@flowlib/ui/styles';

export default () => <Flowlib apiBaseUrl="http://localhost:3000/flowlib" />;

Features

  • Visual Flow Editor — Drag-and-drop workflow builder with real-time execution monitoring.
  • AI Agent Nodes — Iterative tool-calling loops with OpenAI and Anthropic APIs.
  • 100+ Built-in Actions — Gmail, Slack, GitHub, Google Drive, Linear, Postgres, and more.
  • Batch Processing — Cut AI costs 50% with native OpenAI and Anthropic batch APIs.
  • AI-Assisted Builder — Describe what you need in plain language and the assistant wires up nodes for you.
  • Multi-Database — SQLite, PostgreSQL, and MySQL. Works with Drizzle ORM, Prisma, or raw SQL migrations.
  • Framework Agnostic — One core, thin adapters for Express, NestJS, and Next.js.

Packages

Package Description
@flowlib/core Framework-agnostic engine — flows, execution, actions, database
@flowlib/express Express router adapter
@flowlib/nestjs NestJS module adapter
@flowlib/nextjs Next.js App Router handler
@flowlib/ui React flow editor and dashboard
@flowlib/cli CLI for schema generation, migrations, and project setup
@flowlib/user-auth Authentication plugin (Better Auth)
@flowlib/rbac Role-based access control plugin
@flowlib/webhooks Webhook triggers with signature verification and rate limiting
@flowlib/version-control Sync flows to GitHub/GitLab/Bitbucket as .flow.ts files
@flowlib/cloudflare-agents Compile flows to Cloudflare Workers & Workflows
@flowlib/mcp Model Context Protocol server for AI coding agents

Examples

Example Stack Purpose
express-drizzle Express + SQLite Primary backend dev server
vite-react-frontend Vite + React Standalone frontend for the flow editor
nest-prisma NestJS + Prisma NestJS adapter example
nextjs-app-router Next.js 15 Self-contained Next.js example
nextjs-drizzle-auth-rbac Next.js + Auth + RBAC Full-featured example with plugins

Development

pnpm install
pnpm dev           # Interactive menu
pnpm dev:fullstack # Express backend + Vite frontend
pnpm test          # Unit + integration tests
pnpm test:pw       # Playwright tests
pnpm typecheck     # Type-check all packages

License

MIT

About

Drop-in AI workflows for your app

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors