Setup user invite system into team?

Hi Everyone,
I’m working on my new app and wanted to know the correct approach or best practices for setting up user invites using coherence hex package

i.e. user X can create a team and then invite user Y and Z once user Y and Z create their account they belong to the team user X created.

You can add your own logic to coherence.

One approach is that you can import the Coherence Controller to your application and modify this version adding your own business logic. You can use --controller with the coh.install command. Check Coherence documentation: Coherence Installer Documentation

Take into consideration this note:

Important: Note the name-spacing above. Unless you generate coherence controllers, ensure that the scopes, scope “/” do, do not include your projects’ scope here. If so, the coherence routes will not work!

You will find your coherence controllers inside your contorollers folder.

I am sure there are other ways to do it but the important point is that you can add you own logic. You can also find the Coherence library in deps/coherence and modify that code. If you do this, for changes to apply run:

mix deps.compile coherence

One additional tip: you can just copy the coherence controller to your project from “deps/coherence/lib/coherence/controllers/” to lib/YourApp_web/controllers/coherence/ and consider the note stated above.

Hope this help…