{"id":45173,"library":"iterativeflow","title":"IterativeFlow","description":"Durable, iterative workflows on your own Postgres. Version 3.1.0 as of 2025, released with monthly cadence. Runs inside your Node app using graphile-worker and drizzle-orm, inspired by Trigger.dev and Temporal, but without a separate service. Supports steps with retries, sleeps for days, external signals, child flows, versioned flows, and at-least-once execution via transactional outbox. Key differentiator: no external service, full control over Postgres schema, Standard Schema validation, and TypeScript-first.","status":"active","version":"3.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/ahmedrowaihi/iterativeflow","tags":["javascript","cron","drizzle","durable-execution","graphile-worker","iterative","loop","orchestration","postgres"],"install":[{"cmd":"npm install iterativeflow","lang":"bash","label":"npm"},{"cmd":"yarn add iterativeflow","lang":"bash","label":"yarn"},{"cmd":"pnpm add iterativeflow","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Runtime peer dependency for database schema and query building","package":"drizzle-orm","optional":false},{"reason":"Runtime peer dependency for job queue and worker management","package":"graphile-worker","optional":false},{"reason":"Runtime peer dependency for Postgres client","package":"pg","optional":false}],"imports":[{"note":"ESM-only since v3. Node >=20 required.","wrong":"const flow = require('iterativeflow')","symbol":"flow","correct":"import { flow } from 'iterativeflow'"},{"note":"Factory function; no class export. ESM-only.","wrong":"import { Engine } from 'iterativeflow'","symbol":"createEngine","correct":"import { createEngine } from 'iterativeflow'"},{"note":"Type only; not a runtime value. Using as value causes runtime error.","wrong":"import { FlowBuilder } from 'iterativeflow'","symbol":"type FlowBuilder","correct":"import type { FlowBuilder } from 'iterativeflow'"}],"quickstart":{"code":"import { flow, createEngine } from 'iterativeflow';\nimport { z } from 'zod';\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { Pool } from 'pg';\n\nconst pool = new Pool({ connectionString: process.env.DATABASE_URL ?? '' });\nconst db = drizzle(pool);\n\nconst engine = createEngine({ db, pool });\n\nconst myFlow = flow('my-flow')\n  .input(z.object({ name: z.string() }))\n  .step('greet', async ({ input }) => `Hello, ${input.name}!`)\n  .build();\n\nconst handle = engine.register(myFlow);\nconst { runId } = await handle.start({ name: 'World' });\nconst result = await handle.result(runId);\nconsole.log(result); // 'Hello, World!'\n\nawait pool.end();","lang":"typescript","description":"Shows full setup: create engine, define a simple flow with zod input, register, start, and wait for result. Requires Postgres connection via DATABASE_URL."},"warnings":[{"fix":"Use import syntax and upgrade Node to >=20.","message":"ESM-only since v3; require() throws. Node >=20 required.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Create a new flow version or plan for breaking changes explicitly.","message":"Flow versioning is compile-time enforced; editing a flow's shape after runs exist will cause a hard error. No silent migration.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Pass { tables: flowTables } to createEngine after customizing the generated schema.","message":"Generated iterativeflow-schema.ts must be passed to createEngine if customized; otherwise engine uses default workflow.* schema and customizations break.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check result.kind and respond appropriately as shown in README.","message":"Signals may arrive before the flow arms (buffered) or after timeout (expired); handle all four return kinds (delivered, buffered, duplicate, expired).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to v3 where sleep is stored as bigint milliseconds.","message":"Using built-in sleep steps with durations exceeding 999 days may cause integer overflow in Postgres interval.","severity":"deprecated","affected_versions":"<3.0.0"}],"env_vars":null,"search_vec":"'2025':13 '3.1.0':10 'app':22 'at-least-onc':55 'cadenc':17 'child':50 'control':69 'cron':81 'day':47 'differenti':64 'drizzl':29,82 'drizzle-orm':28 'durabl':2,84 'durable-execut':83 'execut':59,85 'extern':48,66 'first':79 'flow':51,53 'full':68 'graphil':25,87 'graphile-work':24,86 'insid':19 'inspir':31 'iter':3,89 'iterativeflow':1 'javascript':80 'key':63 'least':57 'loop':90 'month':16 'node':21 'orchestr':91 'orm':30 'outbox':62 'postgr':8,71,92 'releas':14 'retri':44 'run':18 'schema':72,74 'separ':39 'servic':40,67 'signal':49 'sleep':45 'standard':73 'step':42 'support':41 'tempor':35 'transact':61 'trigger.dev':33 'typescript':78 'typescript-first':77 'use':23 'valid':75 'version':9,52 'via':60 'without':37 'worker':26,88 'workflow':4","created_at":"2026-06-07T12:53:42.871497+00:00","updated_at":"2026-06-07T12:53:42.871497+00:00","problems":[{"fix":"Run `npm install iterativeflow drizzle-orm graphile-worker pg` and use import syntax.","cause":"Missing npm install or ESM-only package used with require()","error":"Error: Cannot find module 'iterativeflow'"},{"fix":"Run `npm install drizzle-orm@latest` to satisfy peer requirement.","cause":"Incompatible peer dependency version","error":"Error: drizzle-orm version must be >=0.45.0 (found x.y.z)"},{"fix":"Run `npm install graphile-worker@>=0.16.0`.","cause":"Missing peer dependency graphile-worker","error":"Error: GraphileWorker is not installed. Please run `npm install graphile-worker`"},{"fix":"Run `npx iterativeflow generate-schema`, then `npx drizzle-kit generate && npx drizzle-kit migrate`.","cause":"Missing generated schema migration in database","error":"Error: relation \"workflow.runs\" does not exist"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ahmedrowaihi/iterativeflow#readme","github":"https://github.com/ahmedrowaihi/iterativeflow","docs":null,"changelog":null,"pypi":null,"npm":"iterativeflow","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}