I've mainly used sinatra and rails for Web apps and always found it difficult to define a clear api on which the frontend was based on (I.e in order later to build ios or android apps off).
Using Node-Red forced me to build an api for the frontend, the frontend has no direct contact with postgres.
Plus I found it to be more flexible than directly coding when I wasn't even sure what the database schema would look like.
Database modelling was done with pgModeler, I.e. No migrations and more pgsql functions and triggers.