Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
157438a
Added username to the user editing page and custom fields.
Nov 17, 2025
22e7470
Added profile image editing on the phoenix side user editing
Nov 18, 2025
aad7dfe
Updated user admin edit page to have media selector and not uploader
Nov 18, 2025
5262a4f
Changed default bucket to priv/media from priv/uploads
Nov 18, 2025
07e481e
Showing error box when tyring to upload without any buckets enabled
Nov 18, 2025
7239a44
Renamed the apply button to correct name, moved the buttons around an…
Nov 18, 2025
d24e5f1
Added icons to the bucket types for clarity
Nov 19, 2025
6b1289b
Moved the media button to separate place outside of the user submenus
Nov 19, 2025
3b87469
Renamed the Storage settings to Media
Nov 19, 2025
de0682d
Renamed storage settings link to media
Nov 19, 2025
2fc116d
Removed Timex dep in favor of using the srtoftime elixir built in fun…
Nov 19, 2025
48b2d81
Updating igniter to create oban config and tables needed for instance…
Nov 19, 2025
c8d11db
Update blog editor featured image selector UI for better UX
mdon Nov 16, 2025
9bd7255
Improve blogging editor component insertion and video rendering
mdon Nov 16, 2025
5324404
Enhance blogging editor component tooling and video renderer
mdon Nov 16, 2025
9363180
Update RateLimiter to use Hammer 7.x API
Nov 17, 2025
7ab3836
Add user impersonation to roadmap
ddon Nov 16, 2025
8a8c3fe
Preparation for 1.6.5 release
Nov 17, 2025
0b4dd72
Refactor ueberauth config usage
construct-d Nov 18, 2025
cee38d1
Change module usage
construct-d Nov 18, 2025
4b2fe2a
Add SEO module with configurable noindex directive
mdon Nov 18, 2025
cf9a588
Fix navigation hover state overriding active item styling
mdon Nov 18, 2025
f138d89
Add exact_match_only option to prevent parent nav highlighting on sub…
mdon Nov 18, 2025
43a0460
Add separate stat square for drafts on blogging dashboard
mdon Nov 18, 2025
1acfe4e
Standardize blog storage mode badges to use consistent light grey color
mdon Nov 18, 2025
b1c085c
Add timezone-aware formatting for blogging timestamps
mdon Nov 19, 2025
9ceb7aa
Update featured image file ID label to Phoenix Kit Media ID
mdon Nov 19, 2025
f761f3e
Add autosave functionality to blogging editor
mdon Nov 19, 2025
f935603
Fix blogging editor JavaScript for CSP-enabled environments
mdon Nov 19, 2025
b9c519e
Fix compiler warnings for unused variables
mdon Nov 19, 2025
94816c3
Fix Dialyzer warnings in RateLimiter and autosave code
mdon Nov 19, 2025
e7628fd
Deprecate reset_rate_limit due to Hammer 7.x API limitations
mdon Nov 19, 2025
dee1861
Fix Credo warnings by aliasing nested Backend module
mdon Nov 19, 2025
64b8ac2
Refactor blogging editor to reduce cyclomatic complexity
mdon Nov 19, 2025
80668c5
Fix code type warnings
construct-d Nov 19, 2025
cc059ea
Fix require usage
construct-d Nov 19, 2025
67f8ccf
Merge branch 'dev' into dev
alexdont Nov 19, 2025
3fd3641
Fixed issues with hammer not allowing logins or registers of new users
Nov 19, 2025
4635290
Updated igniter to add oban config to the parent project
Nov 20, 2025
2540c17
Credo issues
Nov 20, 2025
41b3364
Updated media details page
Nov 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ config :phoenix_kit, PhoenixKit.Mailer, adapter: Swoosh.Adapters.Local

# Note: Hammer rate limiting configuration is automatically added to parent
# applications via mix phoenix_kit.install/update tasks
# For standalone development, configure Hammer here:
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}

# Configure Ueberauth (minimal configuration for compilation)
# Applications using PhoenixKit should configure their own providers
Expand Down
28 changes: 28 additions & 0 deletions lib/mix/tasks/phoenix_kit.install.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
MailerConfig,
MigrationStrategy,
OAuthConfig,
ObanConfig,
RateLimiterConfig,
RepoDetection,
RouterIntegration
Expand Down Expand Up @@ -95,7 +96,9 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
|> MailerConfig.add_mailer_configuration()
|> RateLimiterConfig.add_rate_limiter_configuration()
|> OAuthConfig.add_oauth_configuration()
|> ObanConfig.add_oban_configuration()
|> ApplicationSupervisor.add_supervisor()
|> ObanConfig.add_oban_supervisor()
|> LayoutConfig.add_layout_integration_configuration()
|> CssIntegration.add_automatic_css_integration()
|> DemoFiles.copy_test_demo_files()
Expand Down Expand Up @@ -274,6 +277,7 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
PhoenixKit requires configuration for:
- Ueberauth (OAuth authentication)
- Hammer (rate limiting)
- Oban (background jobs for file processing)

