PhoenixKitCRM

CRM module for PhoenixKit — implements the PhoenixKit.Module behaviour for auto-discovery by a parent Phoenix application.

An interaction-tracking CRM: contacts (people) and companies (legal entities), the interactions logged between them, each with its own media, comments, and activity feed. Roles opt in to CRM access, and every admin gets per-user column configuration.

Features

Files/Images tabs require core Storage to be enabled; the Comments tab requires the phoenix_kit_comments module.

Installation

Add to the parent PhoenixKit app's mix.exs:

# Local development
{:phoenix_kit_crm, path: "../phoenix_kit_crm"}
# or, once published / pinned to a tag
{:phoenix_kit_crm, "~> 0.1"}

Then mix deps.get. The module appears in Admin > Modules and the sidebar automatically; toggle it on to expose /admin/crm.

Routes

PathLiveView
/admin/crmPhoenixKitCRM.Web.CRMLive
/admin/crm/contactsPhoenixKitCRM.Web.ContactsLive
/admin/crm/contacts/new · /:uuid/editPhoenixKitCRM.Web.ContactFormLive
/admin/crm/contacts/:uuidPhoenixKitCRM.Web.ContactShowLive
/admin/crm/companiesPhoenixKitCRM.Web.CompaniesLive
/admin/crm/companies/new · /:uuid/editPhoenixKitCRM.Web.CompanyFormLive
/admin/crm/companies/:uuidPhoenixKitCRM.Web.CompanyShowLive
/admin/crm/organizationsPhoenixKitCRM.Web.OrganizationsView
/admin/crm/role/:role_uuidPhoenixKitCRM.Web.RoleView
/admin/settings/crmPhoenixKitCRM.Web.SettingsLive

The CRM section appears only after the module is toggled on under Admin > Settings > CRM; per-role subtabs appear for each opted-in role.

Database

The module's tables live in phoenix_kitcore (the CRM tables migration), per the PhoenixKit convention — not in this repo:

The parent app applies them via mix phoenix_kit.install / mix phoenix_kit.update.

Settings keys

Development

mix deps.get
mix compile
mix test # unit tests; integration tests excluded if no DB
mix precommit # compile + format + credo --strict + dialyzer

For integration tests, create the test database once:

createdb phoenix_kit_crm_test

The CRM's tables migration ships in phoenix_kit core. Until that core release is published, run the suite against a local core checkout so the test DB migrates to the version that has the CRM tables:

PHOENIX_KIT_PATH=../phoenix_kit mix test

With PHOENIX_KIT_PATH unset, the published Hex pin is used (publish/CI-safe).

See AGENTS.md for the development conventions, file layout, and testing setup.

License

MIT — see LICENSE.