Modules
Catalogue module for PhoenixKit.
PhoenixKitAI.Translatable adapter for catalogue resources —
the small per-module hook into PhoenixKitAI's generic AI-translation pipeline.
PhoenixKitAI.Components.AITranslate.FormBinding for catalogue forms —
the storage-specific half of the shared AI-translate glue.
Folder-scoped file attachments + featured image for catalogue resources (items and catalogues share the exact same pattern).
Context module for managing catalogues, manufacturers, suppliers, categories, and items.
Catalogue-level item and category counts. Includes both per-uuid helpers and single-query batch versions to avoid N+1 lookups when rendering catalogue lists with associated item / category counts.
Manufacturer ↔ Supplier many-to-many links.
Manufacturers — company directory used as the source of items.
PDF library — upload, extract, search.
Real-time fan-out for catalogue mutations.
Smart-catalogue rules — one row per (item, referenced_catalogue) pair.
Item search — global, per-catalogue, and per-category, with optional
scope composition (catalogue_uuids AND category_uuids).
Public smart-pricing evaluator — the canonical implementation of the
algorithm previously documented as a copy-paste reference in
guides/smart_catalogues.md.
Suppliers — delivery companies linked to manufacturers via the
many-to-many phoenix_kit_cat_manufacturer_suppliers table.
Multilang data JSONB helpers — read merged language data from a
record and write language-specific overrides through the entity's own
update function.
Central mapping from error atoms (returned by PhoenixKitCatalogue.Catalogue
and the import pipeline) to translated, user-facing strings.
Export context for the Catalogue module.
Behaviour for export destinations (e.g. PRO100, Universal).
PRO100 export destination.
Universal export destination.
Universal JSON export encoder.
Gettext backend for phoenix_kit_catalogue.
Import context: source registry (inbound mirror of Export).
Executes an import plan by creating categories and items.
Maps file columns to catalogue fields and transforms row data into validated item attribute maps ready for insertion.
Matches PRO100 rows to existing catalogue items by digits-only SKU. The index is built once over the selected catalogue's items; resolution is O(1).
Parses XLSX and CSV files into structured row data.
Parses the PRO100 fixed-layout text formats (# Parts / # Materials).
Builds the PRO100 sync diff/report: matched rows become per-field change sets
(base_price, materials unit) plus a data["pro100"] round-trip blob;
unmatched/ambiguous rows go to :skipped for the report. Pure — no DB.
Behaviour for import sources — the inbound mirror of Export.Destination.
PRO100 import source: fixed-layout # Parts / # Materials, update-by-id.
Universal import source: XLSX/CSV (existing parser) + JSON (export round-trip).
Global, code-defined list of metadata fields that catalogue resources (items and catalogues) can opt into.
Centralized path helpers for the Catalogue module.
PRO100 numeric id: the SKU reduced to digits only ("76.0026.12" ->
"76002612"). Shared by the PRO100 export (id column) and import (match key)
so the two never drift. nil/no-digit -> "".
Schema for catalogues — top-level groupings (e.g., Kitchen Furniture, Plumbing).
Smart-catalogue rule: one row per (item, referenced_catalogue) pair.
Schema for categories within a catalogue.
Schema for catalogue folders — a nesting layer for organizing catalogues on the admin index. Folders are module-global (not scoped to a catalogue) and are unrelated to the media-folder system.
Schema for catalogue items — individual products/materials with SKU and pricing.
Schema for manufacturers.
Join table linking manufacturers to suppliers (many-to-many).
Per-upload row in the catalogue's PDF library.
Extraction state for one unique PDF file content.
Per-page join row keyed by (file_uuid, page_number).
Content-addressed cache of PDF page text.
Schema for suppliers.
Detail view for a single catalogue, with infinite-scroll paging over its categories and items.
Create/edit form for catalogues with multilang support.
Landing page for the Catalogue module.
Create/edit form for categories within a catalogue.
Reusable UI components for the Catalogue module.
Combobox LiveComponent for picking a single item from the catalogue via server-side search.
LiveComponent that searches the PDF library for any page whose text matches one of the given item's translated names.
LiveView for the catalogue activity events subtab.
Stateless controller for the catalogue export download.
Export tab LiveView.
Tiny utilities shared by every catalogue LiveView. Imported into LVs
via the standard import PhoenixKitCatalogue.Web.Helpers line.
Multi-step import wizard for catalogue items.
Create/edit form for catalogue items with multilang support.
Create/edit form for manufacturers with supplier linking.
Single-PDF detail page. Shows metadata + extraction status, embeds
the vendored PDF.js viewer in an iframe pre-bound to the file and
the optional ?page=N URL param.
Admin index for the PDF library subtab.
Route module for PhoenixKit Catalogue admin routes.
Create/edit form for suppliers with manufacturer linking.
Column metadata for the catalogue admin tables, keyed by scope
(:catalogues, :suppliers, :manufacturers). Pure data — cell and
card rendering live in the LiveView. Labels are zero-arity fns so they
resolve in the request's current locale.
Pure, in-memory search → filter → sort pipeline over a list of row maps (catalogues/suppliers/manufacturers already loaded by the LiveView).
Toolbar pieces for the catalogue admin tables: the column-settings modal,
the sort select+direction control, and an enum filter select. All emit
plain events handled by CataloguesLive against the active scope.
Per-user table view config (columns / sort / filters / view mode) for the
catalogue admin tables. Stored in phoenix_kit_users.custom_fields under
the "catalogue_view_configs" key — no dedicated table. Precedent:
PhoenixKit.Notifications.Prefs.
Oban worker that extracts text page-by-page from a PDF using
pdfinfo (page count) + pdftotext (per-page text).