A framework for building pluggable, composable business logic pipelines in Elixir.
Opus is an Elixir framework for structuring business logic into modular, reusable pipelines. It helps developers organize complex workflows by breaking them down into sequential, instrumented stages that can be composed, conditionally executed, and visually represented. It enforces a consistent error-handling pattern and provides tools for monitoring and debugging.
Elixir developers building applications with complex business logic, such as web services, data processing systems, or API integrations, who need to maintain clear, observable, and maintainable workflows.
Developers choose Opus for its declarative pipeline composition, built-in instrumentation and Telemetry integration, and visual graph generation, which together provide predictability, observability, and maintainability for business logic over raw Elixir code or less structured alternatives.
A framework for pluggable business logic components
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a macro-based syntax for defining step, check, tee, and link stages, making complex workflows readable and modular, as demonstrated in the ArithmeticPipeline example.
Automatically instruments each stage and integrates with Elixir's Telemetry library, enabling easy monitoring and metrics collection without manual configuration.
Enforces a uniform {:ok, value} | {:error, error} return pattern and converts exceptions to error tuples by default, ensuring predictable failure modes across pipelines.
Optional opus_graph package generates Graphviz diagrams of pipeline dependencies, aiding in understanding and debugging complex logic flows, though it requires extra setup.
Pipelines run stages linearly without built-in parallelism, which can hinder performance for independent operations that could benefit from concurrent execution.
Introduces a custom domain-specific language with macros and stage options, requiring developers to learn Opus-specific constructs beyond standard Elixir patterns.
Graph generation depends on installing Graphviz and the opus_graph package, adding setup complexity and potential environment compatibility issues.