Skip to content

Manifest

Detailed explanation of the manifest.json file for dweb apps, which can be understood as the manifest.json for PWA.

This mainly provides all configuration information for dweb apps, attribution verification, and some information displayed on the installation interface.

Reference

Parameter

  • idstring。The specification is: ${name}.${host}.dweb. Each app has a unique id, and each domain can mount multiple apps. Example: "game.dweb.waterbang.top.dweb".

  • versionstring。The version number of the application.

  • baseURIstring?。If not set, the baseURI linked by metadata.json is used by default.

  • serverMainServer。plaoc application entry settings.

ts
interface MainServer {
  root: string /* The startup directory of the program */;
  entry: string /* The startup file of the program */;
}
  • logostring。The logo icon displayed during application installation.

  • minTargetnumber。The minimum supported Major version number of Semantic Version for Dweb Browser.

  • maxTargetnumber?。The maximum supported Major version number of Semantic Version for Dweb Browser.

  • namestring。The name displayed by the application. Same as the name in the W3C WebApp standard.

  • short_namestring。The short name displayed by the application. Same as the short_name in the W3C WebApp standard.

  • descriptionstring。Application introduction. Same as the description in the W3C WebApp standard.

  • dirstring?。Used for text alignment. Same as the dir in the W3C WebApp standard.

  • langstring?。Specifies the primary language for the values of the directional members of the manifest (since knowing the language also helps with directionality). Same as the lang in the W3C WebApp standard.

  • iconsstring。Icon set. Same as the icons in the W3C WebApp standard.

  • homepage_urlstring。The homepage URL of the application. Same as the homepage_url in the Chrome manifest standard.

  • bundle_*string。The packaging address and security-related verification information automatically generated by the @plaoc/cli tool.

  • public_key_urlstring?。This link must use a website link with the same domain as id.

    Note: The request returns a format of "algorithm + public key address" {algorithm}:hex;{publicKey}

    For example rsa-sha256:hex;2...1

  • languagesstring[]?。Supported languages. Language codes.

  • imagesstring[]?。Display images during application installation.

  • change_logstring。Update log displayed during application installation.

  • authorstring[]。Author information displayed during application installation.

  • release_datestring。Release date displayed during application installation.

  • dweb_deeplinksstring[]?。The specification is: dweb://${operation}. The deeplinks function of Dweb Browser, which can be used to wake up the application externally.

  • categoriesstring[]。Currently recommended to use ["application"], more will be opened later.

  • display"fullscreen" | "standalone" | "minimal-ui" | "browser" | undefined。The display mode of the application.

  • orientation"any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary" | undefined。The default orientation of the application window.

  • ......还有一些字段暂未启用。

Example

json
{
  "id": "game.dweb.waterbang.top.dweb",
  "server": {
    "root": "/usr",
    "entry": "/server/plaoc.server.js"
  },
  "minTarget": 2,
  "maxTarget": 2,
  "name": "vue3-game",
  "short_name": "game",
  "description": "This is an example application, containing examples of all components of dweb_plugins.",
  "logo": "https://www.bfmeta.info/imgs/logo3.webp",
  "bundle_url": "./game.dweb.waterbang.top.dweb-1.3.0.zip",
  "bundle_hash": "sha256:56e8a7569519364d03c04bd11147b16693db107878b4f27b827617e5f4dfb650",
  "bundle_size": 3112387,
  "bundle_signature": "",
  "public_key_url": "",
  "release_date": "Fri Jan 12 2024 14:54:14 GMT+0800 (Central Standard Time)",
  "change_log": "This is the update log",
  "images": [
    "http://qiniu-waterbang.waterbang.top/bfm/cot-home_2058.webp",
    "http://qiniu-waterbang.waterbang.top/bfm/defi.png",
    "http://qiniu-waterbang.waterbang.top/bfm/nft.png"
  ],
  "author": ["bfs", "bfs@bfs.com"],
  "version": "1.3.0",
  "categories": ["application", "kids-games"],
  "languages": [],
  "homepage_url": "https://dweb.waterbang.top",
  "plugins": [],
  "permissions": [],
  "dir": "ltr",
  "lang": "",
  "icons": [],
  "screenshots": [],
  "display": "fullscreen",
  "orientation": "any",
  "theme_color": "",
  "background_color": "",
  "shortcuts": [],
  "dweb_protocols": []
}