1 of 18

Building decentralized apps with Blockstack

2 of 18

Introduction

I’m Hank Stoever Engineering Partner at Blockstack working on:

  • Developer Tools
    • blockstack.js
  • Consumer Products
    • Blockstack Browser
    • App.co

3 of 18

Introduction

During this talk, I’ll explain:

  1. Decentralized authentication
  2. Decentralized storage
  3. How Developers can easily build apps on Blockstack

4 of 18

How do we enable decentralization?

5 of 18

At Blockstack, we’re building the assets needed for a new internet.

6 of 18

How is it different?

  • Decentralized domain name system
  • Decentralized storage
  • Decentralized identity
  • Applied cryptography
  • Browser with blockchain support

7 of 18

Build apps fast, without managing infrastructure

8 of 18

Blockstack Identity (auth layer)

  • User accounts are committed to a blockchain with meta information
    • Pointer to storage bucket, social verifications, etc.
  • Acts as a SSO solution for Blockstack apps

9 of 18

Gaia (storage layer)

  • Users decide where to store their data
  • Blockstack provides a common interface for all data providers
  • Applications write to a designated path in the user’s bucket

10 of 18

How does this compare to Ethereum dapps?

Ethereum Apps:

  1. User must download MetaMask
  2. User needs to buy ETH
  3. You need to deploy an immutable smart contract
  4. Every action requires the user to pay money
  5. You need to use a seperate storage system

Blockstack Apps:

  1. User downloads the Blockstack app
  2. No need to buy cryptocurrency
  3. You write your code with normal web technologies
  4. All storage actions are free
  5. Storage is built-in, and users can choose where their data is stored (Gaia Hub, Dropbox, Google Drive, IPFS, etc)

11 of 18

12 of 18

Notable projects built on Blockstack

  • Graphite - replacement for G-Suite
  • Stealthy.im - messaging app
  • Coins - cryptocurrency portfolio tracking

13 of 18

Using blockstack.js - Authentication

blockstack.redirectToSignIn() // Initial Sign in

if (blockstack.isUserSignedIn()) {

const userData = blockstack.loadUserData()

// handle handle userData

} else if (blockstack.isSignInPending()) {

blockstack.handlePendingSignIn().then((userData) => {

// handle userData

})

}

blockstack.signUserOut()

14 of 18

Using blockstack.js - Storage

blockstack.putFile(‘myfile.json’, myJsonString, { encrypt: true });

blockstack.getFile(‘myfile.json’, { decrypt: true })

// Public data:

const origin = window.location.origin

blockstack.redirectToSignIn(origin, origin + '/manifest.json', ['store_write', 'publish_data'])

blockstack.putFile(‘myfile.json’, myJsonString, { encrypt: false });

blockstack.getFile(‘myfile.json’, { decrypt: false, username: ‘hankstoever.id’})

15 of 18

Using Blockstack - App generators

https://github.com/blockstack/blockstack-app-generator

npm install -g yo generator-blockstack

mkdir hello-blockstack && cd hello-blockstack

yo blockstack:react

npm run start

16 of 18

Future considerations for developer tooling

  • ORM style data management library
  • Data sharing protocol libraries (between users & between apps)
  • Data backup services
  • More Gaia drivers

Help out, we’re always looking for code contributions and new community packages!

17 of 18

Blockstack Contributor Platform

Get paid in STACKs to contribute to Blockstack

18 of 18

Thanks!

hank@blockstack.com

www.blockstack.org