/app.jsonfile is the complete app manifest, it tells Homey what your app does. When you run or publish your app this file is generated from the various
*.compose.jsonfiles and the JSON files in the
/.homeycompose/folder. The generation of your app manifest is referred to as Homey Compose and it supports some additional advanced features such as templating. All the various compose files will be explained in the rest of the documentation.
/app.jsfile you can create an
Appclass. This class gets instantiated once, when your app started. This is a great place to put logic that is shared throughout your app, and it is sometimes necessary for Flow cards and other resources that you only want to setup once.
/api.jsfile contains the implementation of all the API endpoints. You can read about exposing an API from your App in the Web API guide.
/assets/folder at the root of your app you can put the assets of the app. These are the app icon
icon.svgand the app images that will be shown in the Homey App Store. Read the App Store guidelines for more information about the icon and images.
/drivers/folder contains all the drivers of your app. The drivers are the parts of a Homey app that allow users to add and then control devices. This folder should only contain other folders, it is common for those folders to be named after the product code of the device they are implementing. You can learn more by reading the Devices documentation.
/README.txtfile in the root of your app contains the long-form description of your app. This will be shown in the Homey App Store when a user is browsing your app. Read the App Store guidelines for more information about the readme.
index.htmlfile in the
/settings/folder. Since drivers have their own settings, most apps shouldn't need any App settings. Read more about how and when to use app settings in the App Settings guide.
/env.jsonfile in the root of your app contains the environment variables of your app. Since this file is usually used to store secret keys it should be kept on your computer. If you use Git the
/env.jsonfile should therefore be added to the
/.gitignorefile. In this file you can store information that should not be public, for example the OAuth2 tokens your app uses to connect to a cloud service.
Homey.env.CLIENT_SECRET, etc. Make sure they are uppercase, and that their value is a string.
/.homeyignorefile in the root of your app can be used to prevent certain files or folders from being included in your Homey App when publishing. It works in the same way as
.gitignore. By default all files in the app directory will be included when publishing your Homey App.
/.homeyignoreis useful in case you want to commit documentation, designs, images, etc. to your version control system but not include it in your Homey App when publishing.