{"id":13394945,"url":"https://github.com/trailblazer/trailblazer","last_synced_at":"2026-03-27T02:43:51.249Z","repository":{"id":9159961,"uuid":"10955751","full_name":"trailblazer/trailblazer","owner":"trailblazer","description":"The advanced business logic framework for Ruby.","archived":false,"fork":false,"pushed_at":"2025-07-15T09:40:43.000Z","size":1619,"stargazers_count":3480,"open_issues_count":37,"forks_count":142,"subscribers_count":99,"default_branch":"master","last_synced_at":"2026-03-22T20:02:26.632Z","etag":null,"topics":["architecture"],"latest_commit_sha":null,"homepage":"http://trailblazer.to","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trailblazer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-06-26T02:03:42.000Z","updated_at":"2026-03-19T18:00:59.000Z","dependencies_parsed_at":"2023-02-14T08:35:15.226Z","dependency_job_id":"5a0f38c7-47b6-4293-b256-c94d1c1a40df","html_url":"https://github.com/trailblazer/trailblazer","commit_stats":{"total_commits":1097,"total_committers":45,"mean_commits":"24.377777777777776","dds":0.0920692798541477,"last_synced_commit":"e79563ea982dfd34221e5c0a96749a6559fff5b2"},"previous_names":["apotonick/trailblazer"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/trailblazer/trailblazer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailblazer%2Ftrailblazer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailblazer%2Ftrailblazer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailblazer%2Ftrailblazer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailblazer%2Ftrailblazer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trailblazer","download_url":"https://codeload.github.com/trailblazer/trailblazer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trailblazer%2Ftrailblazer/sbom","scorecard":{"id":896620,"data":{"date":"2025-08-11","repo":{"name":"github.com/trailblazer/trailblazer","commit":"4d49a1601875d2223c3ac78c5c0d52610f9e2a6f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":1,"reason":"0 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 3/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/trailblazer/trailblazer/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/trailblazer/trailblazer/ci.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T13:57:31.351Z","repository_id":9159961,"created_at":"2025-08-24T13:57:31.351Z","updated_at":"2025-08-24T13:57:31.351Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30847008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-23T01:54:41.487Z","status":"online","status_checked_at":"2026-03-23T02:00:09.028Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture"],"created_at":"2024-07-30T17:01:36.993Z","updated_at":"2026-03-27T02:43:51.201Z","avatar_url":"https://github.com/trailblazer.png","language":"Ruby","funding_links":[],"categories":["Ruby","Abstraction","Business logic","Web Frameworks"],"sub_categories":[],"readme":"# Trailblazer\n\n_Battle-tested Ruby framework to help structuring your business logic._\n\n[![Gem Version](https://badge.fury.io/rb/trailblazer.svg)](http://badge.fury.io/rb/trailblazer)\n\n## What's Trailblazer?\n\nTrailblazer introduces new abstraction layers into Ruby applications to help you structure your business logic.\n\nIt ships with our canonical \"service object\" implementation called *operation*, many conventions, gems for testing, Rails support, optional form objects and much more.\n\n## Should I use Trailblazer?\n\nGive us a chance if you say \"yes\" to this!\n\n* You hate messy controller code but don't know where to put it?\n* Moving business code into the \"fat model\" gives you nightmares?\n* \"Service objects\" are great?\n* Anyhow, you're tired of 12 different \"service object\" implementations throughout your app?\n* You keep asking for additional layers such as forms, policies, decorators?\n\nYes? Then we got a well-seasoned framework for you: [Trailblazer](https://trailblazer.to/2.1).\n\nHere are the main concepts.\n\n## Operation\n\nThe operation encapsulates business logic and is the heart of the Trailblazer architecture.\n\nAn operation is not just a monolithic replacement for your business code. It's a simple orchestrator between the form objects, models, your business code and all other layers needed to get the job done.\n\n```ruby\n# app/concepts/song/operation/create.rb\nmodule Song::Operation\n  class Create \u003c Trailblazer::Operation\n    step :create_model\n    step :validate\n    left :handle_errors\n    step :notify\n\n    def create_model(ctx, **)\n      # do whatever you feel like.\n      ctx[:model] = Song.new\n    end\n\n    def validate(ctx, params:, **)\n      # ..\n    end\n    # ...\n  end\nend\n```\n\nThe `step` DSL takes away the pain of flow control and error handling. You focus on _what_ happens: creating models, validating data, sending out notifications.\n\n### Control flow\n\nThe operation takes care _when_ things happen: the flow control. Internally, this works as depicted in this beautiful diagram.\n\n![Flow diagram of a typical operation.](https://github.com/trailblazer/trailblazer/blob/master/doc/song_operation_create.png?raw=true)\n\nThe best part: the only way to invoke this operation is `Operation.call`. The single entry-point saves programmers from shenanigans with instances and internal state - it's proven to be an almost bullet-proof concept in the past 10 years.\n\n```ruby\nresult = Song::Operation::Create.(params: {title: \"Hear Us Out\", band: \"Rancid\"})\n\nresult.success? #=\u003e true\nresult[:model]  #=\u003e #\u003cSong title=\"Hear Us Out\" ...\u003e\n```\n\nData, computed values, statuses or models from within the operation run are exposed through the `result` object.\n\nOperations can be nested, use composition and inheritance patterns, provide [variable mapping](https://trailblazer.to/2.1/docs/activity#activity-variable-mapping) around each step, support dependency injection, and save you from reinventing the wheel - over and over, again.\n\nLeveraging those functional mechanics, operations encourage a high degree of encapsulation while giving you all the conventions and tools for free (except for a bit of a learning curve).\n\n### Tracing\n\nIn the past years, we learnt from some old mistakes and improved developer experience. As a starter, check out our built-in tracing!\n\n```ruby\nresult = Song::Operation::Create.wtf?(params: {title: \"\", band: \"Rancid\"})\n```\n\n![Tracing the internal flow of an operation.](https://github.com/trailblazer/trailblazer/blob/master/doc/song_operation_create_trace.png?raw=true)\n\nWithin a second you know which step failed - a thing that might seem trivial, but when things grow and a deeply nested step in an iteration fails, you will start loving `#wtf?`! It has saved us days of debugging.\n\nWe even provide a [visual debugger](https://trailblazer.to/2.1/pro) to inspect traces on the webs.\n\n## There's a lot more\n\nAll our abstraction layers such as [operations](https://trailblazer.to/2.1/docs/operation), [form objects](https://trailblazer.to/2.1/docs/reform.html), [view components](https://trailblazer.to/2.1/docs/cells.html) and much more are used in [hundreds of OSS projects](https://github.com/trailblazer/trailblazer/network/dependents) and commercial applications in the Ruby world.\n\nRecently, we [released](https://dev.to/trailblazer/unit-tests-in-trailblazer-less-code-more-coverage-4oig) the [trailblazer-test](https://trailblazer.to/2.1/docs/test/) gem along with support for RSpec to easily write operation unit tests.\n\n```ruby\nit \"passes with valid input\" do\n  assert_pass Song::Operation::Create, valid_input,\n    title: \"Hear us out\",\n    persisted?: true\nend\n```\n\nWe provide a [visual debugger](https://pro.trailblazer.to), a [BPMN editor](https://trailblazer.to/2.1/docs/workflow) for long-running business processes, [thorough documentation](https://trailblazer.to/2.1/docs/trailblazer.html) and a growing list of onboarding videos ([**TRAILBLAZER TALES**](https://www.youtube.com/channel/UCi2P0tFMtjMUsWLYAD1Ezsw)).\n\nTrailblazer is both used for refactoring legacy apps (we support Ruby 2.5+) and helps big teams organizing, structuring and debugging modern, growing (Rails) applications.\n\n## Documentation\n\n* **The current version is Trailblazer 2.1.** We do have comprehensive [API documenation](https://trailblazer.to/2.1/docs/trailblazer.html) ready for you. If you're new to TRB start with our [LEARN page](https://trailblazer.to/2.1/docs/trailblazer/#trailblazer-learn).\n* A migration guide from 2.0 can be found [on our website](https://trailblazer.to/2.1/docs/trailblazer.html#trailblazer-2-1-migration).\n* The [1.x documentation is here](http://trailblazer.to/2.0/gems/operation/1.1/index.html).\n\nMake sure to check out the new beginner's guide to learning Trailblazer. The [new book](https://leanpub.com/buildalib) discusses all aspects in a step-wise approach you need to understand Trailblazer's mechanics and design ideas.\n\n![The new begginer's guide.](https://github.com/trailblazer/trailblazer/blob/master/doc/s_hero.png?raw=true)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailblazer%2Ftrailblazer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrailblazer%2Ftrailblazer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrailblazer%2Ftrailblazer/lists"}