pgflow  by pgflow-dev

Orchestrate AI and data workflows directly within Supabase

Created 1 year ago
250 stars

Top 100.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary pgflow is a workflow engine designed for Supabase users, enabling the creation of AI-centric and background job workflows directly within their existing Supabase projects. It eliminates the complexity of manually integrating various Supabase primitives like pgmq, pg_cron, and Edge Functions, offering a declarative TypeScript-based approach for streamlined development and deployment.

How It Works Workflows are defined using a TypeScript DSL (@pgflow/dsl), which compiles into SQL migrations managed by @pgflow/core. Execution is handled by workers deployed as Supabase Edge Functions (@pgflow/edge-worker). This architecture leverages Postgres for state management and coordination, negating the need for external services like Redis or Temporal. The system automatically manages scheduling, state persistence, and result aggregation, providing a cohesive, integrated workflow solution.

Quick Start & Requirements Install pgflow via npx pgflow@latest install. Requires a Supabase project with the Supabase CLI installed and running. Apply migrations using npx supabase migrations up. Official documentation and a demo are available.

Highlighted Details

  • AI-Ready: Features automatic, per-step retries with exponential backoff, crucial for resilient LLM API integrations.
  • Parallel Processing: Supports fan-out operations where independent steps within a larger workflow can retry failures without impacting others.
  • Postgres-Native Observability: All workflow states, execution logs, and outputs are stored in Postgres, accessible via SQL for debugging and monitoring.
  • Supabase Integration: Runs entirely within Supabase, utilizing Edge Functions and Postgres, eliminating external infrastructure dependencies.
  • Flexible Triggers: Workflows can be initiated from application code, database triggers, pg_cron, or direct SQL calls.

Maintenance & Community The project provides links to its GitHub repository and a Discord server for community engagement. Release management details are available in RELEASES.md and SNAPSHOT_RELEASES.md.

Licensing & Compatibility Licensed under the Apache 2.0 license. This permissive license generally allows for commercial use and integration into closed-source applications.

Limitations & Caveats The project is tightly coupled to the Supabase ecosystem. While designed for AI and data workflows, specific limitations for other complex orchestration patterns are not detailed in the provided README.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
35
Issues (30d)
3
Star History
24 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.