On server start, a .forestadmin-schema.json file will be auto-generated in local (development) environments only. It reflects:
the state of your models (in /models).
your Forest Admin customisation (in /forest).
This file must be versioned and deployed for any remote environment (staging, production, etc.), as it will be used to generate your Forest UI.
We use the environment variable NODE_ENVto detect if an environment is in development. Setting this variable to either nothing or development will regenerate a new .forestadmin-schema.json file every time your app restarts. Using another value will not regenerate the file.
A consequence of the above is, in Production the .forestadmin-schema.json file does not update according to your schema changes.
Do not edit this file, as it could break your interface if the wrong syntax is used.
Versioning the.forestadmin-schema.json file will also help you visualize your changes:
To disable automatic Forest Admin schema updates and do it manually, follow this how-to.