{"id":16382486,"url":"https://github.com/andyobtiva/ultra_light_wizard","last_synced_at":"2025-07-01T09:07:58.070Z","repository":{"id":5974732,"uuid":"7196607","full_name":"AndyObtiva/ultra_light_wizard","owner":"AndyObtiva","description":"No time to manage a wizard state machine, session variables, or complicated controllers? Use ultra light wizard!! A RESTful session-less validation-friendly simple multi-step form approach in Rails.","archived":false,"fork":false,"pushed_at":"2022-03-01T15:06:04.000Z","size":383,"stargazers_count":41,"open_issues_count":0,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-23T06:50:00.716Z","etag":null,"topics":["generator","rails","ruby","scaffold","wizard-steps"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndyObtiva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-16T23:11:46.000Z","updated_at":"2025-01-24T12:22:34.000Z","dependencies_parsed_at":"2022-08-27T20:03:22.579Z","dependency_job_id":null,"html_url":"https://github.com/AndyObtiva/ultra_light_wizard","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/AndyObtiva/ultra_light_wizard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyObtiva%2Fultra_light_wizard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyObtiva%2Fultra_light_wizard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyObtiva%2Fultra_light_wizard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyObtiva%2Fultra_light_wizard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndyObtiva","download_url":"https://codeload.github.com/AndyObtiva/ultra_light_wizard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndyObtiva%2Fultra_light_wizard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933317,"owners_count":23386784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["generator","rails","ruby","scaffold","wizard-steps"],"created_at":"2024-10-11T04:05:33.852Z","updated_at":"2025-07-01T09:07:58.033Z","avatar_url":"https://github.com/AndyObtiva.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ultra Light Wizard v0.1.4 (beta)\n================================\n\nNo time to manage a wizard state machine, session variables, or complicated controllers? Use Ultra Light Wizard!! A RESTful session-less validation-friendly simple multi-step form architectural pattern in Rails.\n\n![Ultra Light Wizard Image](https://cdn.rawgit.com/AndyObtiva/ultra_light_wizard/master/ultra_light_wizard.jpg)\n\nThis RailsConf 2014 talk video explains it all:\nhttps://www.youtube.com/watch?v=muyfoiKHMMA\n\nAnd, this blog summarizes it:\nhttps://andymaleh.blogspot.com/2013/10/ultra-light-maintainable-wizards-in.html\n\nPrinciples\n==========\n\n- REST: wizard (multi-step form) steps are represented as REST nested resources under the model resource being built\n- MVC: respects MVC separation of concerns\n- OO: honors OO principles of low coupling and high cohesion\n- Design Patterns: wizard (multi-step form) is simply a model Builder\n- DDD: supports domain concepts directly with customizable vocabulary\n- Non-Functional Requirements:\n  - Productivity: minimum effort for adding wizards (multi-step forms) and wizard steps\n  - Maintainability: minimum code to maintain while adhering to other principles\n  - Performance: stateless design means scalability\n  - Security: stateless design is compatible with Rails security measures\n\nDetails\n=======\n\nTo learn more about the Ultra Light Wizard architectural pattern philosophy and function, please read this blog post: [Ultra Light \u0026 Maintainable Wizard in Rails](https://andymaleh.blogspot.com/2013/10/ultra-light-maintainable-wizards-in.html)\n\n**Note**: Since Ultra Light Wizard is an architectural pattern that can be applied whether using this library or not, it is more important to understand it well first through watching the video and reading the article provided above. Afterward, you may use the library (or an Ultra Light Wizard compatible gem like [Wicked](https://rubygems.org/gems/wicked)) to get started quickly via Rails scaffolding for new project models or otherwise avoid by applying pattern manually for existing project models.\n\n![Ultra Light Wizard Step Breadcrumb](https://cdn.rawgit.com/AndyObtiva/ultra_light_wizard/master/ultra_light_wizard_step_breadcrumb.png)\n\n\nInstructions\n============\n\nAdd the following to your Rails project ```Gemfile```:\n\n```\ngem 'ultra_light_wizard', '~\u003e 0.1.4'\n```\n\nRun the command:\n\n```\nbundle\n```\n\nThen, use the following command in place of the Rails scaffold generator, and it will scaffold both standard resource components and wizard-related components:\n\n```\nrails generate ultra_light_wizard:scaffold (resource) steps:(step1),(step2),(step3),... attributes:(attribute1:db_type1),(attribute2:db_type2),...\n```\n\nThis will generate wizard (multi-step form) step routes, controller, models, and views\n\nExample:\n\n```\nrails generate ultra_light_wizard:scaffold Project steps:basic_info,project_detail,file_uploads,preview attributes:name:string,description:text,start_date:date,delivery_date:date\n```\n\nOutput:\n\n```\ngenerate  scaffold\n  invoke  active_record\n  create    db/migrate/20160201025849_create_projects.rb\n  create    app/models/project.rb\n  invoke    test_unit\n  create      test/models/project_test.rb\n  create      test/fixtures/projects.yml\n  invoke  resource_route\n   route    resources :projects\n  invoke  scaffold_controller\n  create    app/controllers/projects_controller.rb\n  invoke    erb\n  create      app/views/projects\n  create      app/views/projects/index.html.erb\n  create      app/views/projects/edit.html.erb\n  create      app/views/projects/show.html.erb\n  create      app/views/projects/new.html.erb\n  create      app/views/projects/_form.html.erb\n  invoke    test_unit\n  create      test/controllers/projects_controller_test.rb\n  invoke    helper\n  create      app/helpers/projects_helper.rb\n  invoke      test_unit\n  invoke    jbuilder\n  create      app/views/projects/index.json.jbuilder\n  create      app/views/projects/show.json.jbuilder\n  invoke  assets\n  invoke    coffee\n  create      app/assets/javascripts/projects.coffee\n  invoke    scss\n  create      app/assets/stylesheets/projects.scss\n  invoke  scss\nidentical    app/assets/stylesheets/scaffolds.scss\n    gsub  app/controllers/projects_controller.rb\n    gsub  app/controllers/projects_controller.rb\n  insert  app/controllers/projects_controller.rb\n    gsub  app/views/projects/index.html.erb\n  create  app/controllers/project_steps_controller.rb\n  create  app/helpers/project_steps_helper.rb\n  create  app/views/project_steps/_step_navigation.html.erb\n  create  app/models/project/name.rb\n  create  app/views/project_steps/name.html.erb\n  create  app/models/project/description.rb\n  create  app/views/project_steps/description.html.erb\n  create  app/models/project/start_date.rb\n  create  app/views/project_steps/start_date.html.erb\n  create  app/models/project/delivery_date.rb\n  create  app/views/project_steps/delivery_date.html.erb\n  create  app/models/project/preview.rb\n  create  app/views/project_steps/preview.html.erb\n   route  resources :projects, only: [:create, :show] do\nresources :project_steps, only: [:edit, :update]\nend\n```\n\nOnce the files are generated, you can proceed to place your own code customizations in the wizard step models and views.\n\nTo kick-off wizard, simply trigger the main model controller create action, and it will transition to the wizard step first step edit action.\n\nFor example, the following will kick-off the project wizard by creating a project and automatically redirecting to first step:\n\n```\n\u003c%= link_to 'New Project', projects_path, method: :post %\u003e\n```\n\nIf you'd like to customize the term \"step\", you can add a step_alias:(alias) option as in the following:\n\nExample:\n\n```\nrails generate ultra_light_wizard:scaffold Project step_alias:part steps:basic_info,project_detail,file_uploads,preview attributes:name:string,description:text,start_date:date,delivery_date:date\n```\n\nOutput:\n\n```\ngenerate  scaffold\n  invoke  active_record\n  create    db/migrate/20160201025849_create_projects.rb\n  create    app/models/project.rb\n  invoke    test_unit\n  create      test/models/project_test.rb\n  create      test/fixtures/projects.yml\n  invoke  resource_route\n   route    resources :projects\n  invoke  scaffold_controller\n  create    app/controllers/projects_controller.rb\n  invoke    erb\n  create      app/views/projects\n  create      app/views/projects/index.html.erb\n  create      app/views/projects/edit.html.erb\n  create      app/views/projects/show.html.erb\n  create      app/views/projects/new.html.erb\n  create      app/views/projects/_form.html.erb\n  invoke    test_unit\n  create      test/controllers/projects_controller_test.rb\n  invoke    helper\n  create      app/helpers/projects_helper.rb\n  invoke      test_unit\n  invoke    jbuilder\n  create      app/views/projects/index.json.jbuilder\n  create      app/views/projects/show.json.jbuilder\n  invoke  assets\n  invoke    coffee\n  create      app/assets/javascripts/projects.coffee\n  invoke    scss\n  create      app/assets/stylesheets/projects.scss\n  invoke  scss\nidentical    app/assets/stylesheets/scaffolds.scss\n    gsub  app/controllers/projects_controller.rb\n    gsub  app/controllers/projects_controller.rb\n  insert  app/controllers/projects_controller.rb\n    gsub  app/views/projects/index.html.erb\n  create  app/controllers/project_parts_controller.rb\n  create  app/helpers/project_parts_helper.rb\n  create  app/views/project_parts/_part_navigation.html.erb\n  create  app/models/project/name.rb\n  create  app/views/project_parts/name.html.erb\n  create  app/models/project/description.rb\n  create  app/views/project_parts/description.html.erb\n  create  app/models/project/start_date.rb\n  create  app/views/project_parts/start_date.html.erb\n  create  app/models/project/delivery_date.rb\n  create  app/views/project_parts/delivery_date.html.erb\n  create  app/models/project/preview.rb\n  create  app/views/project_parts/preview.html.erb\n   route  resources :projects, only: [:create, :show] do\nresources :project_parts, only: [:edit, :update]\nend\n```\n\nFeatures\n========\n\n- Ultra Light Wizard scaffold generator\n  + Scaffolding of main model controller/views/migration\n  + Routes\n  + Controller steps\n  + Model parts\n  + View parts\n  + View navigation\n  + Helper for ultra light wizard support\n  + Route helper methods\n  + Wizard kick-off helper/view\n  + Forms\n  + Support for attributes\n  + Form fields\n  + Custom name conventions\n  + Wizard step breadcrumb with easily stylable semantic markup\n  - [UPCOMING] JS Ajax support\n\nEnhancements\n============\n\nIf you are interested in having enhancements implemented, please report via a GitHub issue, describing the problem, providing use case examples, and suggesting solutions to implement.\n\nHistory\n=======\n\nv0.1.4 Step breadcrumb, having easily customizable semantic markup\nv0.1.3 test coverage with feature specs / fixed issue 4 Generate routes in the right order\nv0.1.2 ensure resource creation redirects to first step / include step helper in resource controller\nv0.1.1 includes permitted params and edit/update actions\nv0.1.0 initial implementation\n\nLicense\n=======\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyobtiva%2Fultra_light_wizard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyobtiva%2Fultra_light_wizard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyobtiva%2Fultra_light_wizard/lists"}