API Reference phoenix_kit v#1.7.110

Copy Markdown View Source

Modules

PhoenixKit

AWS credentials verification module.

Automated AWS infrastructure setup for email event handling.

AWS SES v2 API client for operations not supported by ExAws.

Activity feed for tracking business-level actions across the platform.

Schema for activity feed entries.

Oban worker that prunes old activity entries based on the configured retention period.

PubSub event broadcasting for PhoenixKit admin panels.

Phoenix.Presence implementation for tracking anonymous and authenticated sessions.

Simple presence tracking system for PhoenixKit admin interface.

Context for phoenix_kit_annotations — drawn-on-image shapes created via the Etcher overlay layer in the MediaBrowser modal.

Ecto schema for phoenix_kit_annotations.

OTP Application module for PhoenixKit.

Context for managing audit logs in PhoenixKit.

Schema for audit log entries.

Generic caching system for PhoenixKit with ETS-backed storage.

Lightweight Registry wrapper for PhoenixKit.Cache instances.

Configuration management system for PhoenixKit.

AWS configuration management for PhoenixKit.

Admin dashboard categories configuration and validation for PhoenixKit.

Syncs the site_url from PhoenixKit settings to the parent Phoenix Endpoint's :url configuration.

Ueberauth configuration management for PhoenixKit.

User dashboard categories configuration and validation for PhoenixKit.

User Dashboard Tab Management System.

Default admin navigation tabs for PhoenixKit.

Defines badge types for dashboard tab indicators.

Configuration and helpers for the dashboard context selector.

Struct representing a dashboard tab group.

Presence tracking for dashboard tabs.

Registry for managing dashboard tabs across the application.

Defines the Tab struct and related types for the user dashboard navigation system.

Shared helper functions for dashboard sidebar navigation.

No-op email provider. Used when phoenix_kit_emails package is not installed.

Unified email provider behaviour.

Installation helper for adding PhoenixKit supervisor to parent application. Used by mix phoenix_kit.install task.

Handles asset rebuilding for PhoenixKit installations and updates.

Installation helper for adding PhoenixKit supervisor to parent application. Used by mix phoenix_kit.install task.

Handles automatic integration of PhoenixKit plugs into the browser pipeline.

Common utilities shared between PhoenixKit installation and update tasks.

Handles automatic Tailwind CSS + DaisyUI integration for PhoenixKit installation.

Simple database connection check for PhoenixKit installation.

Handles copying demo test files for PhoenixKit installation.

Endpoint integration for PhoenixKit installation.

Handles automatic Finch and HTTP client setup for PhoenixKit installation.

Helper functions for working with Igniter to read and modify parent project configuration.

Helper functions for working with Igniter to detect parent application information.

Handles automatic JavaScript hooks integration for PhoenixKit installation.

Handles layout integration configuration for PhoenixKit installation.

Handles mailer configuration for PhoenixKit installation.

Handles migration strategy determination and execution for PhoenixKit installation.

Handles OAuth configuration for PhoenixKit installation.

Handles Oban configuration for PhoenixKit installation.

Handles Hammer rate limiter configuration for PhoenixKit installation.

Handles repository detection and validation for PhoenixKit installation.

Handles router integration for PhoenixKit installation.

Detects Phoenix runtime configuration patterns and determines appropriate config strategy.

Centralized management of external service integrations.

AES-256-GCM encryption for sensitive integration credentials.

PubSub helpers for broadcasting integration changes in real-time.

Generic OAuth 2.0 flow for service integrations.

Registry of known integration providers.

Jobs module for PhoenixKit.

Live catalog of known external PhoenixKit packages fetched from Hex.pm.

Configuration manager for PhoenixKit layout integration.

Mailer module for PhoenixKit emails.

Migrations create and modify the database tables PhoenixKit needs to function.

PhoenixKit PostgreSQL Migration System

PhoenixKit Migration V02: Remove is_active column from role assignments.

PhoenixKit V03 Migration: Settings System

PhoenixKit V04 Migration: Settings Module Column + Referral System

