Increasing UX on the blockchain: Origin DApp gets browser notifications

in #crypto5 years ago

Last month we announced with great pride that our beta marketplace DApp launched on the Ethereum Mainnet. Too often, we see blockchain companies promising the world during fundraising then failing to deliver actual results afterwards. It was extremely important to us that we hit our goal of launching by the end of Q3 2018, exactly one year after we incorporated. Already, hundreds of unique wallets have used our DApp, and there are over a hundred listings for sale on our marketplace. It’s a great start but we have much more work ahead of us before we can serve mainstream users, and we are not slowing down. We are committed to delivering updates to our platform on a weekly basis.

The benefits of decentralization and the amazing possibilities presented by token economics are some of the existential motivations that drive us as a company. However, as a team of experienced product engineers, we recognize that the user experience we offer is just as important as the theoretical promises of new technology. Currently, decentralized applications present extremely poor user experiences compared to their centralized incumbents or alternatives. Today, we took a small but important step toward improving the usability of our DApp by adding browser push notifications for Chrome and Firefox.

1_i0rkJIElo0Us-hhIwX7YTw.png

Previously, buyers and sellers on our marketplace had to keep the DApp open on their browser to know if someone had sent them a message or made an offer on their listing. We can’t expect people to keep Origin’s marketplace DApp open on a browser tab forever (though we know some of you keep hundreds of tabs open for months) or check back constantly to see if there is something that needs their attention. Without outbound notifications, a message from a buyer to a seller might go unread for days. An offer might be submitted to a seller without the seller being aware of it for weeks. This isn’t an acceptable user experience for people who want to do business with each other. There must be some way to notify buyers and sellers of important events. Currently, we are only notifying users of events that are directly related to offers, such as an offer being made, accepted, disputed, or finalized. Message notifications are coming soon.

We chose to offer browser push notifications because we did not want to force users who wanted notifications to store their email address or phone number in a database we control. While email and phone notifications may be offered in the future, they will always be opt-in, and we will always have the option of browser notifications. We are committed to preserving as much user privacy as we can. In general, we default to methods that give users the most control and protection over what information they share.

Here is how Origin notifications work behind-the-scenes:
0_acsAekjOoPj9oHu9.png

  1. We register a service worker with the user’s browser. This service worker listens for browser events that improve the user experience.
  2. The user will be asked for permission to display browser notifications. If they decline, the process ends here. If they approve:
  3. The service worker subscribes to the browser’s push service using the public key from a VAPID key pair generated by Origin. This creates a subscription object.
  4. The DApp adds the user’s ETH wallet address to the subscription object and sends it to the notifications server.
  5. The notifications server stores the subscription object in a PostgreSQL database.
  6. Origin’s event listener detects a blockchain transaction involving Origin’s smart contracts.
  7. The event listener sends a webhook request to the notifications server to enable information delivery about the blockchain transaction and any associated ETH addresses.
  8. The notifications server checks the PostgreSQL database for any subscription objects that contain the ETH addresses involved in the blockchain transaction.
  9. If there is a match, the notifications server signs a message with the private key from Origin’s VAPID key pair and sends this message to the service worker registered to the matching user’s browser. This signature proves that the sender of the message is the same as the creator of the subscription object.
  10. The service worker displays a notification in the user’s browser.
  11. The user clicks on the browser notification and the DApp is either opened in a new tab or focused in a tab it where is already open.

To dig into the code, check out the GitHub issue and pull request from our star engineer, Micah.

Our work with notifications is not done and we are especially excited about mobile developments under progress. We are going to iterate our DApp frequently, adding new features and improving the user experience along the way. Our engineers are also hard at work at readying a developer platform that our partners and others can build on. Look for more exciting updates in Q4 and Q1. We want to thank all of our supporters and users, and we invite any curious newcomers to join us on this journey.

Check out our DApp today and be one of the early buyers or sellers on the platform.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.034
BTC 63582.02
ETH 3289.90
USDT 1.00
SBD 3.88