pgflow's Avatar

pgflow

@pgflow.bsky.social

Postgres-centric workflow Engine with deep Supabase integration. https://pgflow.dev

15 Followers  |  18 Following  |  28 Posts  |  Joined: 19.01.2025  |  1.7915

Latest posts by pgflow.bsky.social on Bluesky

how it compares to Manjaro?

05.06.2025 20:12 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Tagging @supabase.com so it does not get missed :-)

24.03.2025 11:02 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Example code snippet:

// Provide a type for the input of the Flow
type Input = {
  url: string;
};

export const AnalyzeWebsite = new Flow<Input>({
  slug: 'analyze_website',
  maxAttempts: 3,
  baseDelay: 5,
  timeout: 10,
})
  .step(
    { slug: 'website' },
    async (input) => await scrapeWebsite(input.run.url)
  )
  .step(
    { slug: 'sentiment', dependsOn: ['website'], timeout: 30, maxAttempts: 5 },
    async (input) => await analyzeSentiment(input.website.content)
  )
  .step(
    { slug: 'summary', dependsOn: ['website'] },
    async (input) => await summarizeWithAI(input.website.content)
  )
  .step(
    { slug: 'saveToDb', dependsOn: ['sentiment', 'summary'] },
    async (input) => {
      const results = await saveToDb({
        websiteUrl: input.run.url,
        sentiment: input.sentiment.score,
        summary: input.summary.aiSummary,
      });
      return results.status;
    }
  );

Example code snippet: // Provide a type for the input of the Flow type Input = { url: string; }; export const AnalyzeWebsite = new Flow<Input>({ slug: 'analyze_website', maxAttempts: 3, baseDelay: 5, timeout: 10, }) .step( { slug: 'website' }, async (input) => await scrapeWebsite(input.run.url) ) .step( { slug: 'sentiment', dependsOn: ['website'], timeout: 30, maxAttempts: 5 }, async (input) => await analyzeSentiment(input.website.content) ) .step( { slug: 'summary', dependsOn: ['website'] }, async (input) => await summarizeWithAI(input.website.content) ) .step( { slug: 'saveToDb', dependsOn: ['sentiment', 'summary'] }, async (input) => { const results = await saveToDb({ websiteUrl: input.run.url, sentiment: input.sentiment.score, summary: input.summary.aiSummary, }); return results.status; } );

A flowchart showing data from a website being processed through both sentiment analysis and summary generation, with the results from both paths being saved to a database.

A flowchart showing data from a website being processed through both sentiment analysis and summary generation, with the results from both paths being saved to a database.

Just merged the new Flow DSL in pgflow! ๐Ÿš€

Next up: Edge Worker refactor to make it run flows defined with the DSL.

Check out the snippet for a simple AI web-scraping flow. ๐Ÿค–

24.03.2025 11:01 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I also talked through millions of LLM tokens (I brainstorm a lot) and I have concrete implementation plans for:
- fanout steps
- conditional steps (every step type will have conditions)
- subflows and fanout subflows
(but those will be included after the initial MVP is released).

#Postgres #SQL

11.03.2025 19:17 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

It is a productive week so far for my @supabase.com
workflow engine:

- defining flows, steps, and dependencies
- starting flows, queuing stuff
- polling for tasks
- completing tasks
- dependency resolution
- 1000 lines of tests

11.03.2025 19:17 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

What models do you prefer?

For brainstorming and planning I often use ones with reasoning - either Deepseek R1 or O3 mini.

06.03.2025 16:19 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Also - anyone having troubles with images on bluesky? When i paste one it becomes black (tested on firefox, chromium and chrome)....

06.03.2025 09:23 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Balancing the simplicity of the low-level SQL functions with the flexibility demanded by high-level pipeline types will be critical for the long-term success of pgflow.

06.03.2025 09:23 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

However, careful attention must be paid to maintaining clean abstraction boundaries, preparing for schema evolution, and designing robust integrations with external workers and (potentially) UI layers.

06.03.2025 09:23 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

- Simplified, auditable, and maintainable low-level primitives.
- The ability for rapid MVP delivery while keeping the door open for sophisticated pipelines (e.g., foreach, parallel, and conditional processing).
- Enhanced developer experience through strong typing and better tooling in TypeScript.

06.03.2025 09:23 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Produced by o3-mini from a huge prompt and lot of SQL migrations in context:

5. Conclusion

The proposed design of pgflowโ€”using a minimal, declarative SQL orchestration layer as building blocks in combination with a high-level, expressive TypeScript DSLโ€”offers significant advantages:

06.03.2025 09:23 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Brainstorming & viability checks with LLMs - anyone else doing this? ๐Ÿค” Curious to see how common it is! (recent conclusion in the reply!)

#LLM #buildinpublic #AI #supabase #postgres

06.03.2025 09:23 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 2    ๐Ÿ“Œ 0

Pros:
โœ… Faster queries
โœ… Automatic updates
โœ… Data consistency

Cons:
โŒ Extra storage space
โŒ Slower writes
โŒ Limited to simple expressions

04.03.2025 16:02 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

๐Ÿ˜ Postgres Tip: ๐—š๐—˜๐—ก๐—˜๐—ฅ๐—”๐—ง๐—˜๐—— ๐—ฐ๐—ผ๐—น๐˜‚๐—บ๐—ป๐˜€

