{
  "name": "Chat",
  "appDomain": "chat.app.privacysafe.io",
  "version": "0.8.1",
  "icon": "logo.png",
  "description": "Chat securely in text and video form.",

  "components": {

    "/index.html": {
      "startedBy": "user",
      "runtime": "web-gui",
      "capsRequested": {
        "apps": "opener",
        "logout": "all",
        "log": "all",
        "mailerid": true,
        "mail": {
          "sendingTo": "all",
          "receivingFrom": "all"
        },
        "shell": {
          "fileDialog": "all",
          "userNotifications": true,
          "fsResource": {
            "otherApps": {
              "launcher.app.privacysafe.io": "ui-settings"
            }
          }
        },
        "storage": {
          "appFS": "default",
          "userFS": "all",
          "sysFS": "all"
        },
        "appRPC": [
          "AppChatsInternal",
          "ChatDeliveryService",
          "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"
          ]
        }
      }
    },

    "/video-chat.html": {
      "services": {
        "VideoChatComponent": {
          "thisAppComponents": [
            "/background-instance.js"
          ]
        }
      },
      "runtime": "web-gui",
      "capsRequested": {
        "mailerid": true,
        "appRPC": [
          "WebRTCSignalingCAP"
        ],
        "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": {
      }
    },

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

  "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"
    }
  ]
}
