Packages
phoenix_kit
1.3.2
1.7.208
1.7.207
1.7.206
1.7.205
1.7.204
1.7.203
1.7.202
1.7.201
1.7.200
1.7.199
1.7.198
1.7.197
1.7.196
1.7.194
1.7.193
1.7.192
1.7.191
1.7.190
1.7.189
1.7.187
1.7.186
1.7.185
1.7.184
1.7.183
1.7.182
1.7.181
1.7.180
1.7.179
1.7.178
1.7.177
1.7.176
1.7.175
1.7.174
1.7.173
1.7.172
1.7.171
1.7.170
1.7.169
1.7.168
1.7.167
1.7.166
1.7.165
1.7.164
1.7.162
1.7.161
1.7.160
1.7.159
1.7.157
1.7.156
1.7.155
1.7.154
1.7.153
1.7.152
1.7.151
1.7.150
1.7.149
1.7.146
1.7.145
1.7.144
1.7.143
1.7.138
1.7.133
1.7.132
1.7.131
1.7.130
1.7.128
1.7.126
1.7.125
1.7.121
1.7.120
1.7.119
1.7.118
1.7.117
1.7.116
1.7.115
1.7.114
1.7.113
1.7.112
1.7.111
1.7.110
1.7.109
1.7.108
1.7.107
1.7.106
1.7.105
1.7.104
1.7.103
1.7.102
1.7.101
1.7.100
1.7.99
1.7.98
1.7.97
1.7.96
1.7.95
1.7.94
1.7.93
1.7.92
1.7.91
1.7.90
1.7.89
1.7.88
1.7.87
1.7.86
1.7.85
1.7.84
1.7.83
1.7.82
1.7.81
1.7.80
1.7.79
1.7.78
1.7.77
1.7.76
1.7.75
1.7.74
1.7.71
1.7.70
1.7.69
1.7.66
1.7.65
1.7.64
1.7.63
1.7.62
1.7.61
1.7.59
1.7.58
1.7.57
1.7.56
1.7.55
1.7.54
1.7.53
1.7.52
1.7.51
1.7.49
1.7.44
1.7.43
1.7.42
1.7.41
1.7.39
1.7.38
1.7.37
1.7.36
1.7.34
1.7.33
1.7.31
1.7.30
1.7.29
1.7.28
1.7.27
1.7.26
1.7.25
1.7.24
1.7.23
1.7.22
1.7.21
1.7.20
1.7.19
1.7.18
1.7.17
1.7.16
1.7.15
1.7.14
1.7.13
1.7.12
1.7.11
1.7.10
1.7.9
1.7.8
1.7.7
1.7.6
1.7.5
1.7.4
1.7.3
1.7.2
1.7.1
1.7.0
1.6.20
1.6.19
1.6.18
1.6.17
1.6.16
1.6.15
1.6.14
1.6.13
1.6.12
1.6.11
1.6.10
1.6.9
1.6.8
1.6.7
1.6.6
1.6.5
1.6.4
1.6.3
1.5.2
1.5.1
1.5.0
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.10
1.2.9
1.2.8
1.2.7
1.2.5
1.2.4
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
A foundation for building Elixir Phoenix apps — SaaS, social networks, ERP systems, marketplaces, and more
Current section
Files
Jump to
Current section
Files
phoenix_kit
CHANGELOG.md
CHANGELOG.md
## 1.3.2 - 2025-10-10
### Fixed
- **Critical: Email System SQS Message Loss Bug** - Fixed critical bug where manual email status sync was deleting ALL messages from SQS queue, including non-matching ones
- Issue #1: Non-matching messages now stay in queue for normal SQS worker processing
- Prevents permanent data loss of delivery events from AWS SES
- **Email Event Deduplication** - Added deduplication for events from multiple queues
- Issue #2: Events from both SQS and DLQ are now deduplicated by message_id + event_type
- Prevents duplicate event records when same event exists in both queues
- **Email Event Idempotency** - Enhanced idempotency checks for all event types
- Issue #3: Added duplicate prevention for bounce, complaint, and reject events
- Completes idempotency coverage (delivery, open, click already had checks)
- Prevents duplicate events during retry scenarios and race conditions
- **SQS Polling Optimization** - Reduced AWS API calls by up to 80%
- Issue #4: Manual sync now stops after first match instead of polling all batches
- Saves API costs and reduces latency (from 10s to 2s average)
- **System Settings Integration** - Fixed hardcoded values in manual sync
- Issue #5: Now uses `get_sqs_max_messages()` and `get_sqs_visibility_timeout()` from settings
- Issue #6: Visibility timeout increased from 30s to system default (300s)
- Prevents race conditions during long-running operations
### Improved
- **Error Logging** - Stacktrace formatting improved for better debugging
- Issue #7: Uses `Exception.format_stacktrace()` for readable log output
- **Code Quality** - Removed redundant `require Logger` statements
- Issue #8: Single module-level `require Logger` instead of 11 duplicate requires
- Cleaner codebase following Elixir best practices
### Technical Details
- Modified files:
- `lib/phoenix_kit/emails/emails.ex` (77 changes)
- `lib/phoenix_kit/emails/sqs_processor.ex` (66 changes)
- All changes verified with successful compilation
- Based on comprehensive code review identifying 8 issues (1 critical, 2 high, 3 medium, 2 low priority)
## 1.3.1 - 2025-10-07
### Fix: Admin Role Access with Real-time Scope Refresh
Implemented a PubSub-based scope refresh system that updates sessions in real-time without forcing
logouts:
- **New Module**: `PhoenixKit.Users.ScopeNotifier` manages user-specific PubSub topics for role changes
- **LiveView Integration**: Sessions automatically subscribe to their user's topic and rebuild the cached
scope when roles change
- **Admin Demotion Handling**: Users who lose admin privileges are immediately redirected from admin pages
with clear error messaging
- **Transaction Safety**: Role mutations use broadcast flags to prevent partial-state notifications during
database transactions
Additional Improvements:
- **Better Error Messages**: Now distinguishes between "not logged in" vs "logged in but insufficient
role" scenarios
- **Subscription Lifecycle**: Proper subscription management when users switch or sessions end
- **Safe User Fetching**: Added `get_user/1` helper that returns `nil` instead of raising exceptions
Technical Details:
- Broadcasts happen on `phoenix_kit:user_scope:#{user_id}` topics
- LiveViews attach a `:handle_info` hook to process `{:phoenix_kit_scope_roles_updated, user_id}` messages
- Scope refresh compares old vs new admin status to trigger redirects only when necessary
- Edge cases handled: user deletion mid-session, owner role protection, non-admin page refreshes
## 1.3.0 - 2025-10-06
### Added
- **Magic Link Registration System** - Passwordless two-step registration via email
- New `PhoenixKit.Users.MagicLinkRegistration` context for registration link management
- Magic link request LiveView at `{prefix}/users/register/magic-link`
- Registration completion LiveView at `{prefix}/users/register/complete/:token`
- Configurable expiry time (default: 30 minutes)
- Automatic email verification on completion
- Referral code support in registration flow
- Database V16 migration: Modified tokens table to allow null user_id for magic_link_registration context
- Check constraint ensuring user_id required for all non-registration token contexts
- **OAuth Provider Validation** - Enhanced OAuth request handling with configuration checks
- Provider existence validation before authentication flow
- Helpful error messages when OAuth not configured or provider not found
- Debug logging for OAuth authentication flow
- Graceful fallback to login page with user-friendly error messages
### Changed
- **OAuth Dependencies Made Optional** - OAuth authentication dependencies (`ueberauth`, `ueberauth_google`, `ueberauth_apple`) are now marked as optional
- Reduces dependency bloat for applications not using OAuth
- Applications wanting OAuth must explicitly add dependencies to their `mix.exs`
- Detailed setup instructions added to CLAUDE.md with step-by-step configuration guide
- Improved referral code handling in OAuth flow with safe fallback when ReferralCodes module not loaded
### Improved
- **OAuth Documentation** - Comprehensive setup guide with environment variable configuration
- Clear dependency installation instructions
- Provider configuration examples for Google and Apple Sign-In
- Environment variable setup guide for development and production
- Migration notes for V16 oauth_providers table and magic link registration
### Fixed
- **Dialyzer Warnings** - Updated line number references for OAuth controller pattern matching
- **Entities Menu Navigation** - Fixed main Entities menu staying selected when clicking entity submenus by adding `disable_active={true}` attribute
- **New Nav Bar** - Added new top nav bar with update interface for comfort and ease of use
### UI/UX Improvements
- **Hero Icons Migration** - Migrated modules page to use Heroicons for consistent icon system
- Replaced custom icon components with hero-icons: `hero-arrow-left`, `hero-cog-6-tooth`, `hero-users`, `hero-envelope`, `hero-information-circle`
- Consistent sizing and theming across dashboard and modules pages
## 1.2.14 - 2025-09-30
### Added
- **Email Queue LiveView** - Complete real-time queue monitoring interface with system status, rate limit tracking, and failed email management
- System status cards showing online status, daily sent count, failed emails (24h), and retention settings
- Rate limit status display with visual progress bars for global, recipient, sender limits and blocklist statistics
- Failed emails management table with individual retry and bulk operations support
- Recent activity table displaying last 20 emails with delivery, open, and click event badges
- Auto-refresh every 10 seconds for real-time monitoring
- Bulk retry and delete operations with confirmation workflow
- **Email Blocklist LiveView** - Full-featured blocklist management interface with comprehensive filtering and bulk operations
- Statistics dashboard showing total blocks, active blocks, and expired blocks
- Advanced search and filtering by email address, reason, and status (active/expired)
- Add block form with support for temporary blocks (expiration dates) and multiple block reasons
- CSV import/export functionality for bulk blocklist management
- Bulk operations: remove selected addresses and export selected to CSV
- Pagination support (50 entries per page) with navigation controls
- Auto-refresh every 30 seconds with manual refresh option
- Visual status indicators for active and expired blocks
- **Template-Mailer Integration** - Production-ready template system integration with automatic tracking
- New `PhoenixKit.Mailer.send_from_template/4` main API for sending templated emails
- Convenience wrapper `PhoenixKit.Emails.Templates.send_email/4` for cleaner API
- Automatic template loading by name with status validation
- Variable substitution with template rendering
- Automatic usage tracking (usage_count and last_used_at updates)
- EmailLog system integration for delivery tracking
- Support for custom from addresses, reply-to, and metadata
- Comprehensive error handling (template_not_found, template_inactive)
- **RateLimiter Blocklist API** - Three new public API methods for blocklist management
- `list_blocklist/1` - Query blocklists with filtering (search, reason, status), sorting, and pagination
- `count_blocklist/1` - Count blocked emails with optional filters
- `get_blocklist_stats/0` - Retrieve blocklist statistics including total, active, expired, and by-reason breakdowns
- **Emails.delete_log/1** - New public API method for email log deletion with proper error handling
- **Email Headers Management** - Complete headers tracking system with AWS SES integration
- New `email_save_headers` setting to control headers saving behavior
- Headers automatically populated from AWS SES events via SQS processor
- Headers extracted from all SES event types (send, delivery, bounce, complaint, open, click, reject, delay, subscription)
- New API methods: `save_headers_enabled?()`, `set_save_headers(enabled)`
- Admin UI toggle for enabling/disabling headers collection
- Headers button in email details hidden when no headers exist
- **Emails Advanced Settings** - Expanded configuration API for lifecycle and monitoring
- `set_compress_after_days(days)` - Configure email body compression timing (7-365 days)
- `set_s3_archival(enabled)` - Enable/disable S3 archival for old email data
- `set_cloudwatch_metrics(enabled)` - Toggle CloudWatch metrics integration
- `set_sqs_max_messages(count)` - Configure SQS polling batch size (1-10 messages)
- `set_sqs_visibility_timeout(seconds)` - Set SQS message visibility timeout (30-43200 seconds)
- Enhanced Emails Settings LiveView with compression, archival, CloudWatch, and SQS controls
### Changed
- **Template Editor** - Enhanced with test send and draft save capabilities
- Test send functionality now available in both new and edit modes (previously edit-only)
- New "Save as Draft" button in creation mode for saving incomplete templates
- Smart status handling: regular save creates active templates, draft save creates draft templates
- Improved user experience allowing template testing before final save
- **Template Variable System** - Complete overhaul with automatic management
- Automatic variable extraction from template content (subject, html_body, text_body)
- Smart default descriptions for 20+ common variables (user_name, email, url, etc.)
- Inline editing of variable descriptions with real-time updates
- Variables automatically added to changeset during validation and save
- Removed manual "Add" button workflow in favor of automatic detection
- Visual improvements with better empty states and usage instructions
- **Template Editor Preview** - Iframe-based isolation for template preview
- HTML preview now rendered in sandboxed iframe to prevent style leakage
- Template styles no longer affect editor UI layout
- Automatic height adjustment based on content
- Improved security with sandbox restrictions
- **Template Form Validation** - Fixed changeset handling and error display
- Corrected form binding from nested map to direct changeset
- Fixed error extraction using `Keyword.get` instead of `get_in`
- Applied fixes to all 8 form fields (name, slug, display_name, category, status, description, subject, html_body, text_body)
- **Template Slug Auto-generation** - Improved logic for reliable slug creation
- Moved slug generation before validation in changeset pipeline
- Enhanced to check both changeset changes and existing field values
- Handles both nil and empty string cases properly
- Made slug field visible on editor form with helper text
### Fixed
- **Template Creation Errors** - Resolved Access.get/3 function clause errors in template editor forms
- **Variable Description Editing** - Fixed inability to edit variable descriptions after auto-addition
- **Template Editor Modal** - Removed unnecessary modal step in template creation workflow
- **Slug Validation** - Fixed "slug can't be blank" errors with improved auto-generation timing
- **Code Quality Issues** - Fixed all compiler warnings, Credo issues, and Dialyzer errors
- Fixed nested module aliasing in SQS processor (Credo software design warning)
- Removed Logger metadata keys not found in config (compiler warnings)
- Fixed nested code depth issue by extracting helper function (Credo refactoring warning)
- Removed unreachable pattern match clause in email interceptor (Dialyzer error)
### Improved
- **Emails Code Quality** - Enhanced error handling and logging across emails modules
- **SQS Processor Architecture** - Refactored headers update logic with proper function extraction and reduced nesting depth
- **LiveView Performance** - Optimized data loading and real-time updates in queue and blocklist interfaces
- **User Experience** - Streamlined template creation and management workflows
## 1.2.13 - 2025-09-29
### Added
- **Email Template Management System** - Complete database-driven template system with CRUD operations and variable substitution
- **Template Editor Interface** - Full-featured LiveView editor with HTML structure, preview, and test functionality
- **Template List Interface** - Comprehensive template management with search, filtering, and status management
- **Mix Task for Template Seeding** - New `mix phoenix_kit.seed_templates` task for creating default system templates
- **Migration V15** - Database tables for email template storage with system template protection
- **Version Tracking in Migrations** - Enhanced migration system with PostgreSQL table comments for version tracking
- **Debug Logging for Email Metrics** - Enhanced error handling and debugging for chart data preparation
- **Automatic Variable Extraction** - Smart detection and extraction of template variables with intelligent descriptions
- **Smart Variable Descriptions** - Automatic mapping of common template variables to user-friendly descriptions
### Changed
- **Mailer Integration** - Updated to use database templates with fallback to hardcoded templates for backward compatibility
- **User Notifier** - Enhanced to support template-based email generation with variable substitution
- **Email Metrics Dashboard** - Improved chart data initialization and error handling for better reliability
- **Email Templates Search** - Simplified search form layout for better user experience
- **Template Editor Workflow** - Simplified template creation process with automatic variable detection and validation
### Fixed
- **Email Metrics Chart Data** - Fixed initialization errors and null value handling in chart data preparation
- **Migration Rollback** - Added proper version tracking for migration rollback operations
- **Linter Issues** - Resolved alias ordering and function complexity issues for better code quality
- **Pre-commit Hooks** - Enhanced pre-commit validation with proper error handling
- **Template Slug Generation** - Fixed auto-generation logic for better handling of template names and slugs
- **Template Validation Flow** - Improved validation sequence for better user experience during template editing
### Removed
- **Modal Template Creation** - Removed modal-based template creation interface in favor of simplified direct editor workflow
## 1.2.12 - 2025-09-27
### Added
- **Complete Emails Architecture** - New email_system module replacing legacy email_tracking with enhanced AWS SES integration and comprehensive event management
- **AWS SES Configuration Task** - New `mix phoenix_kit.configure_aws_ses` task for automated AWS infrastructure setup with configuration sets, SNS topics, and SQS queues
- **Enhanced SQS Processing** - New Mix tasks for queue processing and Dead Letter Queue management:
- `mix phoenix_kit.process_sqs_queue` - Real-time SQS message processing for email events
- `mix phoenix_kit.process_dlq` - Dead Letter Queue processing for failed messages
- `mix phoenix_kit.sync_email_status` - Manual email status synchronization
- **V12 Migration** - Enhanced email tracking with AWS SES message ID correlation and specific event timestamps (bounced_at, complained_at, opened_at, clicked_at)
- **Emails LiveView Interfaces** - Reorganized email management interfaces with improved navigation and functionality
- **Extended Event Support** - Support for new AWS SES event types: reject, delivery_delay, subscription, and rendering_failure
- **Enhanced Status Management** - Expanded email status types including rejected, delayed, hard_bounced, soft_bounced, and complaint
### Changed
- **Email Architecture Refactoring** - Complete transition from email_tracking to email_system module for better organization and AWS SES integration
- **Email Event Processing** - Enhanced event handling with provider-specific data extraction and improved error recovery patterns
- **Database Schema** - Updated email logging with aws_message_id field and specific timestamp tracking for different event types
- **LiveView Organization** - Reorganized email-related LiveView modules under email_system namespace for better structure
### Removed
- **Legacy Email Tracking Module** - Removed entire email_tracking module and all associated files in favor of new email_system architecture
- **Old Email LiveView Interfaces** - Removed legacy email_tracking LiveView components and templates
- **Deprecated Email Processing** - Removed outdated email event processing and archiver implementations
### Fixed
- **Emails Integration** - Improved integration patterns for better performance and reliability
- **SQS Message Processing** - Enhanced message processing with proper error recovery and retry mechanisms
- **Email Event Handling** - Better handling of AWS SES events with improved message parsing and validation
## 1.2.11 - 2025-09-24
### Added
- **AWS SQS Integration** - Complete SQS worker and processor for real-time email event processing from AWS SES through SNS
- **Manual Email Sync** - New `sync_email_status/1` function to manually fetch and process SES events for specific messages
- **DLQ Processing** - Dead Letter Queue support for handling failed messages with comprehensive retry mechanisms
- **Mix Tasks for Emails**:
- `mix phoenix_kit.email.send_test` - Test email sending functionality with system options
- `mix phoenix_kit.email.debug_sqs` - Debug SQS messages and emails with detailed diagnostics
- `mix phoenix_kit.email.process_dlq` - Process Dead Letter Queue messages and handle stuck events
- **Emails Supervisor** - OTP supervision tree for SQS worker management with graceful startup/shutdown
- **Application Integration Module** - Enhanced integration patterns for emails initialization
### Improved
- **Email Interceptor** - Enhanced with provider-specific data extraction for multiple email services (SendGrid, Mailgun, AWS SES)
- **Emails API** - Added manual synchronization and event fetching capabilities for both main queue and DLQ
- **Mailer Module** - Improved integration with emails and enhanced error handling patterns
- **Email Event Processing** - Better handling of AWS SES events with improved message parsing and validation
### Fixed
- **Email Status Processing** - Improved handling of delivery confirmations, bounce events, and open management
- **SQS Message Handling** - Enhanced message processing with proper error recovery and retry logic
### Added
- **Update Task Enhancement** - Added `--yes/-y` flag for skipping confirmation prompts and automatic migration execution
## 1.2.10 - 2025-09-21
### Improved
- **Authentication UI Consistency** - Unified design across all authentication pages (login, registration, magic link, account settings) with consistent card layouts, shadows, and spacing
- **Icon Integration** - Added icon slot support to input component enabling consistent iconography throughout forms using PhoenixKit's centralized icon system
- **User Experience** - Enhanced interaction feedback with hover scale animations and focus transitions on buttons and form elements
- **Visual Cohesion** - Removed background color inconsistencies and standardized visual hierarchy across all authentication flows
- **Development Documentation** - Comprehensive contributor guide with Phoenix built-in live reloading (primary method), custom FileWatcher fallback, GitHub workflow, and complete CONTRIBUTING.md documentation
### Added
- **Magic Link Integration** - Added Magic Link authentication option to login page with elegant divider and themed button
- **Account Settings Redesign** - Complete visual overhaul of settings page to match authentication pages design language
- **Flash Message Auto-dismiss** - Implemented automatic flash message dismissal after 10 seconds for improved user experience
- **Form Field Icons** - Email, password, and profile fields now display contextual icons (email, lock, user profile) for better visual clarity
### Changed
- **Magic Link Page Layout** - Redesigned magic link page with card-based layout matching login and registration pages
- **Settings Page Structure** - Restructured account settings with centered layout, improved typography, and consistent spacing
- **Input Component Enhancement** - Extended core input component to support icon slots while maintaining backward compatibility
## 1.2.9 - 2025-09-18
### Improved
- **Icon System Centralization** - Consolidated all inline SVG icons across the codebase into centralized PhoenixKitWeb.Components.Core.Icons module for better maintainability and consistency
- **Authentication Pages Icons** - Migrated 10 inline SVG icons from login, registration, and magic link pages to centralized icon components (email, lock, user profile, user add, login icons)
- **Component Reusability** - Migrated 50+ SVG icons from 20+ template files to reusable component functions with configurable CSS classes
- **Code Quality** - Eliminated duplicate SVG code and standardized icon usage patterns throughout admin interfaces, forms, and user authentication flows
- **LiveView Module Organization** - Reorganized LiveView modules into logical subfolders for better structure
- **Route Organization** - Restructured admin routes with improved hierarchical organization
- **Email URL Generation** - Enhanced Routes.url/1 function to prioritize site_url setting from Settings over dynamic endpoint detection, ensuring consistent email links across PROD and DEV environments
### Changed
- **User Routes** - Moved all user-related routes under `/admin/users/` prefix:
- `/admin/roles` → `/admin/users/roles`
- `/admin/live_sessions` → `/admin/users/live_sessions`
- `/admin/sessions` → `/admin/users/sessions`
- `/admin/referral-codes` → `/admin/users/referral-codes`
- **Email Routes** - Reorganized email routes for better clarity:
- `/admin/email-logs` → `/admin/emails`
- `/admin/email-logs/:id` → `/admin/emails/email/:id`
- `/admin/email-metrics` → `/admin/emails/dashboard`
- `/admin/email-queue` → `/admin/emails/queue`
- `/admin/email-blocklist` → `/admin/emails/blocklist`
### Added
- **icon_login Component** - Added new login icon component (arrow entering door) to Icons module for authentication pages
- **New Icon Components** - Added icon_download, icon_lock, and icon_search components to Icons module for comprehensive coverage
- **Icon Documentation** - Enhanced Icons module with detailed component documentation and usage examples
- **HTML Email Templates** - Added professional HTML versions for all authentication emails (confirmation, password reset, email update) with responsive design and consistent branding
- **Site URL Configuration** - Email links now use site_url setting from Settings panel when configured, providing full control over email URLs in production environments
### Fixed
- **Icon Reference** - Fixed incorrect icon_check_circle reference to icon_check_circle_filled in magic_link_live.ex
- **Code Readability** - Removed unnecessary alias expansion braces for single module imports
## 1.2.8 - 2025-09-17
### Improved
- **Asset Build Pipeline** - Enhanced asset rebuilding using standard Phoenix asset pipeline (mix assets.build) with intelligent fallbacks to esbuild, tailwind, and npm commands for better compatibility
- **Dynamic URL Prefix Handling** - Replaced hardcoded /phoenix_kit/ paths with dynamic Routes.path() throughout the codebase for proper prefix support
- **Code Quality** - Improved code formatting, comment alignment, and whitespace consistency across all modules
- **Installation Messages** - Enhanced user feedback messages with dynamic prefix support and clearer instructions
### Fixed
- **Hardcoded Paths** - Replaced static URL paths with dynamic prefix resolution using PhoenixKit.Utils.Routes
- **Asset Rebuild Process** - Asset builder now tries multiple commands in order of preference for maximum compatibility
### Removed
- **SimpleTest File** - Removed unused development test artifact (simple_test.ex)
## 1.2.7 - 2025-09-16
### Added
- **Email Navigation** - Added Email Metrics, Email Queue, and Email Blocklist pages to admin navigation menu
- **Email Blocklist System (V09 Migration)** - Complete email blocklist functionality with temporary/permanent blocks, reason management, and audit trail
- **Email Routes** - Added routes for all Email LiveView pages in admin integration
- **Users Menu Grouping** - Reorganized admin navigation with expandable Users and Email groups using HTML5 details/summary
- **Migration Documentation** - Comprehensive migration system documentation with all version paths and rollback options
### Fixed
- **Email Cleanup Task Pattern Matching** - Fixed Dialyzer warning about Emails.enabled?() pattern matching
- **Dashboard Add User Button** - Corrected navigation from dashboard Add User button to proper /admin/users/new route
- **Migration V09 Primary Key** - Fixed duplicate column 'id' error in phoenix_kit_email_blocklist table creation
### Improved
- **Navigation Menu Structure** - Replaced custom JavaScript with native HTML5 details/summary for better reliability and performance
- **Email Group Organization** - Email, Metrics, Queue, and Blocklist now properly grouped under Email section
## 1.2.6 - 2025-09-15
### Added
- **Admin Password Change Feature** - Direct password change capability for administrators in user edit form
- **Username Search Integration** - Added username search to referral code beneficiary selection and main user dashboard
- **Username Implementation** - Added optional username field with automatic generation from email for new user registrations
### Fixed
- **Form Validation Display Issues** - Replaced static validator hints with proper Phoenix LiveView components using phx-no-feedback:hidden
- **Dark Theme Compatibility** - Improved password management sections with theme-adaptive styling
### Improved
- **Date Formatting** - Updated referral dashboard to use user settings-aware date formatting
- **Dynamic Routing** - Replaced hardcoded /phoenix_kit/ paths with PhoenixKit.Utils.Routes.path() throughout referral codes
- **Admin UI Experience** - Enhanced password management with both direct change and email reset options
## 1.2.5 - 2025-09-12
### Added
- **Emails Foundation** with email logging and event management schemas
- **Email Rate Limiting Core** with basic rate limiting functionality and blocklist management
- **Email Database Schema (V07)** with optimized tables and proper indexing
- **Email Interceptor System** for pre-send filtering and validation capabilities
- **Webhook Processing Foundation** for AWS SES event handling (bounces, complaints, opens, clicks)
- **get_mailer/0 function** in PhoenixKit.Config for improved mailer integration
- **RepoHelper Integration** for proper database access patterns in emails modules
### Fixed
- **All compilation warnings (40 → 0)** - 100% improvement in code cleanliness
- **PhoenixKit.Repo undefined references** - proper integration with PhoenixKit.RepoHelper
- **Unused variable warnings** throughout the codebase
- **Pattern matching issues** in error handling code
- **Missing @moduledoc** for EmailBlocklist schema
### Improved
- **Credo warnings (30 → 5)** - 83% improvement in code quality metrics
- **Dialyzer warnings (40 → 4)** - 90% improvement in type checking
- **Code formatting** with proper number formatting (86_400 vs 86400)
- **Code efficiency** with optimized Enum operations (map_join vs map + join)
- **Function complexity** by extracting nested logic into helper functions
- **Error handling** by replacing explicit try blocks with case/with patterns
- **Alias ordering** alphabetically in imports
- **Trailing whitespace** removal across codebase
### Technical Improvements
- **Memory-efficient patterns** preparation for future batch processing
- **Comprehensive input validation** for emails data
- **SQL injection protection** with parameterized queries
- **Professional code structure** following PhoenixKit conventions
- **Enhanced error handling** with proper rescue clauses and pattern matching
## 1.2.4 - 2025-09-11
### Added
- Complete referral codes with comprehensive management interface
- Referral code creation, validation, and usage management functionality
- Admin modules page for system-wide module management and configuration
- Flexible expiration system with optional "no expiration" support for referral codes
- Advanced admin settings for referral code limits with real-time validation:
- Maximum uses per referral code (configurable limit)
- Maximum referral codes per user (configurable limit)
- Beneficiary system allowing referral codes to be assigned to specific users
- User search functionality with real-time filtering for beneficiary assignment
- Hierarchical navigation structure with "Modules" parent and nested "Referral Codes" item
- Professional referral code generation with confusion-resistant character set
- Settings persistence system with module-specific organization
- Introduced custom prefix in the config (/phoenix_kit to something else)
### Changed
- Improved form component alignment and styling in referral code forms
- Updated core input components to fix layout issues with conditional labels
- Reorganized admin settings order for better user experience
- Strengthened form validation with real-time feedback and error handling
### Fixed
- Settings persistence ensuring values are properly saved and loaded from database
## 1.2.3 - 2025-09-11
### Added
- Enhanced `mix phoenix_kit.status` task with hybrid repository detection and fallback strategies
- Comprehensive status diagnostics with detailed database connection reporting
- Application startup management for reliable status checking in various project configurations
- Intelligent repository detection supporting both configured and auto-detected repositories
- Mailer delegation support with automatic parent application mailer detection
- Comprehensive AWS SES configuration with automatic Finch HTTP client setup
- Finch HTTP client integration for email adapters (SendGrid, Mailgun, AWS SES)
- Auto-detection of existing mailer modules in parent applications
- Enhanced email configuration with configurable sender name and email address
- Production-ready email templates for SMTP, SendGrid, Mailgun, and AWS SES
- Complete AWS SES setup guide with step-by-step checklist and region configuration
- Automatic dependency management for gen_smtp when using AWS SES
- Swoosh API client configuration for HTTP-based email adapters
### Changed
- Asset rebuild system simplified to consistently recommend rebuilds for better reliability
- Status task now provides more detailed verbose diagnostics for troubleshooting
- Update task now delegates status display to dedicated status command for consistency
- Removed complex asset checking logic in favor of straightforward rebuild recommendations
- Email system architecture now supports both delegation and built-in modes
- Mailer configuration defaults to using parent application's existing mailer when available
- Installation process automatically configures appropriate email dependencies
- Documentation restructured with detailed provider-specific setup guides
- PhoenixKit.Mailer module enhanced with delegation capabilities
### Fixed
- Critical CSS integration bug where regex patterns incorrectly matched file paths containing "phoenix_kit" substring
- CSS integration now properly detects only exact PhoenixKit dependency paths (../../deps/phoenix_kit) and ignores false matches like "test_phoenix_kit_v1_web"
- Improved pattern matching specificity to prevent installation failures in projects with similar naming
- Trailing whitespace issues across multiple files for better code quality
- Unused alias imports in tasks and modules
- Dialyzer warnings by updating ignore patterns for better type checking
- Email sender configuration now properly supports custom from_email and from_name settings
- Production email setup documentation with comprehensive provider examples
- Mailer integration patterns for better parent application compatibility
## 1.2.2 - 2025-09-08
### Added
- Comprehensive asset rebuild system with `mix phoenix_kit.assets.rebuild` task for automatic CSS integration
- System status checker with `mix phoenix_kit.status` task for installation diagnostics
- Asset management tools for PhoenixKit CSS integration updates and Tailwind CSS compatibility
- Common utility functions in `PhoenixKit.Install.Common` for version checking and installation management
- Helper functions for better code organization and separation of concerns
- Progress tracking and enhanced user feedback for migration operations
- Type specifications for Mix.Task modules and asset rebuild functions
### Changed
- CSS integration workflow simplified with better Tailwind CSS 4 support and @source directive optimization
- Migration function refactored to reduce cyclomatic complexity and improve maintainability
- Code organization improved with extraction of helper functions across multiple modules
- Enhanced error handling and user notifications for asset rebuild operations
### Fixed
- All Credo static analysis warnings (trailing whitespace, formatting issues, deep nesting)
- All Dialyzer type analysis warnings with proper function specifications
- CSS integration logic and @source directive paths for correct asset compilation
- Complex migration function broken down into smaller, more maintainable functions
- Conditional statements simplified (cond to if) for better code clarity
## 1.2.1 - 2025-09-07
### Added
- Project title customization system with dynamic branding across all admin interfaces
- Project title integration in authentication pages (login and registration)
- Time display enhancement showing both date and time in Users and Sessions tables
- Settings-aware date/time formatting functions for consistent user preferences
### Changed
- Date handling moved from PhoenixKit.Date to PhoenixKit.Utils.Date for better organization
- All admin pages now consistently display custom project title instead of hardcoded "PhoenixKit"
- Enhanced admin interface with unified project branding throughout navigation
- Login and registration pages now show custom project title in headings and browser tabs
- Changed config and magic link
## Fixed
- Fixed asset rebuilding integration in migration strategy
## 1.2.0 - 2025-09-03
### Added
- User settings system with customizable time zone, date format, and time format preferences
- Comprehensive session management system for admin interface with real-time monitoring
- Live data updates system for admin panels with automatic refresh capabilities
- Automatic user logout functionality when role changes occur for enhanced security
- DateTime formatting functions with Timex library integration for better date/time handling
- Enhanced authentication session management for improved user experience
### Changed
- Authentication components updated with GitHub-inspired design and unified development notices
- Date handling refactored into separate PhoenixKit.Date module (aliased as PKDate) for better organization
- User dashboard "Registered" field now uses enhanced date formatting from settings
- Improved code quality and PubSub integration for better real-time communication
### Fixed
- Missing admin routes for settings and modules sections
- Dialyzer type errors resolved across the codebase
- Live Activity link in dashboard now correctly navigates to intended destination
- Settings tab information updated with accurate user preferences display
## 1.1.1 - 2025-09-02
### Added
- Profile settings functionality with first name and last name fields
- Profile changeset function for user profile updates
- Complete profile editing interface in user settings
### Fixed
- Router integration by removing unnecessary redirect pipe for login route
- Added admin shortcut route for improved navigation
- Enhanced admin dashboard accessibility
## 1.1.0 - 2025-09-01
### Changed
- **BREAKING**: Simplified role system by removing `is_active` column from role assignments
- Role removal now permanently deletes assignment records instead of soft deactivation
- All role-related functions updated to work with direct deletion approach
- Improved performance by eliminating `is_active` filtering in database queries
- Documenatation link fixed for hex
### Added
- V02 migration for upgrading existing installations to simplified role system
- Enhanced migration system with comprehensive upgrade path from V01 to V02
- Pre-migration reporting with warnings about inactive assignments that will be deleted
- Rollback support for V02 migration (though inactive assignments cannot be restored)
### Fixed
- Test suite updated to reflect schema new changes
### Migration Notes
- Existing V01 installations can upgrade using `mix phoenix_kit.update`
- V02 migration will permanently delete any inactive role assignments
- New installations will use V02 schema without `is_active` column
## 1.0.0 - 2025-08-29
Initial version with basic functionality, mostly around authorization and user registration with roles. Also admin page for admin users with User section.