0.0
No release in over a year
A Ruby business logic framework
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

Nucleus Core Ruby

Gem Version Circle Code Climate

  • Overview
  • Supported Frameworks
  • Support
  • License
  • Code of conduct
  • Contribution guide

Overview

Nucleus Core provides a framework-agnostic foundation for encapsulating domain logic enabling seamless integration across various platforms and mediums.

It prescribes that a request is broken down as follows:

Device

  • Receives request

Framework

  • Formats request parameters and passes them to a receiver

Business Logic**

  • Authenticate & Authorize
  • Execute Operation/Workflow
  • Interact with data via repository
  • Return a view object

Framework

  • Renders view object given the requested format

Device

  • Device displays output to the medium it serves

Getting started

  1. Install the gem
gem install 'nucleus-core'
  1. Initialize and configure
require "nucleus-core"

NucleusCore.configure do |config|
  config.logger = Logger.new($stdout)
  config.default_response_format = :json # defaults to :json
  # The request_exceptions attribute allows you to define custom exception handling for different
  # HTTP error types. The keys are standard error names like :bad_request, :unauthorized, and :not_found,
  # and the values are the exception classes or errors you want to handle for each case.
  config.request_exceptions = {
    not_found: RecordNotFound,
    unprocessible: [RecordInvalid, RecordNotSaved],
    bad_request: ArgumentError,
    forbidden: NotPermittedError,
    unauthorized: UnAuthenticatedError
  }
end
  1. Refer to the 'How-To' section for guidance on expressing your business logic.

Supported Frameworks

Support

If you want to report a bug, or have ideas, feedback or questions about the gem, let me know via GitHub issues and we will do our best to provide a helpful answer, and if you'd like to support the mission donate

License

The gem is available under the terms of the proprietary software license.

Code of conduct

Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Contribution guide

Pull requests are welcome!