phoenix-channels-essentials
Installation
SKILL.md
Phoenix Channels Essentials
RULES
- Always authenticate in
connect/3— tokens must be verified; channels bypass the Plug pipeline - Authorize in
join/3— verify the user can access the requested topic - Use
handle_infor client-to-server,pushfor server-to-client,broadcastfor server-to-all - Keep channel modules thin — delegate business logic to context modules
- Use Presence for tracking connected users — don't roll your own presence tracking
- Return
{:reply, :ok, socket}or{:reply, {:error, reason}, socket}fromhandle_in— never silently drop messages