Modules description:

  • common - module, that contains shared classes for all contexts (e.g. exceptions)
  • feedback - module, that represents feedback context
  • main - module, that contains main() method, configs and db migrations
  • rest - module, that exposes some API methods from another modules as REST API
  • user - module, that represents user context
  • web - module, that responsible from web application, in case of server side rending

Key architecture points:

  • only API interfaces from api package and dto from api.dto package can be used on the application level, outside of the module, that represents the context
  • no shared domain models are allowed
  • one context should have one primary domain object - "aggregate root"
  • only aggregate root can be referenced from another context on domain level
  • use id on domain object level to reference aggregate root from another context
  • one context should access only it's own tables
  • no shared tables between modules are allowed
  • no cross-module joins are allowed