...

/

Command-line Interface

Command-line Interface

Let’s learn about the usage of the command-line interface in our project.

So far, we’ve created the domain models, the serializers, the use cases, and the repository, but we’re still missing a system that glues everything together. This system has to get the call parameters from the user, initialize a use case with a repository, run the use case that fetches the domain models from the repository, and return them to the user. Let’s see now how the architecture we’ve just created can interact with an external system like a CLI (command-line interface). The power of clean architecture is that the external systems are pluggable, which means that we can defer the decision about the details of the system we want to use. In this case, we want to give the user an interface to query the system and get a list of the rooms ...