원클릭으로
builderx-api-controllers
Guide to Phoenix Controller structure in builderx_api using FallbackController and standard tuple responses.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guide to Phoenix Controller structure in builderx_api using FallbackController and standard tuple responses.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Phoenix Channel patterns in landing_page_backend — real-time collaboration, WebSocket topics, broadcasting, and channel structure.
Guide to Context module patterns in landing_page_backend — Ecto queries, dynamic query building, Ecto.Multi, and Outbox messaging.
Guide to Phoenix Controller structure in landing_page_backend using FallbackController, tuple responses, and permission plugs.
Patterns for creating Oban background workers in landing_page_backend — queue configuration, job arguments, retry strategies, and dynamic query processing.
Custom Plug middleware patterns in landing_page_backend — authentication (JWT/Passport), authorization, permission checking, and rate limiting.
Guidelines for creating Ecto Schemas in landing_page_backend, including binary UUID primary keys, virtual fields, custom json/1 function, and multiple changeset patterns.
| name | builderx_api-controllers |
| description | Guide to Phoenix Controller structure in builderx_api using FallbackController and standard tuple responses. |
| metadata | {"author":"Vũ Lưu","version":"2026.03.25","source":"Source code builderx_api"} |
Conventions for handling HTTP requests and responses at the Web API layer.
| Topic | Description | Reference |
|---|---|---|
| FallbackController | Centralized response handling via tuples | core-fallback |
| Tuple Returns | Standard formats like {:success, ...} or {:failed, ...} | core-fallback |
defmodule BuilderxApiWeb.V1.ExampleController do
use BuilderxApiWeb, :controller
def show(conn, %{"id" => id}) do
# Context functions should return tuples compatible with FallbackController instead of standard {:ok, data}
# Example:
{:success, :with_data, %{id: id, name: "Sample"}}
end
def delete(conn, _params) do
# Return success without data
{:success, :success_only}
end
def create(conn, _params) do
# Return failure with a custom reason
{:failed, :with_reason, "Invalid input data"}
# Or return an error from a Changeset validation failure
# {:error, changeset}
end
end