PhoenixKit V05 Migration: Add Beneficiary Field to Referral Codes

PhoenixKit V06 Migration: Allow NULL Expiration Dates for Referral Codes

PhoenixKit V07 Migration: Email System

PhoenixKit V08 Migration: Username Support

PhoenixKit V09 Migration: Email Blocklist Support

PhoenixKit V10 Migration: User Registration Analytics

V100: Staff module tables.

V101: Projects module tables.

V102: Catalogue discount + smart catalogues.

V103: Nested categories.

V104: Per-user notifications driven by the activity feed.

V106: Split phoenix_kit_projects.name uniqueness across templates and real projects.

V107: Pin AI endpoints to a specific integration row via integration_uuid + add the missing unique index on name.

V108: Add position columns for drag-and-drop reordering on three list surfaces.

V109: Rename Customer Service module settings keys and permission module_key to customer_support.

PhoenixKit V11 Migration: Per-User Timezone Settings

V110: Add language column to phoenix_kit_doc_templates.

V111: PDF library tables for the catalogue module.

V112: Project lifecycle + translations + drop unique-name indexes.

V113: System-managed media flag + source-parent link for Tessera tiles, plus the comments ↔ files attachment junction table.

V114: Switch integration storage rows to uuid-only keys.

V115: phoenix_kit_annotations — drawn-on-image annotations created via the Etcher overlay layer.

V116: Parent reference on entity_data.

PhoenixKit V12 Migration: JSON Settings Support

PhoenixKit V13 Migration: Enhanced Email Tracking with AWS SES Integration

PhoenixKit V14 Migration: Email Body Compression Support

PhoenixKit V15 Migration: Email Templates System

PhoenixKit V16 Migration: OAuth Providers System & Magic Link Registration

PhoenixKit V17 Migration: Entities System (Dynamic Content Types)

PhoenixKit V18 Migration: User Custom Fields

PhoenixKit V19 Migration: Enhanced Email Status Tracking

PhoenixKit V20 Migration: Distributed File Storage System

PhoenixKit V21 Migration: Optimize Message ID Search Performance

PhoenixKit V22 Migration: Email System Improvements & Audit Logging

PhoenixKit V23 Migration: Session Fingerprinting

PhoenixKit V24 Migration: File Checksum Unique Index

PhoenixKit V25 Migration: Aspect Ratio Control for Dimensions

Migration V26: Rename checksum fields and add per-user deduplication.

Migration V27: Add Oban tables for background job processing.

Migration V28: Add preferred_locale field to users table for dialect preferences.

PhoenixKit V29 Migration: Posts System

Migration V30: Move preferred_locale from column to custom_fields JSONB.

PhoenixKit V31 Migration: Billing System - Phase 1

PhoenixKit V32 Migration: AI System

PhoenixKit V33 Migration: Payment Providers and Subscriptions

PhoenixKit V34 Migration: AI Endpoints System

PhoenixKit V35 Migration: Support Tickets System

PhoenixKit V36 Migration: Connections Module - Social Relationships System

PhoenixKit V37 Migration: DB Sync - Connections & Transfer Tracking

PhoenixKit V38 Migration: AI Prompts System

PhoenixKit V39 Migration: Admin Notes System

PhoenixKit V40 Migration: UUID Column Addition for Legacy Tables

PhoenixKit V41 Migration: AI Request Prompt Tracking & Reasoning Parameters

PhoenixKit V42 Migration: Universal Scheduled Jobs System

PhoenixKit V43 Migration: Legal Module

PhoenixKit V44 Migration: Rename DB Sync tables to Sync

PhoenixKit V45 Migration: E-commerce Shop Module

V46: Product Options with Dynamic Pricing + Import Logs + Translations

V47: Shop Localized Fields

V48: Post and Comment Dislikes

V49: Shop Import Enhancements

V50: Add access_type to storage buckets

V51: Cart items unique constraint fix + User deletion FK constraints

V52: Shop localized slug functional unique index

V53: Module-Level Permission System

V54: Category Featured Product + Import Config download_images

V55: Standalone Comments Module

V56: UUID Column Consistency Fix

