The Elixir Scribe tool aims to help developers to embody the values of discipline and craftsmanship of the Scribes, enabling them to more easily write clean code in a clean software architecture for enhanced developer experience and productivity.
Mix Task to generate the REST API folder structure organized by Domain, Resource and Actions
[!IMPORTANT]
→ To define which features from the README Roadmap will be free, only for sponsors, or only available in the PRO version.
Why?
To enable developers to write Clean Code in a Clean Software Architecture that respects the Single Responsibility Principle.
The traditional approach in software development tends to group all actions for a resource under the same module, which violates the Single Responsibility Principle because the module has more than one reason to change, as many as the number of actions on the resource.
What?
What to expect from this task is that when the developer executes the mix scribe.gen.restapi ... command in the terminal, the result is a folder structure where a module is created for each action of a REST API resource in a domain at lib/my_app_restapi/. This respects the Single Responsibility Principle because each module only has one reason to change: the logic for the single action it is responsible for.
This generator will also invoke mix scribe.gen.domain (issue #4) to generate the Domain, Resource and Actions for the core business logic.
When?
The developer should use this generator whenever they need to create a new feature that will be consumed via REST API endpoints.
Acceptance Criteria
Let's base the acceptance criteria's on a developer tasked with building an Online Shop.
Mix Task to generate the REST API folder structure organized by Domain, Resource and Actions
Why?
To enable developers to write Clean Code in a Clean Software Architecture that respects the Single Responsibility Principle.
The traditional approach in software development tends to group all actions for a resource under the same module, which violates the Single Responsibility Principle because the module has more than one reason to change, as many as the number of actions on the resource.
What?
What to expect from this task is that when the developer executes the
mix scribe.gen.restapi ...
command in the terminal, the result is a folder structure where a module is created for each action of a REST API resource in a domain atlib/my_app_restapi/
. This respects the Single Responsibility Principle because each module only has one reason to change: the logic for the single action it is responsible for.This generator will also invoke
mix scribe.gen.domain
(issue #4) to generate the Domain, Resource and Actions for the core business logic.When?
The developer should use this generator whenever they need to create a new feature that will be consumed via REST API endpoints.
Acceptance Criteria
Let's base the acceptance criteria's on a developer tasked with building an Online Shop.
TODO: Define the acceptance criteria's