App structure

The file structure of a typical Meya app

In Meya all your bot's BFML code and custom element Python code is stored in files within your app's built-in code repo.

(For the more technically inclined, each app in Meya is backed by its own Git repo and all code changes are pushed/pulled from this internal app Git repo. The Meya CLI abstracts the Git repo away with the meya push and meya pull commands, but you can use meya git to interrogate the app's local git repo 🤓)

Each Meya app usually has the following file structure:

meya-app/
├─ .github/
├─ .meya/
├─ bot/
│  ├─ default.yaml
├─ component/
│  ├─ welcome.py
│  ├─ welcome_test.py
│  ├─ ...
├─ flow/
│  ├─ hi.yaml
│  ├─ welcome.yaml
│  ├─ ...
├─ integration/
│  ├─ db.yaml
│  ├─ sensitive_data.yaml
│  ├─ orb.yaml
├─ translation/
│  ├─ fr/
│  ├─ app.pot
├─ trigger/
├─ .gitignore
├─ .isort.cfg
├─ .meyaignore
├─ config.yaml
├─ pyproject.toml
├─ pytest.ini
├─ README.md
├─ translation_mapping.ini
├─ vault.yaml
.githubIf you use GitHub then this folder will contain the specific configuration for GitHub and GitHub actions.
.meyaThis folder contains the app's internal Git repo. Note that this folder is never committed to the remote Git repo.
bot/This folder contains the configuration settings for each bot defined in your app.
bot/default.yamlEvery Meya app always comes with one default bot. You can set the default bot's configuration settings in this file. See the demo-app's bot/default.yaml file as an example.
component/The component folder is where you can save your component element Python code. You can create any sub-folder structure in the component folder and reference these from Python and BFML.
flow/The flow folder is where you save all your BFML code. You can create any sub-folder structure in the flow folder.
integration/The integration folder is where you save all your configured integrations. You can create any sub-folder structure in the integration folder to group integrations.
translation/If you're translating your app into multiple languages, this is where you would save all your translation files for each language.
trigger/The trigger folder is where you can save your trigger element Python code. You can create any sub-folder structure in the trigger folder and reference these from Python and BFML.
.gitignoreThis is used to ignore any files you don't want to commit to your own Git repo. (This is only applicable if you use Git to manage code changes across your own team).
.isort.cfgThis contains the configuration to sort Python module imports in any of your custom Python code. This configuration is used by the meya format command.
.meyaignoreThis is similar to .gitignore except it's for the internal .meya/git/ repo, not your own Git repo. You shouldn't need to modify this file.
config.yamlThis contains your app's configuration. You can use this file to store any static configuration settings that you would like to use in your BFML code.
pyproject.tomlThis contains the configuration for the Python code formatter. This configuration is used by the meya format command.
pytest.iniThis contains the configuration for the Python unit test runner. This configuration is used by the meya tests command.
README.mdYour app's README, this is useful for any technical documentation you would like to share with your bot development team.
translation_mapping.iniThis contains the configuration settings for the pybabel translation utility.
vault.yamlThis is a sample vault file that contains all the vault keys your app defines. Note, this is just a reference file, and you should never add any real secrets to this file.

Example apps