V57: UUID FK Column Repair

V58: Timestamp Column Type Standardization (timestamptz)

V59: Publishing Module — Database Tables

V60: Email Templates UUID FK Columns

V61: UUID Column Safety Net for Tables Missed by V40

V62 — Rename UUID-type columns from _id suffix to _uuid suffix.

V63: UUID Companion Column Safety Net — Round 2

V64: Fix user token check constraint for UUID-only inserts.

V65: Rename SubscriptionPlan → SubscriptionType

V66: Make legacy user_id columns nullable on posts module tables.

V67: Make all remaining legacy NOT NULL integer FK columns nullable.

V68: Allow NULL slug for timestamp-mode publishing posts

V69: Make legacy integer FK columns nullable on role tables.

V70: Re-backfill UUID FK columns silently skipped in V56/V63.

V71: Rename product_ids → product_uuids in shop import logs.

V72: Rename iduuid on Category A tables + add missing FK constraints.

V73: Pre-drop prerequisites for Category B tables.

V74: Drop integer id/_id columns, promote uuid to PK on Category B tables.

V75: Fix missing/wrong DEFAULT on uuid PK columns, drop orphaned sequence.

V76: Rename stale _id columns/keys to _uuid.

V77: Rename Tickets module settings keys and permission module_key to customer_service.

V78: Add missing columns to AI tables from V41.

V79: Newsletters Module — Database Tables

V80: Emails Module i18n — JSON language fields

V81: Add position column to entity_data for manual reordering support.

V82: Add metadata JSONB column to comments.

V83: Add status column to publishing_groups.

V84: Rename mailing tables to newsletters.

V85: Add system_prompt field to AI prompts table.

V86: Add Document Creator tables.

V87: Add Catalogue tables.

V88: Publishing schema V2 — restructure posts/versions/contents.

V89: Catalogue pricing — rename price to base_price, add markup_percentage.

V90: Create activity feed table.

V91: Add Locations tables.

V92: Add organization accounts support and organization invitations.

V93: Add prefix index on settings key column for integration queries.

V94: Add Google Drive metadata columns to Document Creator tables.

V95: Create media folders and folder links tables.

V96: Attach catalogue items directly to a catalogue.

V97: Per-item markup override.

V98: Add alternative_formats to storage dimensions.

V99: Add trash support to storage files.

Adds UUID FK columns alongside integer FKs across PhoenixKit tables.

Repairs missing UUID columns for databases upgrading from PhoenixKit < 1.7.0.

Behaviour for PhoenixKit feature modules (internal and external).

Zero-config auto-discovery of external PhoenixKit modules.

Runtime registry of all PhoenixKit modules (internal and external).

Billing-specific tab configuration for settings pages.

Languages management for PhoenixKit - complete language configuration in a single module.

Handles mapping between base language codes (en, es) and full dialect codes (en-US, es-MX).

Struct representing a language in PhoenixKit.

Maintenance Mode module for PhoenixKit.

Referral code system for PhoenixKit - complete management in a single module.

ReferralCodeUsage schema for tracking referral code usage in PhoenixKit.

Referral code form LiveView for PhoenixKit admin panel.

User referral codes management LiveView for PhoenixKit admin panel.

Referral codes module settings LiveView for PhoenixKit admin panel.

SEO module for PhoenixKit.

Call-to-action button component.

Headline component for hero sections.

Image component with lazy loading and responsive sizing.

Responsive image component that renders a <picture> element with <source> tags.

Subheadline component for supporting text.

Responsive YouTube embed component.

Sitemap generation and management context for PhoenixKit.

Caching layer for sitemap generation.

File-based storage for sitemap XML files.

Main sitemap generator for PhoenixKit.

HTML sitemap renderer for PhoenixKit.

Resolves actual routes from parent application router.

Oban worker for scheduled sitemap regeneration.

Struct representing a generated sitemap file's metadata.

Posts source for sitemap generation.

Publishing source for sitemap generation.

Router Discovery source for sitemap generation.

Shop source for sitemap generation.

Behaviour for sitemap data sources.

