Accounts
Thesrc/accounts/ folder is where the processβs organization, its teams and its users are declared.By convention, each type of account is declared in a separate file, and all are exported in the
index.ts.
To be generated, the accounts must be used in the workflowβs definition.
The files/ folder is used to store the accountβs avatar images.
Environment variables
The processβ environment variables are declared in the.env file and in the .env.<envName> files depending on the generation environment.The
src/env/index.ts file is used to parse with a Zod schema and export the environment variables.Additionnally, the environment variables are added to the workflowβs definition so that they can be used inside the actionsβ effects.
Workflows
The processβ workflows are defined in subfolders of thesrc/workflows/ folder, as well as a shared folder which is used to declare shared constants, types and functions.All worklows are exported in the
index.ts file.
Workflow structure
Each workflow should follow the following structure:Actions
Actions
Actions are defined in separate files and all are exported in the
index.ts file.Definitions
Definitions
The definitions folder is where the static data and functions are declared, see Definitions for more information.
The workflowβs data are declared in this file, they then can be used in the actionsβ effects.
The workflowβs functions are declared in this file, they then can be used in the actionsβ effects.
Types
Types
This file is used to declare the type of the workflowβs state data.
This file is used to declare types unrelated to the configuration itself of the workflow. For example a status enum, a list of business programs, etc.
This file is where the workflowβs dsl context is instantiated.
This file is where the types which will be used to validate the paths used in the UI widgets are declared.
Shared folder
Theshared/ follows the same structure as the workflows/ folder,
but is used to declare shared constants, state and functions which will be automagically added to all workflows.