目录

Project Overview

Set up a MōBrowser project from scratch and explore its structure and configuration.

To create a cross-platform desktop application, you need to create a MōBrowser project. It contains all the files and dependencies required to build and run your desktop application.

Creating a Project 

Make sure your current working directory is the one where you intend to create a project. Run the following command in your command line:

npm create mobrowser-app@latest

This command will install and execute create-mobrowser-app, the official project scaffolding tool. You will be presented with prompts for your application name, the preferred frontend framework, UI component library, and language.

The scaffolding tool allows generating a project with the following frontend frameworks:

  • React
  • Vue
  • Vanilla (HTML, CSS, and JavaScript)
  • None (website as a frontend)

The following UI component libraries are supported:

The following frontend languages are supported:

  • JavaScript
  • TypeScript

You will be also asked if you want to add a native C++ module to your project to access platform-specific APIs.

The generated projects includes the package.json file that contains the npm project dependencies and scripts. The package.json file is used by npm to install the project dependencies and run the project scripts.

Project structure 

The project directory structure may be different depending on the options you chose during project generation.

If you select a frontend framework and decide to add a native C++ module, then you will see the following files and folders in the generated project:

.vscode/
assets/
resources/
src/
├── main/
├── native/
├── renderer/
AGENTS.md
CLAUDE.md
CMakeLists.txt
mobrowser.conf.json
package.json
tsconfig.json
tsconfig.node.json
vite.config.ts

Here is the description of the files and folders in the project structure:

File/FolderDescription
.vscode/Visual Studio Code settings and workspace configuration.
assets/Application assets such as icons, images, and other resources.
resources/Application resources that shouldn’t be protected.
src/main/Main process source code.
src/renderer/Renderer process source code.
src/native/Native C++ module source code.
AGENTS.mdDocumentation for the agents.
CLAUDE.mdDocumentation for the Claude agent.
CMakeLists.txtCMake build configuration.
mobrowser.conf.jsonApplication configuration file.
package.jsonnpm package configuration file.
tsconfig.jsonTypeScript configuration file.
tsconfig.node.jsonTypeScript configuration file for Node.js.
vite.config.tsVite configuration file.

Project configuration 

The mobrowser.conf.json file is the main project and application configuration file. It contains the application name, version, author, copyright, description, and other properties.

Here’s an example of the mobrowser.conf.json file:

{
  "app": {
    "name": "Stats",
    "version": {
      "major": "1",
      "minor": "0",
      "patch": "0"
    },
    "author": "TeamDev",
    "copyright": "Copyright © 2026 TeamDev",
    "description": "System resources monitor and process explorer.",
    "locales": ["en-US"],
    "trustedOrigins": [],
    "schemes": [],
    "bundle": {
      "macOS": {
        "icon": "assets/app.icns",
        "executableName": "Stats",
        "bundleID": "com.teamdev.Stats",
        "codesignIdentity": "${MACOS_CODESIGN_IDENTITY}",
        "codesignKeychain": "${KEYCHAIN_PATH}",
        "codesignEntitlements": "assets/entitlements.plist",
        "teamID": "${MACOS_TEAM_ID}",
        "appleID": "${MACOS_APPLE_ID}",
        "password": "${MACOS_APPLE_PASSWORD}",
        "extraInfo": "",
        "installer": {
          "dmg": {
            "name": "",
            "volumeName": "",
            "volumeIcon": "assets/app.icns",
            "eula": "",
            "deltaStrategy": "BestSize",
            "window": {
              "textSize": 14,
              "skipPrettifying": false,
              "backgroundImage": "",
              "position": {
                "x": 500,
                "y": 400
              },
              "size": {
                "width": 600,
                "height": 400
              },
              "icon": {
                "size": 150,
                "position": {
                  "x": 160,
                  "y": 160
                }
              },
              "appDropLink": {
                "x": 430,
                "y": 160
              }
            }
          }
        }
      },
      "Windows": {
        "icon": "assets/app.ico",
        "executableName": "Stats",
        "signCommand": "",
        "installer": {
          "exe": {
            "name": "",
            "icon": "assets/app.ico",
            "installationGif": "",
            "packageId": "Stats",
            "installationFolderName": "Stats",
            "displayName": "Stats",
            "shortcuts": "Desktop,StartMenuRoot",
            "deltaStrategy": "BestSpeed"
          }
        }
      },
      "Linux": {
        "icon": "assets/app.png",
        "executableName": "Stats"
      }
    }
  }
}

Here’s the description of the properties in the mobrowser.conf.json file. Paths may be absolute or relative to the project root. You can reference environment variables in string values using the ${ENV_NAME} syntax, which is especially useful for signing credentials.

Application properties 

PropertyDescription
app.nameThe user-visible application name. It appears in places such as window titles, the About dialog, and the system menu. It is also used for executable and installer names unless you set a platform-specific executableName. The display name may contain spaces and non-ASCII characters.
app.versionThe application version, represented by the major, minor, and patch string properties. MōBrowser combines them into a version such as 1.0.0; this value is available at runtime as app.version and is used in packaged artifact names and update metadata.
app.version.majorThe major version component. Increment it for incompatible or otherwise major releases; for example, "2" in version 2.0.0.
app.version.minorThe minor version component. Increment it for backward-compatible feature releases; for example, "3" in version 2.3.0.
app.version.patchThe patch version component. Increment it for backward-compatible fixes; for example, "4" in version 2.3.4.
app.authorThe person, team, or organization that publishes the application, for example, "TeamDev". This value is included in the packaged application’s metadata and is displayed in Windows file properties.
app.copyrightThe application’s copyright notice, for example, "Copyright © 2026 TeamDev". This value is included in package metadata, is displayed in Windows file properties, and is available at runtime as app.copyright.
app.descriptionA short, user-facing summary of the application’s purpose. This value is included in package metadata, is displayed in Windows file properties, and is available at runtime as app.description.
app.localesAn array of locale identifiers to include in the application, for example, ["en-US", "de", "fr"]. Limiting this list reduces the bundle size. Use ["all"] to include every supported locale. If this property is omitted or no configured locale matches the system locale, the application uses en-US. See Localization for the supported identifiers.
app.trustedOriginsAn array of remote origins that receive privileges normally reserved for the bundled application origin: access to the renderer-to-main IPC bridge, automatic grants for framework permission requests, and permission to be used as top-level in-app navigation targets. Entries may be exact origins ("https://app.example.com", "http://localhost:8000"), hostname patterns ("*.example.com"), or scheme-qualified hostname patterns ("https://*.example.com"). URL paths and broad public-suffix patterns such as "*.com" are not allowed. Keep this list as narrow as possible because trusted content can invoke exposed main-process services and receive sensitive permissions.
app.schemesAn array of custom URL scheme names, without ://, for example, ["stats"] for stats://open. The packaged application is registered as a handler for these schemes so links can launch or activate it. Handle incoming URLs with the openUrl app handler; on Windows and Linux, also inspect the url command-line switch when a link launches an app that was not already running. See Schemes.
app.bundlePlatform-specific packaging, branding, signing, and installer settings. Configure the macOS, Windows, and Linux objects independently.

app.bundle.macOS properties 

PropertyDescription
iconThe path to the application icon in .icns format.
executableNameThe file-system name used for the executable and the .app bundle. It may contain only ASCII letters, digits, spaces, hyphens, and underscores. Do not include a file extension. If omitted, app.name is used. See Executable name.
extrasAn array of files and directories to copy into the packaged application’s Contents directory. An entry may be a path, a directory path ending in / to copy its contents, or a path with a wildcard in its final file-name segment, such as "schemas/*.json". For a custom destination, use an object such as { "from": "native/lib.dylib", "to": "Frameworks/lib.dylib", "sign": true }; from is the source path, to is relative to Contents, and the optional sign Boolean requests code signing for copied binaries. See Third-party resources.
bundleIDThe unique application bundle identifier in reverse-DNS format, for example, "com.teamdev.Stats".
codesignIdentityThe name of the code-signing certificate installed in Keychain Access, such as a Developer ID Application identity. Leave it empty only when producing an unsigned development build.
codesignKeychainThe path to the keychain containing the code-signing identity. Set it when the identity is stored outside the default keychain, which is common on CI build agents.
codesignEntitlementsThe path to the .plist file containing the entitlements applied during code signing.
provisioningProfileThe path to an Apple-issued .provisionprofile file to embed in the application bundle. It is required when the entitlements include keychain-access-groups, for example, for the Touch ID WebAuthn authenticator.
teamIDThe Team ID of the Apple Developer account used to sign and notarize the application.
appleIDThe Apple Developer account email used for notarization.
passwordThe app-specific password for the Apple ID used for notarization. Store it in an environment variable instead of committing it to the configuration file.
extraInfoThe path to a valid .plist file whose keys are merged into the generated application Info.plist. Values in this file override generated values with the same keys. Use it for settings such as privacy usage descriptions or LSUIElement.
installer.dmgSettings for the macOS DMG installer.
installer.dmg.nameThe DMG file name. Leave it empty to generate a name from the application name, version, and architecture, such as Stats-1.0.0-arm64.dmg.
installer.dmg.volumeNameThe mounted volume name shown in the Finder sidebar. Leave it empty to derive it from app.name.
installer.dmg.volumeIconThe path to the mounted volume’s .icns icon. Leave it empty to use the standard macOS volume icon.
installer.dmg.eulaThe path to an End User License Agreement text file. When set, users must accept or decline the agreement when opening the DMG; leave it empty to omit this dialog.
installer.dmg.deltaStrategyThe delta-package generation strategy: "None" disables delta packages, "BestSpeed" optimizes their generation speed, and "BestSize" minimizes their size.
installer.dmg.window.textSizeThe text size used in the Finder window for the mounted DMG.
installer.dmg.window.skipPrettifyingA Boolean. Set it to true to skip Finder window customization, for example, on a CI agent without a logged-in macOS user.
installer.dmg.window.backgroundImageThe path to the DMG window background image. Leave it empty for no background image.
installer.dmg.window.positionThe initial x and y coordinates of the DMG window on the main screen.
installer.dmg.window.sizeThe width and height of the DMG window in points.
installer.dmg.window.icon.sizeThe application icon size in the DMG window.
installer.dmg.window.icon.positionThe x and y coordinates of the application icon in the DMG window.
installer.dmg.window.appDropLinkThe x and y coordinates of the Applications folder drop link in the DMG window.

app.bundle.Windows properties 

PropertyDescription
iconThe path to the application icon in .ico format.
executableNameThe file-system name used for the application executable and other platform artifacts. It may contain only ASCII letters, digits, spaces, hyphens, and underscores. Do not include the .exe extension. If omitted, app.name is used. See Executable name.
extrasAn array of files and directories to copy into the packaged application. An entry may be a path, a directory path ending in / to copy its contents, or a path with a wildcard in its final file-name segment, such as "schemas/*.json". For a custom destination, use an object such as { "from": "native/lib.dll", "to": "lib/lib.dll", "sign": true }; from is the source path, to is relative to the packaged application, and the optional sign Boolean requests code signing for copied binaries. See Third-party resources.
signCommandThe command used to sign application binaries and the installer. Include @@BINARY_PATH@@ where the absolute path of each binary should be inserted, for example, "signtool sign /a @@BINARY_PATH@@". MōBrowser runs the command once for every binary that requires signing.
installer.exeSettings for the Windows executable installer.
installer.exe.nameThe installer file name. Leave it empty to generate a name from the application name and version, such as Stats-1.0.0.exe.
installer.exe.iconThe path to the installer’s .ico icon. Leave it empty to use the system default icon.
installer.exe.installationGifThe path to the GIF displayed while installation is in progress. Leave it empty to show the default system progress dialog.
installer.exe.packageIdThe NuGet package identifier under which the application is stored on the system. If omitted, MōBrowser uses app.name without spaces. It is also the default installation folder name.
installer.exe.installationFolderNameThe folder under %LOCALAPPDATA% in which the application is installed. It may contain spaces and other file-system-safe characters. If omitted, packageId is used.
installer.exe.displayNameThe application name shown by Windows and used for shortcuts. If omitted, app.name is used.
installer.exe.shortcutsA comma-separated list of shortcut locations. Supported values are None, StartMenu, Desktop, Startup, and StartMenuRoot; for example, "Desktop,StartMenuRoot". If omitted, Desktop,StartMenuRoot is used.
installer.exe.deltaStrategyThe delta-package generation strategy: "None" disables delta packages, "BestSpeed" optimizes their generation speed, and "BestSize" minimizes their size.

app.bundle.Linux properties 

PropertyDescription
iconThe path to the application icon in PNG format. A 128×128 image is sufficient for most Linux distributions.
executableNameThe file-system name used for the application executable and other platform artifacts. It may contain only ASCII letters, digits, spaces, hyphens, and underscores. Do not include a file extension. If omitted, app.name is used. See Executable name.
extrasAn array of files and directories to copy into the packaged application. An entry may be a path, a directory path ending in / to copy its contents, or a path with a wildcard in its final file-name segment, such as "schemas/*.json". For a custom destination, use an object such as { "from": "native/lib.so", "to": "lib/lib.so" }; from is the source path and to is relative to the packaged application. See Third-party resources.

vite.config.ts 

The framework uses Vite as the build tool for both the main and the renderer processes.

Each MōBrowser project includes a vite.config.ts file. It defines the build configuration for the main and the renderer processes. If the project is configured not to use a frontend framework, then the vite.config.ts file defines the build configuration for the main process only.