# Modules

In Cherrycake, all process-specific functionality is packed in modules. A great example is the [Database](https://cherrycake.tin.cat/reference/core-modules/database) module, which is in charge of all the communication with a server like MySQL.

### Dependency

Most modules depend on others to do their job. When this happens, dependencies are solved automatically and all the needed modules are loaded on the fly. For example, the [Database](https://cherrycake.tin.cat/reference/core-modules/database) module might need at some point the [Security](https://cherrycake.tin.cat/architecture/security) module to ensure the data you're storing in the database is safe.

### Module configuration

Modules can have configuration files. For example, the [Database](https://cherrycake.tin.cat/reference/core-modules/database) module requires a configuration file where you set up a MySQL server address, user and password. User modules can have configuration files too.

### Actionability

Modules can respond to requests, so they're the entry point in the [Lifecycle](https://cherrycake.tin.cat/architecture/lifecycle) of a request to any Cherrycake application. The [Actions](https://cherrycake.tin.cat/reference/core-modules/actions-1/actions) module takes care of routing requests to the matching mapped modules.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cherrycake.tin.cat/architecture/modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
