A microservice-architecture is not pursued (yet); as of now, modular monoliths will be implemented to start the new project. In each service a layered architecture will be applied.
- The main GraphQL entrypoint is defined on service level.
- Each service is structured into submodules (“features”). A submodule is a self-contained unit of
- GraphQL-API-Endpoints: Queries and Mutations. They call the use cases to provide the response.
- Use Cases are implementing the actual business logic by calling the services/repositories. Use cases orchestrate the services/repositories. The also serve as public interface to other submodules. Thus submodules could call use cases from other use cases, although it should be avoided.
- Services are concrete operations and calculations upon models, which are not CRUD.
- Repositories CRUD functionalities for models.
- Models are the database entities.
- see also: https://proandroiddev.com/why-you-need-use-cases-interactors-142e8a6fe576