Platform Standard

A platform is anything that holds contacts -- a website, a service, a hub. It describes where to find people and how to identify them there.

Examples

// a code hosting platform
{
	$type: 'platform',
	$version: 1,
	$name: 'GitHub',
	$url: 'https://github.com',
	$icon: 'https://github.com/favicon.ico'
}

// a WorldAPI identity service
{
	$type: 'platform',
	$version: 1,
	$name: 'WorldAPI Identity',
	$url: 'https://ident.worldapi.org',
	$icon: 'https://ident.worldapi.org/icon.svg'
}

// a personal blog with user accounts
{
	$type: 'platform',
	$version: 1,
	$name: 'John\'s Blog',
	$url: 'https://johndoe.com'
}

// a social network
{
	$type: 'platform',
	$version: 1,
	$name: 'Twitter',
	$url: 'https://twitter.com'
}

Platform Properties

Property Type Required Description
$type string yes Always 'platform'
$version number yes Standard version
$name string yes Platform name
$url string yes Platform base URL
$icon string no Platform icon URL

How Contacts Reference Platforms

A contact's $platforms array links to platforms by URL and provides the identifier for finding that person there:

{
	$type: 'contact',
	$name: 'John Doe',
	$platforms: [
		{ $url: 'https://github.com', $identifier: 'johndoe' },
		{ $url: 'https://ident.worldapi.org', $identifier: 'john' },
		{ $url: 'https://johndoe.com', $identifier: 'john', _id: 4523 }
	]
}

$identifier is the public username or handle. Private internal IDs (like a database userId) go in _id.