
Phoenix Api Channels
This gets you up to speed on building JSON APIs and real-time features with Phoenix on the BEAM. It covers the full stack: controllers with plugs and versioned routes, Ecto contexts for data ownership, WebSocket Channels for chat and notifications, Presence for tracking who's online, and PubSub for fan-out broadcasts. The guide is opinionated about keeping controllers thin and letting contexts own business logic, which matches idiomatic Phoenix. You'll want this when you need both REST endpoints and WebSocket bidirectionality in the same app, or when you're adding collaborative features that need fault-tolerant concurrency. It includes auth patterns, testing helpers, and telemetry setup. The coverage is practical without rehashing basic Elixir syntax.
- skills.sh installs
- 348
- GitHub stars
- 79
- last updated
- Aug 21, 2026
Install
$ npx -y skills add bobmatnyc/claude-mpm-skills --skill phoenix-api-channels --agent claude-codeInstalls into .claude/skills of the current project.
Files
Phoenix APIs, Channels, and Presence (Elixir/BEAM)
Phoenix excels at REST/JSON APIs and WebSocket Channels with minimal boilerplate, leveraging the BEAM for fault tolerance, lightweight processes, and supervised PubSub/Presence.
Core pillars
- Controllers for JSON APIs with plugs, pipelines, and versioning.
- Contexts own data (Ecto schemas + queries) and expose a narrow API to controllers/channels.
- Channels + PubSub for fan-out real-time updates; Presence for tracking users/devices.
- Auth via plugs (session/cookie for browser, token/Bearer for APIs), with signed params.
Project Setup
mix phx.new my_api --no-html --no-live
cd my_api
mix deps.get
mix ecto.create
mix phx.server
Key files:
lib/my_api_web/endpoint.ex— plugs, sockets, instrumentationlib/my_api_web/router.ex— pipelines, scopes, versioning, socketslib/my_api_web/controllers/*— REST/JSON controllerslib/my_api/*— contexts + Ecto schemas (ownership of data logic)lib/my_api_web/channels/*— Channel modules
Routing and Pipelines
Separate browser vs API pipelines; version APIs with scopes.
defmodule MyApiWeb.Router do
use MyApiWeb, :router
Sponsors
Details
- Repository
- github.com/bobmatnyc/claude-mpm-skills
- Category
- Backend & APIs
- First seen
- Jun 3, 2026
More from bobmatnyc/claude-mpm-skills
All 158- Digitalocean Containers Images347
- Hono Jsx347
- Langgraph346
- Pr Quality Checklist346
- Ecto Patterns345
- Vercel Observability345
- Media Transcoding344
- Clap341
- Phoenix Ops341
- Prisma Orm341
- Graphql340
- Pre Merge339
- Vb6 Legacy338
- Vercel Functions Runtime338
- Vercel Overview338
- Vercel Security Access338
- Flexlayout React337
- Digitalocean Agentic Cloud334
- Artifacts Builder333
- Vercel Ai333
- Terraform332
- Validated Handler332
- Bad Example Skill329
- Emergency Release Workflow328