Quick-start guide#

Follow these instructions to quickly create, set up, and run a minimal SAF-based solution. You can use either the SAF CLI tool or the Solutions Manager VS Code extension.

Create a solution#

Create a solution using SAF CLI:

  1. Instantiate the solution template:

    saf new
    
  2. When prompted, provide the following values, pressing Enter to select the default value or to validate non-default values provided.

    1. Enter a solution name.

      You can use the default option (my-solution) or provide a custom one.

    2. Enter a solution display name.

      You can use the default option (My Solution) or provide a custom one.

    3. Specify the UI framework.

      You can use the default option (dash) or select none.

    4. Enter the solution namespace.

      You can use the default option (saf.solutions) or provide a custom one.

A directory with the solution name is created in the current directory.

Create a solution using Solutions Manager:

  1. Open Visual Studio Code.

  2. In the Activity Bar, click the Solutions Manager icon.

  3. In the Solutions Manager pane, expand the Create Solution view.

    Solutions Manager Create Solution view
  4. Provide the following values:

    1. Enter a solution name.

      You can use the default name (my-solution) or provide a custom one.

    2. Enter a solution display name.

      This value is automatically generated based on the solution name (My Solution). You can modify it as needed.

    3. Select the UI framework.

      Select a framework to use for the solution.

    4. Enter the solution namespace.

      Enter the namespace to use for the solution.

    5. Enter the target directory.

      Enter the directory where the solution will be saved.

  5. Generate the solution.

    Click the Create solution button. Alternatively, you can copy the command under Create solution command and run it in the terminal.

A directory with the solution name is created in the target directory.

The solution generated from the template is a simple two-step, three-page solution.

See also

For more detailed information, see Create a solution in the User guide.

Install the solution#

Install the solution using SAF CLI:

  1. Change to the solution’s root directory:

    cd <solution_name>
    
  2. Install the solution’s development environment:

    saf install -f
    

Install the solution using Solutions Manager:

Note

These instructions assume that VS Code is already open.

  1. In the Solutions Manager pane, expand the Setup Solution view.

    Solutions Manager Setup Solution view
  2. Provide the following values:

    1. Select the solution you want to install.

      You can either select an option from the list of available solutions or browse for the solution folder of a different one.

    2. Select an environment cleanup option.

      You can either use the default option (No clean-up) or select a different one.

  3. Set up the environment.

    Click the Setup solution environment button. Alternatively, you can copy the command under Solution setup command and run it in the terminal.

The installation installs all necessary dependencies. You can monitor its progress in the terminal.

See also

For more detailed information, see Install in the User guide.

Run the solution#

You can open the solution in a desktop window , a web browser , or the SAF Portal, which provides a project management interface for the solution.

See also

For more detailed information, see Run a solution on desktop in the User guide. This section covers concepts that are generally applicable to all three SAF run modes.

Run the solution in a desktop window#

Run the solution in a desktop window using SAF CLI:

saf run

Note

These instructions assume that VS Code is already open.

Run the solution in a desktop window using Solutions Manager:

  1. In the Solutions Manager pane, expand the Run Solution view.

    Solutions Manager Run Solution in desktop view
  2. Provide the following values:

    1. Select the solution you want to run.

      You can either select an option from the list of available solutions or browse for the solution folder of a different one.

    2. Select your run options:

      Ensure that Portal mode and Browser mode are not selected.

    3. Select a log level:

      The default log level is INFO. You can select a different log level if needed.

    4. Enter a project name.

      Enter the name of the project you want to run.

    5. Specify the solution environment.

      Click the Configure solution environment button to open the SAF Environment Configuration interface in the VS Code editor. Alternatively, you can browse to an environment (.env) file.

      Solutions Manager SAF Environment Configuration page
    6. Modify SAF Environment Configuration settings as needed and click the Save Configuration button.

  3. Run the solution.

    Click the Run solution button. Alternatively, you can copy the command under Solution run command and run it in the terminal.

The solution UI opens in a desktop window.

Solution opened in a desktop window

Run the solution in a web browser#

Run the solution in a web browser using SAF CLI:

saf run --browser

Run the solution in a web browser using Solutions Manager:

Note

These instructions assume that VS Code is already open.

  1. In the Solutions Manager pane, expand the Run Solution view.

    Solutions Manager Run Solution in browser view
  2. Provide the following values:

    1. Select the solution you want to install.

      You can either select an option from the list of available solutions or browse for the solution folder of a different one.

    2. Select your run options:

      Ensure that Browser mode is selected.

    3. Select a log level:

      The default log level is INFO. You can select a different log level if needed.

    4. Enter a project name.

      Ener the name of the project you want to run.

    5. Specify the solution environment.

      Click the Configure solution environment button to open the SAF Environment Configuration interface in the VS Code editor. Alternatively, you can browse to an environment (.env) file.

      Solutions Manager SAF Environment Configuration page
    6. Modify SAF Environment Configuration settings as needed and click the Save Configuration button.

  3. Run the solution.

    Click the Run solution button. Alternatively, you can copy the command under Solution run command and run it in the terminal.

The solution UI opens in a web browser window.

Solution opened in a browser window

Run the solution from SAF Portal#

Run the solution from SAF Portal using SAF CLI:

saf run --portal

Run the solution from SAF Portal using Solutions Manager:

Note

These instructions assume that VS Code is already open.

  1. In the Solutions Manager pane, expand the Run Solution view.

    Solutions Manager Run Solution in SAF Portal view
  2. Provide the following values:

    1. Select the solution you want to install.

      You can either select an option from the list of available solutions or browse for the solution folder of a different one.

    2. Select your run options:

      Ensure that SAF Portal mode is selected.

    3. Select a log level:

      The default log level is INFO. You can select a different log level if needed.

    4. Enter a project name.

      Ener the name of the project you want to run.

    5. Specify the solution environment.

      Click the Configure solution environment button to open the SAF Environment Configuration interface in the VS Code editor. Alternatively, you can browse to an environment (.env) file.

      Solutions Manager SAF Environment Configuration page
    6. Modify SAF Environment Configuration settings as needed and click the Save Configuration button.

  3. Run the solution.

    Click the Run solution button. Alternatively, you can copy the command under Solution run command and run it in the terminal.

The solution opens in the SAF Portal user interface. SAF Portal provides a project management interface for the solution, allowing you to create new projects, view existing projects, and manage project settings.

Solution opened in SAF Portal