How to Use Igniter to Rename Application and Database Names in a Phoenix Project

Hi everyone,

I’m looking for guidance on using Igniter to rename both the application name(and its namespace) and database name in a Phoenix project. Could someone share a step-by-step guide or point me to resources to get started with this?

Context
I’m working on a project called Helpcenter to showcase how to use Ash and its powerful features. Along the way I realised that I can make it even more useful to developers by converting it into a starter kit that developers can clone and have:

  1. Ash, Phoenix, SaladUI, and Oban pre-configured.
  2. A UI for managing teams, users, and permissions.
  3. Features like user invites and more.

The idea is simple: a developer clones the repo, runs a command to rename the app and database, and then focuses on building their unique features.

I found this shell script online for renaming, but I’d love to achieve this using Igniter instead for a smoother, more integrated experience.

Any tips, examples, or resources on how to set this up with Igniter would be greatly appreciated!

Thanks,

I would suggest not doing this via cloning repositories, but by composing installers on top of existing apps. Then you never need to rename an app :slight_smile:

1 Like

Thanks @zachdaniel .
I am happy to explore that path. Do you have any online resource(articles, documentation, repository) I can look at to get started?

First - thank you for your medium series.. it helped me a lot when I started with Ash and I recommend to anyone reading this!

I write the following not from knowledge - but in the hope I get corrected, so take with a large grain of salt :slight_smile:

My (limited) understanding of the ash installer it that its an igniter wrapper around the phoenix express installer, found at:
https://new.phoenixframework.org/myapp

The docs for express say: ‘Your Phoenix application name is taken from the path.’ So I assume that is passed through a plug as a path segment.

The ash installer passes the rest of the igniter tasks as query parameters ‘?install=phoenix,ash_admin’

I am naively assuming that igniter could also write the ash.gen tasks to compose domains & resources and gen seeds too if needed… ?

Igniter docs: mix igniter.install — igniter v0.5.51

1 Like

Thank you for the kind words! It means a lot to me. I will look into the links you shared.

1 Like

I’d suggest taking a look at the igniter installers for various projects to get a sense for it, and how the ash-hq.org installer composes igniter installers.

You can see the list of packages that use igniter via seeing what depends on it in hex.

2 Likes

there is also rename project lib

2 Likes