Static routes source for sitemap generation.

Struct representing a single URL entry in sitemap.

Controller for serving XML sitemaps with XSL styling.

LiveView for sitemap configuration and management.

Storage context for managing files, buckets, and dimensions.

Schema for storage provider configurations.

Schema for dimension presets for automatic file variant generation.

Etcher.Storage adapter that writes annotation events from the MediaBrowser's Fresco viewer into phoenix_kit_annotations.

Schema for original file uploads.

Schema for file variants (thumbnails, resizes, video qualities).

Schema for physical storage locations (redundancy tracking).

File serving logic with multi-location failover support.

Schema for media folders.

Schema for folder links (shortcuts).

ImageMagick-based image processing module.

Storage manager for handling file operations with redundancy and failover.

Poppler-based PDF processing module.

Oban job for background processing of uploaded files.

Behavior for storage providers.

Registry for storage providers.

Local filesystem storage provider.

AWS S3 storage provider.

Tessera.Storage adapter that lands tile / manifest writes inside PhoenixKit's storage pipeline

Simple test job to verify Oban is working

Token-based URL signing for secure file serving.

Variant generation system for images and videos.

Utilities for naming and parsing storage variant names.

Oban job for deleting a single orphaned file.

Oban worker that permanently deletes trashed files older than the configured retention period.

Oban worker that syncs under-replicated files to meet the redundancy target.

Per-user notifications driven by PhoenixKit.Activity.

PubSub topic helpers for the notifications feature.

Schema for per-user notifications.

Per-user notification preferences.

Oban worker that deletes notifications whose underlying activity is older than the retention window.

Human-readable rendering for notifications.

Registry of notification types for the per-user preferences UI.

PubSub Manager for PhoenixKit admin live updates.

Helper for dynamically resolving the PubSub server to use.

Helper for dynamically resolving the repository to use.

Context module for managing scheduled jobs.

Behaviour for scheduled job handlers.

Schema for scheduled jobs.

Oban worker that processes pending scheduled jobs.

The Settings context for system configuration management.

PubSub helpers for broadcasting settings updates in real-time.

Ecto queries for Settings context.

Setting schema for PhoenixKit system settings.

Settings form schema for PhoenixKit system settings validation.

Supervisor for all PhoenixKit workers.

System dependency checker for PhoenixKit.

Theme configuration utilities for PhoenixKit's DaisyUI integration.

Schema for admin notes about users.

The Auth context for user authentication and management.

Scope module for encapsulating PhoenixKit authentication state.

User schema for PhoenixKit authentication system.

User notification system for PhoenixKit authentication workflows.

User token schema for PhoenixKit authentication system.

Context for managing custom user field definitions.

PubSub event broadcasting for custom field changes.

Context for organization invitation lifecycle management.

Magic Link authentication system for PhoenixKit.

Two-step user registration via Magic Link email.

OAuth authentication context for PhoenixKit.

Checks OAuth availability and configured providers.

Runtime OAuth configuration management using database credentials.

OAuth Provider schema for external authentication providers.

Schema for organization invitations.

Context for module-level permissions in PhoenixKit.

Rate limiting for authentication endpoints to prevent brute-force attacks.

Hammer 7.x backend for rate limiting.

Role schema for PhoenixKit authorization system.

Role assignment schema for PhoenixKit authorization system.

Schema for module-level permissions assigned to roles.

API for managing user roles in PhoenixKit.

Handles PubSub notifications for user scope refreshes.

Context for managing user sessions in PhoenixKit.

Table column configuration for user management dashboard.

Wrapper for BeamLabCountries with country data utility functions.

Date and time formatting utilities for PhoenixKit.

IP Geolocation utilities for PhoenixKit.

Curated list of Heroicons for use in the application. Icons are grouped by category for easy browsing.

HTML sanitization for rich text content in entities.

Utilities for extracting and formatting IP addresses.

Multi-language data transformation helpers for entity data JSONB.

Number formatting utilities for PhoenixKit.

Utilities for detecting and working with Phoenix framework versions.

Utility functions for working with PhoenixKit routes and URLs.

