Skip to content

Manufacturing 0.2.0: A reference book of production machines for PhoenixKit

Manufacturing 0.2.0 is the first Hex release of the PhoenixKit manufacturing module. It adds a Manufacturing section to the admin with a reference book of production machines, the machine types they belong to and a dashboard.

Machines

The Machines page lists the machines and opens a form for each one. A machine has a name, a code (for example an inventory number such as M-001), a manufacturer, a serial number, a description, a location note and a status: Active, Maintenance or Decommissioned. A free-form data field is stored with each machine for passport and spec values, though the form does not edit it yet. Creating, editing and deleting a machine or a type is written to the activity log.

Machine types

Machine types, such as CNC, milling, press or laser cutter, are a small directory of their own on the Types page. A type has a name and a description in each of the site’s languages, and a status of Active or Inactive. Inactive types are not offered when choosing types for a machine. A machine can have several types, picked on its form with a click on each one. Deleting a type removes it from the machines that used it.

Dashboard

The Dashboard shows how many machines and machine types there are. A third tile, Production Orders, says Coming soon: production orders are not part of this release.

Installing

Add {:phoenix_kit_manufacturing, "~> 0.2"} to your app’s dependencies and run mix phoenix_kit.update, which creates the module’s three tables: machines, machine types and the links between them. Then enable Manufacturing under Admin → Modules. The module needs PhoenixKit core 1.7.133 or later.

Full release notes: Manufacturing 0.2.0

0.2.0 · 10 July 2026

Added

  • Machines reference book — full CRUD for manufacturing machines and their (many-to-many) machine types.
    • Machine schema: name, code, manufacturer, serial number, description, location note, status (active / maintenance / decommissioned), plus data (multilang) and freeform metadata JSONB columns.
    • MachineType schema: name, description, status (active / inactive), multilang data.
    • MachineTypeAssignment join schema with FK assoc_constraints.
  • PhoenixKitManufacturing.Machines context — list/get/count/create/update/ delete for machines and types, many-to-many type sync in a transaction, and guarded activity logging under the "manufacturing" module key.
  • Admin UI: MachinesLive (machines + types lists), MachineFormLive (core inputs + click-to-toggle type picker), and MachineTypeFormLive (multilang name/description via core MultilangForm).
  • Module-owned database tables via migration_module/0 (PhoenixKitManufacturing.Migrations.Machines) — the host applies them by running mix phoenix_kit.update.
  • Admin nav: the Manufacturing tab now carries Dashboard, Machines and Types subtabs (plus hidden create/edit form routes).
  • Dashboard now shows live machine / machine-type counts (loaded in handle_params/3, degrading to — when the tables have not been migrated yet).
  • PhoenixKitManufacturing.Errors — centralized error-atom → message mapping.
  • i18n: gettext catalog re-synced to cover all module strings — complete English (source) and Russian translations, plus an Estonian subset (the remainder falls back to English).
  • Module infrastructure: LICENSE, CHANGELOG.md, config/, test suite, and AGENTS.md.

Changed

  • enable_system/0 / disable_system/0 now log the module toggle through the context (Machines.log_module_toggle/1), which records the module key and degrades gracefully when core’s activity table is missing.
  • mix.exs: phoenix_kit now resolves via the pk_dep/3 helper (honours PHOENIX_KIT_PATH for local cross-repo work); bumped phoenix_live_view to ~> 1.1; added test.setup / test.reset aliases and the lazy_html test dependency.

Manufacturing 0.2.0. Install or update: {:phoenix_kit_manufacturing, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.