# PgFlow v0.1.0 - Table of Contents > Workflows, background jobs and cron in Elixir and Postgres powered by PGMQ. ## Pages - [PgFlow](readme.md) ## Modules - [PgFlow](PgFlow.md): PgFlow is an Elixir implementation of the pgflow workflow engine. - [PgFlow.Client](PgFlow.Client.md): Client API for interacting with PgFlow runs. - [PgFlow.Config](PgFlow.Config.md): Configuration validation and management for PgFlow. - [PgFlow.Context](PgFlow.Context.md): Context struct passed to step handler functions. - [PgFlow.DSL.Validation](PgFlow.DSL.Validation.md): Compile-time validation helpers for PgFlow DSL macros. - [PgFlow.Flow](PgFlow.Flow.md): A macro-based DSL for defining pgflow workflows. - [PgFlow.Flow.Definition](PgFlow.Flow.Definition.md): Represents a compiled flow definition. - [PgFlow.Flow.Step](PgFlow.Flow.Step.md): Represents a single step in a flow definition. - [PgFlow.FlowCompiler](PgFlow.FlowCompiler.md): Compiles flow definitions into SQL statements. - [PgFlow.FlowRegistry](PgFlow.FlowRegistry.md): Registry for flow definitions using an ETS table. - [PgFlow.FlowStarter](PgFlow.FlowStarter.md): Supervised GenServer that registers flow and job modules with exponential backoff and jitter. - [PgFlow.HelpersMigration](PgFlow.HelpersMigration.md): Manages database migrations for PgFlow's extension SQL functions. - [PgFlow.Job](PgFlow.Job.md): A macro-based DSL for defining pgflow background jobs. - [PgFlow.JobCompiler](PgFlow.JobCompiler.md): Compiles job definitions into SQL statements. - [PgFlow.LiveClient](PgFlow.LiveClient.md): LiveView-native client for tracking flow and job runs in real-time. - [PgFlow.Logger](PgFlow.Logger.md): Structured logging for PgFlow, aligned with the TypeScript reference implementation. - [PgFlow.Migration](PgFlow.Migration.md): Installs the pgflow core schema (tables, triggers, functions) into a consumer app's database via EctoEvolver. - [PgFlow.Migrations.Core.V01](PgFlow.Migrations.Core.V01.md): Version 1 of the core pgflow schema. - [PgFlow.Migrations.Versions.V01](PgFlow.Migrations.Versions.V01.md): PgFlow extensions migration version 1. - [PgFlow.Queries.Flows](PgFlow.Queries.Flows.md): SQL query interface for pgflow flow operations. - [PgFlow.Queries.Helpers](PgFlow.Queries.Helpers.md): Shared utilities for database queries. - [PgFlow.Queries.Pgmq](PgFlow.Queries.Pgmq.md): SQL query interface for pgmq-specific operations. - [PgFlow.Queries.Workers](PgFlow.Queries.Workers.md): SQL query interface for pgflow worker operations. - [PgFlow.Schema.Dep](PgFlow.Schema.Dep.md): Schema for the pgflow.deps table. - [PgFlow.Schema.Flow](PgFlow.Schema.Flow.md): Schema for the pgflow.flows table. - [PgFlow.Schema.Run](PgFlow.Schema.Run.md): Schema for the pgflow.runs table. - [PgFlow.Schema.Step](PgFlow.Schema.Step.md): Schema for the pgflow.steps table. - [PgFlow.Schema.StepState](PgFlow.Schema.StepState.md): Schema for the pgflow.step_states table. - [PgFlow.Schema.StepTask](PgFlow.Schema.StepTask.md): Schema for the pgflow.step_tasks table. - [PgFlow.Schema.Worker](PgFlow.Schema.Worker.md): Schema for the pgflow.workers table. - [PgFlow.Signal.Notify](PgFlow.Signal.Notify.md): Manages PostgreSQL LISTEN/NOTIFY for pgmq queue notifications. - [PgFlow.Sql.Splitter](PgFlow.Sql.Splitter.md): Splits a raw PostgreSQL script into individual top-level statements. - [PgFlow.Supervisor](PgFlow.Supervisor.md): Main supervisor for PgFlow components. - [PgFlow.Telemetry](PgFlow.Telemetry.md): Telemetry events emitted by PgFlow. - [PgFlow.Telemetry.PubSub](PgFlow.Telemetry.PubSub.md): Bridges PgFlow telemetry events to Phoenix.PubSub. - [PgFlow.Worker.Executor](PgFlow.Worker.Executor.md): Task execution logic for flow steps. - [PgFlow.Worker.Lifecycle](PgFlow.Worker.Lifecycle.md): Worker lifecycle state machine. - [PgFlow.Worker.Server](PgFlow.Worker.Server.md): GenServer that polls pgmq and executes flow tasks. - [PgFlow.Worker.StalledTaskRecovery](PgFlow.Worker.StalledTaskRecovery.md): Periodically recovers stalled tasks stuck in 'started' status. - [PgFlow.WorkerSupervisor](PgFlow.WorkerSupervisor.md): Supervisor for PgFlow workers. - [PgFlowDashboard](PgFlowDashboard.md): A Phoenix LiveView dashboard for monitoring PgFlow workflow execution. - [PgFlowDashboard.Cache.MetricsCache](PgFlowDashboard.Cache.MetricsCache.md): ETS-based cache for expensive dashboard aggregations. - [PgFlowDashboard.Components.DataTable](PgFlowDashboard.Components.DataTable.md): Sortable, filterable data table component. - [PgFlowDashboard.Components.DependencyGraph](PgFlowDashboard.Components.DependencyGraph.md): Server-rendered SVG DAG visualization component. - [PgFlowDashboard.Components.GanttTimeline](PgFlowDashboard.Components.GanttTimeline.md): Gantt timeline component showing step execution timing within a run. Renders as SVG for crisp visuals and easy theming. - [PgFlowDashboard.Components.HealthBadge](PgFlowDashboard.Components.HealthBadge.md): Health status badge component for workers. - [PgFlowDashboard.Components.Layouts](PgFlowDashboard.Components.Layouts.md): Layout components for the PgFlow Dashboard. - [PgFlowDashboard.Components.MetricCard](PgFlowDashboard.Components.MetricCard.md): Dashboard metric card component. - [PgFlowDashboard.Components.ProgressBar](PgFlowDashboard.Components.ProgressBar.md): Progress bar component for run progress visualization. - [PgFlowDashboard.Components.RunHistoryGrid](PgFlowDashboard.Components.RunHistoryGrid.md): GitHub-style activity grid showing run history by step. - [PgFlowDashboard.Components.StatusBadge](PgFlowDashboard.Components.StatusBadge.md): Status badge component with WCAG AA compliant colors. - [PgFlowDashboard.Components.TypeBadge](PgFlowDashboard.Components.TypeBadge.md): Type badge component for distinguishing between flows, jobs, and crons. - [PgFlowDashboard.Config](PgFlowDashboard.Config.md): Configuration validation and management for PgFlowDashboard. - [PgFlowDashboard.Hooks](PgFlowDashboard.Hooks.md): JavaScript hooks for PgFlow Dashboard. - [PgFlowDashboard.Live.CronsLive.Index](PgFlowDashboard.Live.CronsLive.Index.md): Crons list page with statistics and schedule info. - [PgFlowDashboard.Live.CronsLive.Show](PgFlowDashboard.Live.CronsLive.Show.md): Cron detail page with schedule info, run history grid, and recent runs table. - [PgFlowDashboard.Live.FlowsLive.Index](PgFlowDashboard.Live.FlowsLive.Index.md): Flows list page with statistics. - [PgFlowDashboard.Live.FlowsLive.Show](PgFlowDashboard.Live.FlowsLive.Show.md): Flow detail page with dependency graph and run history grid. - [PgFlowDashboard.Live.JobsLive.Index](PgFlowDashboard.Live.JobsLive.Index.md): Jobs list page with statistics. - [PgFlowDashboard.Live.JobsLive.Show](PgFlowDashboard.Live.JobsLive.Show.md): Job detail page with run history grid and recent runs table. - [PgFlowDashboard.Live.LiveHelpers](PgFlowDashboard.Live.LiveHelpers.md): Shared hooks and utilities for PgFlowDashboard LiveViews. - [PgFlowDashboard.Live.OverviewLive](PgFlowDashboard.Live.OverviewLive.md): Overview dashboard page showing key metrics and recent activity. - [PgFlowDashboard.Live.RunsLive.Index](PgFlowDashboard.Live.RunsLive.Index.md): Runs list page with LiveFilter-based filtering. - [PgFlowDashboard.Live.RunsLive.Show](PgFlowDashboard.Live.RunsLive.Show.md): Run detail page with step states and dependency graph. - [PgFlowDashboard.Live.WorkersLive](PgFlowDashboard.Live.WorkersLive.md): Workers monitoring page. - [PgFlowDashboard.Live.WorkersLive.Show](PgFlowDashboard.Live.WorkersLive.Show.md): Worker detail page showing worker info and task history. - [PgFlowDashboard.Migration](PgFlowDashboard.Migration.md): Manages PgFlowDashboard database migrations with version tracking. - [PgFlowDashboard.Migrations.Versions.V01](PgFlowDashboard.Migrations.Versions.V01.md): PgFlowDashboard migration version 1. - [PgFlowDashboard.Queries.Crons](PgFlowDashboard.Queries.Crons.md): Database queries for cron-related data. - [PgFlowDashboard.Queries.Flows](PgFlowDashboard.Queries.Flows.md): Database queries for flow-related data. - [PgFlowDashboard.Queries.Jobs](PgFlowDashboard.Queries.Jobs.md): Database queries for job-related data. - [PgFlowDashboard.Queries.Metrics](PgFlowDashboard.Queries.Metrics.md): Database queries for dashboard metrics with caching. - [PgFlowDashboard.Queries.Runs](PgFlowDashboard.Queries.Runs.md): Database queries for run-related data. - [PgFlowDashboard.Queries.Workers](PgFlowDashboard.Queries.Workers.md): Database queries for worker-related data. - [PgFlowDashboard.Router](PgFlowDashboard.Router.md): Router macro for mounting the PgFlow Dashboard. - [PgFlowDashboard.Schemas.Run](PgFlowDashboard.Schemas.Run.md): Schema for the pgflow_dashboard.runs_view view. - [PgFlowDashboard.Supervisor](PgFlowDashboard.Supervisor.md): Supervisor for PgFlowDashboard processes. ## Mix Tasks - [mix pgflow.check_schema](Mix.Tasks.Pgflow.CheckSchema.md): Verifies that the pgflow database schema exists and is compatible with this version of the Elixir implementation. - [mix pgflow.gen.flow_migration](Mix.Tasks.Pgflow.Gen.FlowMigration.md): Generates an Ecto migration that registers a PgFlow flow in the database. - [mix pgflow.gen.helpers_migration](Mix.Tasks.Pgflow.Gen.HelpersMigration.md): Generates an Ecto migration that installs PgFlow's extension SQL functions. - [mix pgflow.gen.job_migration](Mix.Tasks.Pgflow.Gen.JobMigration.md): Generates an Ecto migration that registers a PgFlow job in the database. - [mix pgflow.gen.pgmq_migration](Mix.Tasks.Pgflow.Gen.PgmqMigration.md): Downloads the pgmq SQL-only install bundle from the official pgmq/pgmq repository at task-runtime, persists it into the consuming app's `priv/` tree, and generates an Ecto migration that applies it. - [mix pgflow.gen.postgres_extensions_migration](Mix.Tasks.Pgflow.Gen.PostgresExtensionsMigration.md): Generates a single Ecto migration that runs `CREATE EXTENSION` for the Postgres extensions pgflow relies on. - [mix pgflow.setup](Mix.Tasks.Pgflow.Setup.md): Generates an Ecto migration in the consumer app that installs the pgflow schema by calling `PgFlow.Migration.up/0` and `PgFlow.HelpersMigration.up/0` (and optionally `PgFlowDashboard.Migration.up/0`) in the correct order. - [mix pgflow.stamp](Mix.Tasks.Pgflow.Stamp.md): Marks an existing pgflow schema as installed under EctoEvolver's tracking model without re-running V01 DDL. - [mix pgflow.test.reset](Mix.Tasks.Pgflow.Test.Reset.md): Resets the test database by stopping and restarting containers. - [mix pgflow.test.setup](Mix.Tasks.Pgflow.Test.Setup.md): Sets up the test database by starting Docker containers and running migrations. - [mix pgflow.test.teardown](Mix.Tasks.Pgflow.Test.Teardown.md): Stops and removes the test database Docker containers. - [mix pgflow_dashboard.gen.indexes](Mix.Tasks.PgflowDashboard.Gen.Indexes.md): Generates an Ecto migration that adds performance indexes to pgflow tables for faster dashboard queries. - [mix pgflow_dashboard.gen.migration](Mix.Tasks.PgflowDashboard.Gen.Migration.md): Generates an Ecto migration that installs PgFlowDashboard.