GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - servactory/servactory: Powerful Service Object for Ruby applications

BranchesTags
Open more actions menu

Latest commit

 

History

648 Commits
648 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bin
bin
 
 
config/locales
config/locales
 
 
examples
examples
 
 
gemfiles
gemfiles
 
 
lib
lib
 
 
scripts
scripts
 
 
sig
sig
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.rubocop.yml
.rubocop.yml
 
 
.ruby-version
.ruby-version
 
 
.tool-versions
.tool-versions
 
 
.yardopts
.yardopts
 
 
Appraisals
Appraisals
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
Steepfile
Steepfile
 
 
rbs_collection.lock.yaml
rbs_collection.lock.yaml
 
 
rbs_collection.yaml
rbs_collection.yaml
 
 
servactory.gemspec
servactory.gemspec
 
 

Repository files navigation

Servactory

A set of tools for building reliable services of any complexity.

Gem version Release Date Downloads Ruby version

๐Ÿ“š Documentation

See servactory.com for comprehensive documentation, including:

  • Detailed guides for all features
  • Advanced configuration options
  • Best practices and patterns
  • Migration guides
  • API reference

๐Ÿ’ก Why Servactory?

Building reliable services shouldn't be complicated. Servactory provides a battle-tested framework for creating service objects with:

  • ๐Ÿ›ก๏ธ Type Safety - Enforce types on inputs and outputs, catch errors early
  • โœ… Built-in Validation - Rich validation DSL with custom rules
  • ๐Ÿงช Test-Friendly - RSpec matchers and service mocking helpers
  • ๐Ÿ“Š Structured Output - Consistent Result object pattern
  • ๐Ÿ”ง Highly Configurable - Extensions, helpers, and custom options
  • ๐Ÿ“š Well Documented - Comprehensive guides and examples

๐Ÿš€ Quick Start

Installation

gem "servactory"

Define service

class Users::Authenticate < Servactory::Base
  input :email, type: String
  input :password, type: String

  output :user, type: User

  make :authenticate!

  private

  def authenticate!
    if (user = User.authenticate_by(email: inputs.email, password: inputs.password)).present?
      outputs.user = user
    else
      fail!(message: "Authentication failed", meta: { email: inputs.email })
    end
  end
end

Usage in controller

class SessionsController < ApplicationController
  def create
    service = Users::Authenticate.call(**session_params)

    if service.success?
      session[:current_user_id] = service.user.id
      redirect_to service.user
    else
      flash.now[:alert] = service.error.message
      render :new, status: :unprocessable_entity
    end
  end

  private

  def session_params
    params.require(:session).permit(:email, :password)
  end
end

๐Ÿงฉ Ecosystem

  • Stroma โ€” A foundation for building modular, extensible DSLs in Ruby
  • OpenTelemetry Instrumentation โ€” Automatic tracing of service calls and actions with span attributes and failure detection

๐Ÿค Contributing

We love contributions! Check out our Contributing Guide to get started.

Ways to contribute:

  • ๐Ÿ› Report bugs and issues
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿ“ Improve documentation
  • ๐Ÿงช Add test cases
  • ๐Ÿ”ง Submit pull requests

๐Ÿ™ Acknowledgments

Special thanks to all our contributors!

๐Ÿ“„ License

Servactory is available as open source under the terms of the MIT License.

About

Powerful Service Object for Ruby applications

servactory.com

Topics

railsrubyruby-on-railsservactoryservice-factoryservice-objectservice-objectsservices

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

37 stars

Watchers

3 watching

Forks

4 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.