Session fingerprinting utilities for preventing session hijacking.

Helpers for generating consistent, URL-friendly slugs across PhoenixKit.

Utilities for working with UUIDs.

GenServer worker that ensures OAuth configuration is loaded from database before any OAuth requests are processed.

The web interface for PhoenixKit.

Universal admin edit URL helper. Assigns admin_edit_url and admin_edit_label to conn/socket if user is admin. Works with both Plug.Conn (controllers) and Phoenix.LiveView.Socket (LiveViews).

Controller for serving PhoenixKit static assets.

Legacy authentication router for PhoenixKit.

Admin navigation components for the PhoenixKit admin panel. Provides consistent navigation elements for both desktop sidebar and mobile drawer.

Focused composer LiveComponent for attaching the first comment to a newly-drawn Etcher annotation in the MediaBrowser modal sidebar.

Wrapper component for all auth pages (login, registration, etc.).

AWS Credentials Verification Component.

AWS Region Select Component.

Accordion Component for collapsible content sections.

Provides a unified admin page header component with optional back button, title, subtitle, and action slots.

Provides badge UI components for status, roles, and labels.

Provides a button UI component.

Provides a default checkbox UI component.

Development mode notice component for the local mailbox.

A reusable drag-and-drop sortable component supporting both grid and list layouts.

Provides email activity badges component for chronological event display.

Provides email status badge components for email tracking system.

Provides event timeline item component for email event visualization.

Components for displaying file-related information.

Reusable file upload component for PhoenixKit.

Provides flash UI components.

Provides an error UI component for form components.

Provides a label UI component for form components.

Provides a header UI component.

Provides a large hero statistics card UI component for prominent dashboard metrics.

Provides a hero icon UI component.

Provides icons for other components and interfaces.

Provides inputs UI components.

Reusable integration connection picker component.

Language switcher component for frontend and admin applications.

Maintenance page card component.

Renders markdown content safely with consistent styling.

Renders markdown content with consistent styling across the application.

Reusable markdown editor LiveComponent with cursor tracking, markdown formatting toolbar, component insertion, and unsaved changes protection.

Provides a component for resolving and rendering media file thumbnail URLs.

Provides message tag badge component for email system.

A reusable modal dialog component with robust features.

Provides a module card UI component for the Modules Overview page.

Universal tab component for PhoenixKit.

Number formatting components for PhoenixKit.

Reusable component for OAuth provider checkboxes with conditional styling.

Reusable component for OAuth provider credential forms.

Utility components for OAuth functionality.

Pagination components for list views in PhoenixKit.

Renders a <link rel="icon"> tag driven by the PhoenixKit site_icon_file_uuid setting.

Component that sets PhoenixKit JavaScript global variables.

Provides prefix-aware link components for PhoenixKit navigation.

Provides a default select UI component.

Provides a simple form UI component.

Provides a statistics card UI component for dashboard metrics.

A basic table component with daisyUI styling.

Dropdown action menu for table rows.

Provides a default textarea UI component.

Shared theme controller component for admin and dashboard.

Provides a theme switcher UI component.

Provides time and date display components with relative and absolute formatting.

Provides a unified user dashboard header component with title, subtitle, and action slots.

Provides user information display components.

Admin sidebar component for the PhoenixKit admin panel.

Badge component for dashboard tab indicators.

Context selector dropdown component for dashboard navigation.

LiveView integration for dashboard tabs with real-time updates.

Wrapper component for rendering multiple context selectors.

Sidebar component for the user dashboard.

Tab item component for dashboard navigation.

Stacked alert banners for pending organization invitations.

Shared language switcher component for PhoenixKit.

Dynamic layout wrapper component for Phoenix v1.7- and v1.8+ compatibility.

MediaBrowser LiveComponent — embeddable media management UI.

Shared multilang form components and helpers for PhoenixKit modules.

OAuth authentication buttons component for Google and Apple Sign-In.

User dashboard navigation components for the PhoenixKit user dashboard. Provides navigation elements specifically for user dashboard pages.

Controller for handling dashboard context switching.

