Admin LiveView for the Hello World plugin module — the "landing page" of the showcase.
This is the page users see when they click the "Hello World" tab in the admin sidebar. PhoenixKit wraps it in the admin layout automatically — you get the sidebar, header, and theme for free.
How routing works
You do NOT need to add routes manually. The live_view field in
PhoenixKitHelloWorld.admin_tabs/0 tells PhoenixKit to generate:
live "/admin/hello-world", PhoenixKitHelloWorld.Web.HelloLive, :indexat compile time, inside the admin live_session with the admin layout applied.
Activity logging demo
The "Log demo event" button below shows the canonical PhoenixKit activity logging pattern. Every mutating operation in your module should log an activity so actions are auditable in the Events tab and the global /admin/activity page.
See log_demo_event/1 for the pattern — all logging is wrapped in
Code.ensure_loaded?/1 so your module doesn't hard-require PhoenixKit.Activity.
Assigns available
PhoenixKit's on_mount hooks inject these assigns into every admin LiveView:
@phoenix_kit_current_scope— the authenticated user's scope (role, permissions)@phoenix_kit_current_user— the authenticated user struct (has.uuid,.email, etc.)@current_locale— the current locale string@url_path— the current URL path (used for active nav highlighting)