Skip to main content

Core concepts

Tiles

Tiles are standalone pieces of user interface that are handled by a HTTP server, possibly supporting authenticated interactions from user agents.

Content

Tiles content is made of elements using a set of primitive components that can be rendered in the different formats supported by Tairu.

Tiles rendering does not aim to be pixel-perfect across platforms, but rather to rely on different renderers to provide the best experience for their target platform.

Interactions

In addition to static contents, Tiles can contain interactions based on a single text or options input and one or multiple buttons.

Tiles interactions are signed using a DID managed by an agent, ensuring all user interactions are authenticated without providing additional frictions for end-users.

Metadata

Additional metadata such as a title and description can be attached to tiles to help discovery and static display, in addition to a protocol version to ensure compatibility between Tile handlers and agents.

Render formats

Tiles can be rendered in different formats to adapt to platform capabilities and limitations, providing support for a wide range of clients.

JSON

JSON is the canonical format for Tiles, notably used by the @tairu/renderer package. It can be easily parsed and rendered by any client to provide a native user interface.

HTML

Tiles can be rendered as HTML, allowing them to be displayed directly in browsers and Web applications.

Full page

When accessing a Tile URL directly, the Tile is rendered as a full HTML page, including metadata and interactions support.

Embedded

Tiles can also be rendered as embedded HTML, where only the Tile contents is rendered. HTML data attributes are used to provide additional metadata and interactions data, which can be used by the host to render additional elements of the Tile UI.

SVG

As a fallback for environments that don't support native rendering or HTML, Tiles can be displayed as images using SVG.

Supported interactions

Tairu supports two types of interactions: inputs allowing users to type some text or choose from a list of options, and buttons allowing to perform actions.

Inputs

The protocol page describes the input components supported by Tairu: the options input and text input.

Buttons

Action buttons are the simplest type of interaction, allowing to perform a single action. They can be used to submit the input value, sign a payload or open a URI.

Tile handlers

Handlers are defined using the @tairu/handler package to create endpoints for Tiles, handling actions and returning the Tile content to render.

Agents

Agents are the clients that performa requests to Tile handlers to display Tiles and handle interactions.

Agents are responsible for managing the signing keys used to authenticate user interactions when posting actions to Tile handlers. Tairu uses Decentralized Identifiers (DIDs) for authentication.

When accessing a Tile URL directly, the Web browser acts as the agent and displays the Tile content and interaction elements. Applications can implement agent functionalities notably using the @tairu/react package as a generic React agent, or the @tairu/react-dom package for Web applications.

DIDs

Tairu uses the W3C Decentralized Identifiers (DID) standard for authentication.

DIDs provide a standalone identity that can be used to sign and verify data, using cryptographic keys. Tairu agents manage the signing keys associated with each DID, allowing users to authenticate their interactions.