Generated columns are a powerful PostgreSQL feature that automatically update based on changes to underlying data, ensuring your calculated values always stay current.

Useful for storing frequently computed values.

#Postgres #PostgreSQL #Supabase

04.03.2025 16:02 โ€” ๐Ÿ‘ 3    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

I spent last month on:

โœ… Learning how to tweet, gaining 130+ followers (thank you ๐Ÿ™‡๐Ÿป)
โœ… Refining Edge Worker
โœ… Improving docs and SEO
โœ… Testing big, continuous workloads on hosted @supabase.com
โœ… Suffering through a massive flu ๐Ÿคง

This was enough chores - excited for main part now! โœจ

03.03.2025 17:15 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

โœ‚๏ธ Time to extract pgflow! ๐Ÿš€

I'm starting March with a laser focus: ๐—ฆ๐—ต๐—ถ๐—ฝ๐—ฝ๐—ถ๐—ป๐—ด ๐—ฝ๐—ด๐—ณ๐—น๐—ผ๐˜„ ๐—ฎ๐—น๐—ฝ๐—ต๐—ฎ ๐—”๐—ฆ๐—”๐—ฃ! ๐Ÿšข

I also plan to post some technical findings, snippets and ideas, mostly around queues and SQL, so if you are interested in this kind of stuff, watch this space! ๐Ÿ”ญ

#supabase #buildinpublic

03.03.2025 17:15 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Flu's been "in production" for days. Constantly hitting CPU clock limits (zero focus), and my runny nose desperately needs horizontal scaling for tissues. Needing an emergency patch ASAP! ๐Ÿคข

25.02.2025 14:35 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image Post image Post image

๐Ÿš€ Edge Worker ๐—ฝ๐—ฟ๐—ผ๐—ฐ๐—ฒ๐˜€๐˜€๐—ฒ๐—ฑ ๐Ÿณ.๐Ÿฏ๐Ÿณ ๐— ๐—œ๐—Ÿ๐—Ÿ๐—œ๐—ข๐—ก ๐—ท๐—ผ๐—ฏ๐˜€ ๐—ถ๐—ป ๐Ÿญ๐Ÿฒ ๐—ต๐—ผ๐˜‚๐—ฟ๐˜€!

I'm testing production deployments and continuous operations on the @supabase.com FREE tier:

๐Ÿ”ฅ ๐Ÿฏ ๐—ฎ๐—ฐ๐˜๐—ถ๐˜ƒ๐—ฒ ๐˜„๐—ผ๐—ฟ๐—ธ๐—ฒ๐—ฟ๐˜€ (kept up by pg_cron)
โš™๏ธ ๐Ÿญ๐Ÿญ,๐Ÿฌ๐Ÿฌ๐Ÿฌ unique Edge Function instances spun up
โšก ๐Ÿญ๐Ÿฎ๐Ÿด ๐—ท๐—ผ๐—ฏ๐˜€/๐˜€๐—ฒ๐—ฐ average throughput

It runs perfectly fin

22.02.2025 15:03 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

๐Ÿš€ ๐—˜๐—ฑ๐—ด๐—ฒ ๐—ช๐—ผ๐—ฟ๐—ธ๐—ฒ๐—ฟ ๐˜ƒ๐Ÿฌ.๐Ÿฌ.๐Ÿฐ ๐—ถ๐˜€ ๐—ผ๐˜‚๐˜!

v0.0.3 had a pretty bad bugโ€”production deployments didn't work because I mistakenly tested a development version in the cloud, instead of the JSR package.

It's fixed now (live on JSR). If you run into issues, please try again!

I appreciate everyoneโ€™s interestโ€”your eng

20.02.2025 12:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Tough one... The feature is already validated, and landing page will probably get validated only when ready - I would vote for the feature!

29.01.2025 17:28 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Adding a second example that is more straight forward with the types, thanks for the heads up!

29.01.2025 08:22 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image

We all love using #TypeScript with @supabase.com ! โœจ

Flow DSL makes it super simple to define flows:
- Type for Flow params (e.g "string")
- Build flow step by step
- Steps have name, optional deps & handler func
- Dependencies determine handler payload

It couldn't be simpler - change my mind! ๐Ÿš€

28.01.2025 16:05 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Yes! There was a bug with starting root steps (ones without dependencies).

Kudos for noticing!

28.01.2025 11:56 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Video thumbnail

I'm building pgflow to seamlessly integrate with @supabase
's building blocks.

That's why the flow shapes are kept in the database - this allows streaming their progress using Supabase Realtime! โšก How cool is that?

November prototype (can anyone spot a little bug?):

27.01.2025 14:49 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Those are good times to be building stuff!

26.01.2025 11:33 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

That must feel extremely satisfying! Hope to reach that place at some point myself. Good luck!

26.01.2025 11:23 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
EdgeRuntime.waitUntil(new Promise(() => {}));

EdgeRuntime.waitUntil(new Promise(() => {}));

pgflow is not an empty promise #supabase

24.01.2025 02:38 โ€” ๐Ÿ‘ 3    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Edge Worker

Excited to share Edge Worker PoC! Built on top of @supabase.com Background Tasks to make your PGMQ queue processing easier with automatic retries, concurrency limits and observability. Learn more at pgflow.dev โœจ

#postgres #sql #pgmq #supabase

22.01.2025 23:43 โ€” ๐Ÿ‘ 4    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@pgflow is following 18 prominent accounts