PhoenixKitCRM

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

This is an early skeleton scaffolded from phoenix_kit_hello_world. The Companies subtab is a placeholder until the legal-entity schema lands; roles and per-user view configuration are already wired up.

Features

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

Path LiveView
/admin/crmPhoenixKitCRM.Web.CRMLive
/admin/crm/companiesPhoenixKitCRM.Web.CompaniesView
/admin/crm/role/:role_uuidPhoenixKitCRM.Web.RoleView
/admin/settings/crmPhoenixKitCRM.Web.SettingsLive

The Companies and per-role routes are gated by settings — the section appears only after it's toggled on under Admin > Settings > CRM.

Database

Two module-owned tables are required:

Following the PhoenixKit convention, migrations live in phoenix_kit core, 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
mix test.setup      # ecto.create + ecto.migrate against the test repo

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

License

MIT — see LICENSE.