A Phoenix LiveView application that demonstrates PgFlow with a real-time article processing workflow.
fetch_article → convert_to_markdown → summarize → publish
↘ extract_keywords ↗
# 1. Start database (from root pgflow directory)
cd ..
docker compose up -d
cd demo
# 2. Install dependencies
mix deps.get
# 3. Create database and run committed migrations
mix ecto.create
mix ecto.migrate
# 4. Setup assets
mix assets.setup
# 5. Configure your LLM API key (see "LLM configuration" below)
cp .env.sample .env
$EDITOR .env
# 6. Run the server (or `pgflow start` from the repo root for hivemind + docker)
mix phx.serverThe demo keeps its historical committed migrations for Postgres extensions, pgmq,
pgflow setup, flow/job compilation, and dashboard upgrades. Do not regenerate
duplicate setup or definition migrations on existing databases. The committed
upgrade_pgflow_upstream_alignment wrapper advances core V02, helpers V05, and
dashboard V04; add_pgflow_helpers_v06 then adds stalled-task escalation and
the pgflow.step_progress view.
On fresh databases, mix ecto.migrate replays the full chain. On existing
installations, Ecto runs only the pending migrations.
- Demo app: http://localhost:4022
- PgFlow Dashboard: http://localhost:4022/pgflow
Executable scenarios are documented in docs/SCENARIOS.md.
Baseline verification uses the same ScenarioRunner as the LiveView UI and
requires no network or LLM credentials:
MIX_ENV=test mix pgflow_demo.verify_scenariosArticle/LLM integration is opt-in (--include-llm) and never required for CI.
The demo temporarily uses {:pgflow, path: ".."} in every Mix environment
while the 0.5.0 release is being tuned. Production-mode verification must run
from the demo directory with the parent checkout available:
MIX_ENV=prod mix compile --warnings-as-errorsProduction refuses to boot unless its PgFlow dependency includes core V02 and helpers V06. The demo-only Docker context contains no parent checkout, so its image build cannot resolve the temporary path dependency. Include the parent checkout in that context or return to a Hex dependency after publication.
From demo/:
mix precommit
mix assets.build
MIX_ENV=test mix pgflow_demo.verify_scenarios
MIX_ENV=prod mix compile --warnings-as-errorsThe summarize and extract_keywords steps call DeepSeek V3.2 on
Fireworks AI through ReqLLM by default.
- Get a key at https://fireworks.ai/account/api-keys (looks like
fw_...). cp .env.sample .envand setAI_API_KEY=fw_....
.env is gitignored. runtime.exs loads it via dotenvy.