This configuration will be added now.

Expand Down Expand Up @@ -316,6 +320,10 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
!has_active_hammer_config?(lines) ->
:missing

# Missing Oban configuration (check for active, non-commented config)
!has_active_oban_config?(lines) ->
:missing

# All required configuration present
true ->
:ok
Expand Down Expand Up @@ -348,6 +356,26 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
has_hammer_config and has_expiry_ms
end

# Check if active (non-commented) Oban configuration exists
defp has_active_oban_config?(lines) do
has_oban_config =
Enum.any?(lines, fn line ->
trimmed = String.trim(line)
# Not a comment and contains config :phoenix_kit, Oban
!String.starts_with?(trimmed, "#") and
String.contains?(line, "config :phoenix_kit, Oban")
end)

has_queues =
Enum.any?(lines, fn line ->
trimmed = String.trim(line)
# Not a comment and contains queues:
!String.starts_with?(trimmed, "#") and String.contains?(line, "queues:")
end)

has_oban_config and has_queues
end

# Add completion notice with essential next steps (reduced duplication)
defp add_completion_notice(igniter) do
notice = """
Expand Down
75 changes: 75 additions & 0 deletions lib/mix/tasks/phoenix_kit.update.ex
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
BasicConfiguration,
Common,
CssIntegration,
ObanConfig,
RateLimiterConfig
}

Expand Down Expand Up @@ -242,6 +243,10 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
!has_active_hammer_config?(lines) ->
:missing

# Missing Oban configuration (check for active, non-commented config)
!has_active_oban_config?(lines) ->
:missing

# All required configuration present
true ->
:ok
Expand Down Expand Up @@ -274,6 +279,26 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
has_hammer_config and has_expiry_ms
end

# Check if active (non-commented) Oban configuration exists
defp has_active_oban_config?(lines) do
has_oban_config =
Enum.any?(lines, fn line ->
trimmed = String.trim(line)
# Not a comment and contains config :phoenix_kit, Oban
!String.starts_with?(trimmed, "#") and
String.contains?(line, "config :phoenix_kit, Oban")
end)

has_queues =
Enum.any?(lines, fn line ->
trimmed = String.trim(line)
# Not a comment and contains queues:
!String.starts_with?(trimmed, "#") and String.contains?(line, "queues:")
end)

has_oban_config and has_queues
end

# Perform the igniter-based update logic
defp perform_igniter_update(igniter, opts) do
prefix = opts[:prefix] || "public"
Expand All @@ -285,6 +310,9 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do
# Ensure Hammer rate limiter configuration exists
igniter = validate_and_add_hammer_config(igniter)

# Ensure Oban configuration exists
igniter = validate_and_add_oban_config(igniter)

# Check if this is the first pass (config missing) or second pass (config exists)
config_status = Process.get(:phoenix_kit_config_status, :ok)

Expand Down Expand Up @@ -860,6 +888,53 @@ if Code.ensure_loaded?(Igniter.Mix.Task) do

Igniter.add_notice(igniter, String.trim(notice))
end

# Validate and add Oban configuration if missing
defp validate_and_add_oban_config(igniter) do
config_exists = ObanConfig.oban_config_exists?(igniter)
supervisor_exists = ObanConfig.oban_supervisor_exists?(igniter)

igniter =
if config_exists do
igniter
else
# Configuration missing, add it
igniter
|> ObanConfig.add_oban_configuration()
|> add_oban_config_added_notice()
end

# Check and add supervisor separately
if supervisor_exists do
igniter
else
igniter
|> ObanConfig.add_oban_supervisor()
|> add_oban_supervisor_added_notice()
end
end

# Add notice about Oban configuration being added
defp add_oban_config_added_notice(igniter) do
notice = """
⚠️ Added missing Oban configuration to config.exs
IMPORTANT: Restart your server if it's currently running.
Without Oban, the storage system cannot process uploaded files.
"""

Igniter.add_notice(igniter, String.trim(notice))
end

# Add notice about Oban supervisor being added
defp add_oban_supervisor_added_notice(igniter) do
notice = """
⚠️ Added Oban to application supervisor tree in application.ex
IMPORTANT: Restart your server if it's currently running.
Oban will now start automatically with your application.
"""

Igniter.add_notice(igniter, String.trim(notice))
end
end

# Fallback module for when Igniter is not available
Expand Down
Loading
Loading