Skip to main content
Coin Flip lets two people in a DM flip a coin. It uses a chat action, an interaction, a random draw, and a result card with a Flip again button.

Try it

Open a chat in Zend, tap + → Apps → Flip.

Source

examples/coinflip in the AppKit repo.

Manifest

zapp.json
Tapping Flip in a chat creates a flip interaction with both people and opens /coinflip/?interaction=<id>.

Page

What to notice

  • No server. Both players can call zend.random with the same label; the second call gets the recorded result, so neither page can reroll.
  • Idempotency keys like ${id}:end make retries safe if a call times out.
  • INTERACTION_FINISHED means the flip is already resolved. The example tells the user to tap Flip again on the card.
  • Plain copy. Errors show “That didn’t go through. Try again.” rather than the SDK’s message.
A game with money would move resolved to a serverOnly transition and let a server decide the winner. See Interactions.