Phoenix Blog Post: Build your custom Phoenix phx.new generator

I’m showing you how you can customise the phx.new generator to give you a new Phoenix project the way YOU want it. In this post I show you an example of how we can add Oban preinstalled and configured to new Phoenix projects.

8 Likes

Would love to hear what others think :slight_smile: Is this crazy to do or can it make sense?

Nice article! I was working on a project around this called Vials. It sort of fell by the wayside when I started working again as I stopped calling mix phx.new so much tho I oddly started up on it again this week. I haven’t pushed anything in a while and there is an error in one of the examples in the readme :man_facepalming: but as someone who has clearly thought a lot about this as well, I’d be interested to know what you think of this approach! It is a working state but needs some polish.

3 Likes

Wow, that looks really cool. It is a different approach than mine in the sense you are using macros to tweak the generators.

1 Like

makes sense if you have a site or app factory doing the same pattern over and over (I guess its obviously a comment)

in other ecosystems such as Drupal for instance, they have an Installation Profile and a Distribution concept and platforms like Acquia and Aegir can manage these site/app factories

platforms like Pantheon allow Drupal distributions to have a git upstream, so you can keep a core distro updated from an upstream proprietary or open source community distribution PLUS maintain a custom code and config

so, THANKS

1 Like