Skip to content
Last update: May 8, 2024

How to Register New App

Using the Reports application as an example, let's look at the application installation process.

Prerequisites

Before adding a new web app, make sure the following prerequisites have been installed:

Registration Process

To register a new app:

  1. Add a web app in the module.manifest:

    1. Add the app section in the module.manifest.

      ...
      <apps>
          <app id="reports">
              <title>Reports</title>
              <description>Power BI Commerce Reports</description>
              <iconUrl>/apps/reports/power_bi_logo.svg</iconUrl>
              <permission>PowerBiReports:access</permission>
          </app>
      </apps>
      ...
      

      Attributes description

      id A unique identifier for the app, which distinguishes it from other apps in the system.
      title The name or title of the app that is displayed to the users.
      description A short description of the app that gives users an overview of what the app does and its purpose.
      iconUrl The URL or path to the app's icon or logo used to identify the app in the system.
      permission The permissions or access rights required to use the app, which are used to control
      who can access the app and its features.
      contentPath The default path to the app's content, which is used to specify where the app's files
      are stored and accessed. In this example, the ContentPath is set to [VcModuleWeb]/Content/[Id],
      which means that the app's content will be stored in the Content folder of the VcModuleWeb module,
      with the app's Id appended to the end of the path.
    2. Open Platform.

    3. Click Dots in the top left corner.
    4. Find the added app.

      image

  2. Create Content/[app_id] folder in the web project. Virto Commerce reads the manifest and adds binding to this folder. You can put any web content here. It can be a Virto Shell or any other HTML application.

    vc-module-power-bi-reports\src\VirtoCommerce.PowerBiReports.Web\Content\reports
    

    image

  3. Build, compress, and deploy. Use the Virto Commerce CLI (vc-build) to create a module package.

    image

  4. Invoke Rest API. Virto Commerce provides an API to returns list of available apps.

    curl -X GET "https://mycustomdomain.com/api/platform/apps" -H  "accept: text/plain"
    

    image

New app is ready to go.