> For the complete documentation index, see [llms.txt](https://motionzk.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://motionzk.gitbook.io/docs/motion-modules/module-composition-walkthrough/building-blocks.md).

# Building Blocks

Let's start by representing each individual module and its general role.

{% @mermaid/diagram content="erDiagram
Main ||--o{ Player : Controls
Player }o--|| ShopModule : Buys
Player }o--|{ AuthModule : Requests\
Player }o--|{ DBModule : Records

" fullWidth="false" %}

In this simplified ERD representation:

* The "Main" entity represents the RPG Game and acts as the central component.
* The "Player" entity represents the user's in game character.
* The "ShopModule" entity represents the module responsible for handling the player's purchases and interactions with the in-game shop.
* The "AuthModule" entity represents the module responsible for providing authorization and authentication services.
* The "DBModule" entity represents the module responsible for recording and managing data related to the player's actions.

With very simple logic we can configure these modules with the following relationships:

* "Player" uses the "ShopModule" for managing player interactions with the shop.
* "Player" requests authorization from the "AuthModule" for certain actions.
* "Player" interacts with the "DBModule" to record and manage player actions.

This simplified representation captures the high-level relationships and interactions between the modules, providing an overview of their roles in the system.
