{"id":14956022,"url":"https://github.com/radf0x/domain-generator","last_synced_at":"2025-10-24T09:30:26.568Z","repository":{"id":56844334,"uuid":"196344355","full_name":"radf0x/domain-generator","owner":"radf0x","description":"A gem that generate boilerplates when creating new domain services","archived":false,"fork":false,"pushed_at":"2019-07-12T05:41:20.000Z","size":5,"stargazers_count":12,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T14:18:28.531Z","etag":null,"topics":["boilerplates","ddd","dry-rb","generators","rails","ruby","ruby-gems","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radf0x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T07:39:17.000Z","updated_at":"2019-12-23T19:22:57.000Z","dependencies_parsed_at":"2022-08-26T16:00:39.592Z","dependency_job_id":null,"html_url":"https://github.com/radf0x/domain-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radf0x%2Fdomain-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radf0x%2Fdomain-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radf0x%2Fdomain-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radf0x%2Fdomain-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radf0x","download_url":"https://codeload.github.com/radf0x/domain-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237944048,"owners_count":19391588,"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":["boilerplates","ddd","dry-rb","generators","rails","ruby","ruby-gems","ruby-on-rails"],"created_at":"2024-09-24T13:12:11.809Z","updated_at":"2025-10-24T09:30:25.763Z","avatar_url":"https://github.com/radf0x.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rails generator for Domain-driven design application\r\n\r\n![Demo](https://media.giphy.com/media/J4ssLyT6AGr8dX1tCW/giphy.gif)\r\n\r\n# Supporting Rails 3.2.0 or above\r\n\r\n# How to use\r\n\r\n1. Install:\r\n```\r\n$ gem install domain-generator\r\n```\r\n2.  Gemfile:\r\n```ruby\r\ngem 'domain-generator', '~\u003e 0.1.0'\r\n```\r\n3. Build the gem yourself:\r\n```\r\n$ gem build domain-generator.gemspec\r\n```\r\n3. Try it out:\r\n```\r\n$ rails generate domain [DOMAIN_NAME] [options]\r\n```\r\n### Options\r\n1. `--include-dry` | `--no-include-dry`\r\n    - Generate class and spec with [dry-monads](https://dry-rb.org/gems/dry-monads)\r\n2. `--repo` | `--no-repo`\r\n    - Generate repository class for the model\r\n3. `--app-service`\r\n    - Generate the application service class\r\n4. `--service`\r\n    - Generate the service class\r\n5. `--model`\r\n    - Generate the Entity / Model class\r\n### To generate everything\r\n![All](https://media.giphy.com/media/h2OFhJeYBdPzXqyLrU/giphy.gif)\r\n### To generate model without repository\r\n![No Repo](https://media.giphy.com/media/dzPGZiK5sWSsYzh9I3/giphy.gif)\r\n### You can also just generate a particular class and spec\r\n![App Service](https://media.giphy.com/media/frHRLBfe7wqfobN51H/giphy.gif)\r\n### It won't generate anything if only domain name is provided\r\n![Nothing](https://media.giphy.com/media/kdLVazlxTqX24tk4bw/giphy.gif)\r\n### Of course all of them can be deleted easily\r\n![Delete](https://media.giphy.com/media/jqk7Z6AzaguUNCdn5g/giphy.gif)\r\n### Folder structure:\r\n#### App:\r\n```\r\napp/domain\r\n└── pet_management\r\n    ├── app_services\r\n    │   └── register_dog.rb\r\n    ├── infrastructures\r\n    │   └── repos\r\n    │       └── dog.rb\r\n    └── services\r\n        ├── models\r\n        │   └── dog.rb\r\n        └── validate_dog.rb\r\n```\r\n#### RSpec:\r\n```\r\nspec/domain\r\n└── pet_management\r\n    ├── app_services\r\n    │   └── register_dog_spec.rb\r\n    ├── infrastructures\r\n    │   └── repos\r\n    │       └── dog_spec.rb\r\n    └── services\r\n        ├── models\r\n        │   └── dog_spec.rb\r\n        └── validate_dog_spec.rb\r\n```\r\n#### A model factory to give you a starting point with [FactoryBot](http://github.com/thoughtbot/factory_bot_rails)\r\n```\r\ntest/factories\r\n└── Dog.rb\r\n```\r\n___\r\n## TODO:\r\n1. Generate class and spec seperately.\r\n2. Validate arguements must be in CamelCase.\r\n3. Generate repository class without dry stuff.\r\n4. Depends on what's on the issue list I guess.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradf0x%2Fdomain-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradf0x%2Fdomain-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradf0x%2Fdomain-generator/lists"}