LiveView on_mount hook for loading dashboard contexts.

LiveView on_mount hook for initializing dashboard tabs with context-aware badge values.

This module is invoked by your endpoint in case of errors on HTML requests.

This module is invoked by your endpoint in case of errors on JSON requests.

File serving controller with signed URL support.

A module providing Internationalization with a gettext-based API.

Helper functions for integrating the media selector component.

LiveView on_mount hook for organization invitation banners.

Integration helpers for adding PhoenixKit to Phoenix applications.

Helper functions for working with PhoenixKit layouts efficiently.

This module holds different layouts used by your application.

Admin LiveView for the activity feed.

Admin LiveView for viewing a single activity entry.

Media selector modal component.

Searchable select dropdown LiveComponent.

User-scoped media selector modal.

Reusable LiveComponent for user settings management.

Admin dashboard LiveView for PhoenixKit.

Dashboard Index LiveView for PhoenixKit.

Settings LiveView for PhoenixKit Dashboard.

Admin modules management LiveView for PhoenixKit.

LiveView for viewing jobs.

Languages module settings LiveView for PhoenixKit admin panel.

Standalone maintenance page LiveView for admin preview and direct access.

Settings page for the Maintenance module.

Bucket form LiveView for storage bucket management.

Dimension form LiveView for storage dimension management.

Storage dimensions management LiveView.

Media health check LiveView.

Storage settings management LiveView for PhoenixKit.

Nested LiveView that renders the notifications bell in the global layout.

Admin settings management LiveView for PhoenixKit.

Authorization settings management LiveView for PhoenixKit.

Form page for adding or editing an integration connection.

Integrations list page — shows all configured service connections.

Organization settings management LiveView for PhoenixKit.

SEO settings management LiveView for PhoenixKit.

User-related settings management LiveView for PhoenixKit.

Real-time session monitoring dashboard for the PhoenixKit admin panel.

Media management LiveView — thin wrapper around MediaBrowser LiveComponent.

Single media file detail view for PhoenixKit admin panel.

Generic media selector LiveView.

Interactive permissions matrix view for PhoenixKit admin panel.

Role management LiveView for PhoenixKit admin panel.

Live component for managing active user sessions in the PhoenixKit admin panel.

LiveView for displaying detailed user information.

User management LiveView for PhoenixKit admin panel.

Plug that ensures OAuth credentials are loaded into Application env before OAuth requests.

Ensures correct HTTPS scheme for OAuth callback URL generation behind reverse proxies.

Central integration plug for PhoenixKit.

Plug that enforces maintenance mode for non-admin users on controller routes.

A plug that logs detailed timing information for requests.

PhoenixKit library router.

Referral codes module routes.

File upload controller for handling multipart uploads.

Authentication and authorization plugs for PhoenixKit user management.

LiveView for email confirmation.

LiveView for resending email confirmation instructions.

LiveView for password reset request.

LiveView for user authentication.

LiveView for magic link authentication.

LiveView for magic link registration completion form.

LiveView for requesting magic link registration.

Controller for handling magic link registration verification.

Controller for handling magic link verification and authentication.

OAuth authentication controller using Ueberauth with dynamic provider configuration.

LiveView for user registration.

LiveView for password reset functionality.

Controller for handling user session management.

LiveView for creating and editing users in the admin interface.

Mix Tasks

Mix compiler that auto-generates CSS @source directives for PhoenixKit modules.

Rebuilds assets for PhoenixKit using standard Phoenix asset pipeline.

Finds and optionally deletes orphaned media files in PhoenixKit Storage.

Diagnoses PhoenixKit installation, migration, and runtime issues.

Igniter task that generates admin page with automatic route registration.

Generate a PhoenixKit versioned migration for the parent application.

Igniter task that generates a user dashboard page with tab configuration.

Igniter installer for PhoenixKit.

Modernizes PhoenixKit layout integration for Phoenix v1.8+ compatibility.

Shows comprehensive status of PhoenixKit installation.

Igniter-based updater for PhoenixKit.

Template definitions for PhoenixKit demo pages.