Intro
Multimodularity is a software design approach that aims to enhance the maintainability, scalability, and reusability of a software application by decomposing the main API and its associated business logic into modular components.
This method involves breaking down a complex system into smaller, interconnected modules, each responsible for a specific functionality or feature.
By doing so, developers can achieve a more organized and comprehensible codebase, making it easier to manage and evolve over time
Structure
Each module is supposed to be divided into such submodules:
- api
- integration
- postgres
- postgres-dao
- postgres-schema
- service
Service is a submodule which contains the main business logic, also uses repositories with models from the dao layer and uses dtos from the API layer
Example
Here is an example multimodules with the structure described above:

Where spec-module has been reviewed in detail here