Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rider-kick

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rider-kick

  • 0.0.9
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RiderKick

This gem provides helper interfaces and classes to assist in the construction of application with Clean Architecture, as described in Robert Martin's seminal book.

Installation

Add this line to your application's Gemfile:

gem 'rider-kick'

And then execute:

    $ rails new kotaro_minami -d=postgresql -T --skip-javascript --skip-asset-pipeline
    $ bundle install
    $ bundle add rider-kick
    $ bundle add sun-sword
    $ rails generate rider_kick:clean_arch --setup
    $ rails db:drop db:create db:migrate db:seed
    $ rails generate rider_kick:structure Models::User actor:owner
    $ rails generate rider_kick:scaffold users scope:dashboard

Usage

Description:
     Clean Architecture generator
     rails new kotaro_minami -d=postgresql -T --skip-javascript --skip-asset-pipeline
     
Example:
    To Generate scaffold:
        bin/rails generate rider_kick:clean_arch --setup
        bin/rails generate rider_kick:structure Models::User actor:owner
        bin/rails generate rider_kick:scaffold users scope:dashboard

Philosophy

The intention of this gem is to help you build applications that are built from the use case down, and decisions about I/O can be deferred until the last possible moment.

Clean Architecture

This structure provides helper interfaces and classes to assist in the construction of application with Clean Architecture, as described in Robert Martin's seminal book.

- app
  - models
    - models
      - ...
  - domains 
    - core
      ...
        - entities (Contract Response)
        - builder
        - repositories (Business logic)
        - use_cases (Just Usecase)
        - utils (Class Reusable)

Screaming architecture - use cases as an organisational principle

Uncle Bob suggests that your source code organisation should allow developers to easily find a listing of all use cases your application provides. Here's an example of how this might look in a this application.

- app
  - models
    - models
      - ...
  - domains 
    - core
      ...
      - usecase
        - retail_customer_opens_bank_account.rb
        - retail_customer_makes_deposit.rb
        - ...

Note that the use case name contains:

  • the user role
  • the action
  • the (sometimes implied) subject
    [user role][action][subject].rb
    # retail_customer_opens_bank_account.rb
    # admin_fetch_info.rb [specific usecase]
    # fetch_info.rb [generic usecase] every role can access it

FAQs

Package last updated on 25 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc