{
  "name": "Chat",
  "appDomain": "chat.app.privacysafe.io",
  "version": "0.10.11",
  "icon": "logo.png",
  "description": "Send secure text messages, share files or start a video meeting.",

  "components": {
    "/index.html": {
      "startedBy": "user",
      "runtime": "web-gui",
      "formFactor": [ "desktop", "tablet" ],
      "capsRequested": {
        "apps": "opener",
        "logout": "all",
        "log": "all",
        "mailerid": true,
        "mail": {
          "preflightsTo": "all"
        },
        "shell": {
          "fileDialog": "all",
          "deviceFiles": "all",
          "userNotifications": true,
          "fsResource": {
            "otherApps": {
              "launcher.app.privacysafe.io": "ui-settings"
            }
          },
          "openDashboard": true
        },
        "storage": {
          "appFS": "default",
          "sysFS": "all"
        },
        "appRPC": [
          "AppChatsInternal",
          "VideoGUIOpener"
        ],
        "otherAppsRPC": [
          {
            "app": "contacts.app.privacysafe.io",
            "service": "AppContacts"
          }
        ],
        "connectivity": "check"
      },
      "windowOpts": {
        "width": 1200,
        "height": 600,
        "minWidth": 800,
        "minHeight": 512,
        "maxWidth": 1440
      },
      "startCmds": {
        "open-chat-with": {
          "thisAppComponents": [
            "/background-instance.js"
          ],
          "otherApps": "*"
        },
        "incoming-call": {
          "thisAppComponents": [
            "/background-instance.js"
          ]
        }
      }
    },

    "/index-mobile.html": {
      "startedBy": "user",
      "runtime": "web-gui",
      "formFactor": "phone",
      "capsRequested": {
        "apps": "opener",
        "logout": "all",
        "log": "all",
        "mailerid": true,
        "mail": {
          "preflightsTo": "all"
        },
        "shell": {
          "fileDialog": "all",
          "deviceFiles": "all",
          "userNotifications": true,
          "fsResource": {
            "otherApps": {
              "launcher.app.privacysafe.io": "ui-settings"
            }
          },
          "openDashboard": true
        },
        "storage": {
          "appFS": "default",
          "sysFS": "all"
        },
        "appRPC": [
          "AppChatsInternal",
          "VideoGUIOpener"
        ],
        "otherAppsRPC": [
          {
            "app": "contacts.app.privacysafe.io",
            "service": "AppContacts"
          }
        ],
        "connectivity": "check"
      },
      "windowOpts": {
        "width": 360,
        "height": 768,
        "minWidth": 360,
        "minHeight": 768,
        "maxWidth": 360,
        "maxHeight": 768
      },
      "startCmds": {
        "open-chat-with": {
          "thisAppComponents": [
            "/background-instance.js"
          ],
          "otherApps": "*"
        },
        "incoming-call": {
          "thisAppComponents": [
            "/background-instance.js"
          ]
        }
      }
    },

    "/video-chat.html": {
      "services": {
        "VideoChatComponent": {
          "thisAppComponents": [
            "/background-instance.js"
          ]
        }
      },
      "runtime": "web-gui",
      "formFactor": ["desktop", "tablet"],
      "capsRequested": {
        "mailerid": true,
        "mail": {
          "sendingTo": "all",
          "receivingFrom": "all"
        },
        "shell": {
          "fsResource": {
            "otherApps": {
              "launcher.app.privacysafe.io": "ui-settings"
            }
          }
        },
        "mediaDevices": {
          "cameras": "all",
          "microphones": "all",
          "speakers": "all",
          "screens": "all",
          "windows": "all"
        },
        "webrtc": "all"
      },
      "forOneConnectionOnly": true,
      "windowOpts": {
        "minWidth": 800,
        "minHeight": 600
      }
    },

    "/video-chat-mobile.html": {
      "services": {
        "VideoChatComponent": {
          "thisAppComponents": [
            "/background-instance.js"
          ]
        }
      },
      "runtime": "web-gui",
      "formFactor": "phone",
      "capsRequested": {
        "mailerid": true,
        "mail": {
          "sendingTo": "all",
          "receivingFrom": "all"
        },
        "shell": {
          "fsResource": {
            "otherApps": {
              "launcher.app.privacysafe.io": "ui-settings"
            }
          }
        },
        "mediaDevices": {
          "cameras": "all",
          "microphones": "all",
          "speakers": "all",
          "screens": "all",
          "windows": "all"
        },
        "webrtc": "all"
      },
      "forOneConnectionOnly": true,
      "windowOpts": {
        "width": 360,
        "height": 768,
        "minWidth": 360,
        "minHeight": 768,
        "maxWidth": 360,
        "maxHeight": 768
      }
    },

    "/background-instance.js": {
      "services": {
        "AppChatsInternal": {
          "thisAppComponents": [
            "/index.html",
            "/index-mobile.html"
          ]
        },
        "VideoGUIOpener": {
          "thisAppComponents": [
            "/index.html",
            "/index-mobile.html"
          ]
        },
        "VideoChatComponent": {
          "thisAppComponents": [
            "/index.html",
            "/index-mobile.html"
          ]
        }
      },
      "runtime": "deno",
      "capsRequested": {
        "appRPC": [
          "VideoChatComponent"
        ],
        "log": "all",
        "mailerid": true,
        "mail": {
          "sendingTo": "all",
          "receivingFrom": "all",
          "config": "all"
        },
        "shell": {
          "startAppCmds": {
            "thisApp": [
              "incoming-call",
              "open-chat-with"
            ]
          }
        },
        "storage": {
          "appFS": "default"
        }
      }
    }
  },

  "launchers": [
    {
      "name": "Chat",
      "icon": "logo.png",
      "description": "Send secure text messages, share files or start a video meeting.",
      "component": "/index.html",
      "formFactor": [ "desktop", "tablet" ]
    },
    {
      "name": "Chat",
      "icon": "logo.png",
      "description": "Send secure text messages, share files or start a video meeting.",
      "component": "/index-mobile.html",
      "formFactor": "phone"
    }
  ],

  "launchOnSystemStartup": [
    {
      "name": "Messaging background service",
      "component": "/background-instance.js",
      "icon": "logo.png",
      "description": "Starts background process to observe messaging and show notifications when new messages arrive"
    }
  ]
}
