Skip to content

Entities 0.1.0: Custom content types as a standalone PhoenixKit module

Entities 0.1.0 moves PhoenixKit’s content type builder into its own package. Admins define their own kinds of records, such as products, team members or events, with the fields they need, and manage them in the admin without new code or migrations.

Entities and fields

An entity is a content type with a name, a singular and plural label, an icon, a description and a status: draft, published or archived. Its fields come from twelve types: Text, Text Area, Email, URL, Rich Text Editor, Number, Boolean, Date, Select Dropdown, Radio Buttons, Checkboxes and File Upload. Rich text is cleaned of unsafe HTML before it is stored.

Records

Each entity gets its own entry under Entities in the admin menu, named after its plural label, where its records are listed, filtered, created and edited. A record has a title, a slug, a status and the values of the entity’s fields. Records can be sorted by date or put in a manual order. With two or more site languages, entity labels and record values can be entered per language.

When two admins open the same record, the first one edits and the others see it read-only until the first leaves, so changes do not overwrite each other.

Public forms

An entity can be shown as a form on a public page. Submissions go to /entities/<entity>/submit and are stored as records. The form is protected by a hidden honeypot field, a minimum time before it can be sent, and a limit of five submissions per minute.

Sitemap and file mirror

Entities with published records are included in the site’s sitemap by default. Entity definitions and records can also be mirrored to JSON files: Settings > Entities turns definition and record sync on per entity and has Export now, and mix phoenix_kit_entities.export and mix phoenix_kit_entities.import do the same from the command line.

Upgrading

Add {:phoenix_kit_entities, "~> 0.1"} to the app’s dependencies and run mix deps.get; the module is found automatically. A site that already used Entities inside PhoenixKit keeps its data: the module uses the same phoenix_kit_entities and phoenix_kit_entity_data tables, and its migration only creates them if they are missing. Turn the module on in Settings > Entities with Enable System.

Full release notes: Entities 0.1.0

0.1.0 · 24 March 2026

Added

  • Extract Entities module from PhoenixKit into standalone phoenix_kit_entities package
  • Implement PhoenixKit.Module behaviour with all required callbacks
  • Add PhoenixKitEntities schema for dynamic entity definitions with JSONB field schemas
  • Add PhoenixKitEntities.EntityData schema for data records with JSONB field values
  • Add PhoenixKitEntities.FieldTypes registry with 12 supported field types
  • Add PhoenixKitEntities.FormBuilder for dynamic form generation and validation
  • Add PhoenixKitEntities.Events PubSub helpers for entity/data lifecycle events
  • Add PhoenixKitEntities.Presence and PresenceHelpers for collaborative editing with FIFO locking
  • Add admin LiveViews: Entities, EntityForm, DataNavigator, DataForm, EntitiesSettings
  • Add route module with admin_routes/0, admin_locale_routes/0, and public form routes
  • Add css_sources/0 for Tailwind CSS scanning support
  • Add migration module (v1) with IF NOT EXISTS for both tables (run by parent app)
  • Add public form component with honeypot, time-based validation, and rate limiting
  • Add sitemap integration for published entity data
  • Add filesystem mirroring (export/import) with mix tasks
  • Add multi-language support (auto-enabled with 2+ languages)
  • Add behaviour compliance test suite
  • Add unit tests for changesets, field types, events, form validation, HTML sanitization, multilang

Entities 0.1.0. Install or update: {:phoenix_kit_entities, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.