-
Notifications
You must be signed in to change notification settings - Fork 1
2. Discovery
Chabardes edited this page Jun 2, 2022
·
8 revisions
Some basic features have already been implemented, try them out !
- create a hero
- create a level 1 dragon
- make the hero attack the dragon
- get the hero data, he should have gained xp and a loot.
Take a look around in the docs and src directory, we have 4 modules following the principles described in the DDH Notion page. Each modules is split into core, interface and infrastructure:
-
corecontains the domain entities and the applications (queries and commands) acting on them. This is where all the business logic lives. -
interfacecontains the various ways we can call the core applications. It can be REST controllers, GraphQL resolvers, AMQP consumers, or presenters to be called from other modules. -
infrastructurecontains the technical details of the module: databases, third-party services, AMQP publishers...
One of the main features of Libeo's backend architecture is the use of the Ports and Adapters pattern. In our implementation of the pattern :
- Ports are defined in the core, around our domain entities. And implemented in the infrastructure.
- They are mostly CRUD (Create Read Update Delete) operations on entities.
- Ports are abstract methods of an abstract class
- Adapters are classes implementing these abstract classes.
Here are the most common ports you will use. But you can also write more specific ports for your entities.