Build a Web App using the Hub¶
There are a few resources you'll need before you start writing code.
- An account. This is your developer account on the Hub.
- A new Typescript web app. We recommend using Typescript, as Textile libraries are in a period rapid of development and type detection is valuable during upgrades.
Once you have those two things, you can continue to read the overview or jump ahead to:
User identity to create simple user identies for the rest of the tutorial.
Or, if you plan to provide your own identity setup, you can skip to the development mode setup instructions.
Our examples will primarily be built using Typescript. We wont cover the details of setting up a webapp with Typescript because it's well documented elsewhere.
With your basic Typescript web app setup, you should have a primary
Browser, Node, or React Native?¶
Go go go! Green lights ahead. Just read the rest of the docs and get building.
Some of our libraries rely on WebSockets for moving data around. WebSockets is packed in every major browser out of the box, but doesn't exist in Node the same way. This can be solved by adding WebSockets to the environment. We've solved this in past examples using, isomorphic-ws.
- Install isomorphic-ws,
npm install --save isomorphic-ws ws
- Add websockets to the global namespace at the start of your app:
;(global as any).WebSocket = require('isomorphic-ws')
See an example of that, here.
The React Native environment is missing a whole number of required packages, including
crypto. Read the React Native tutorial's installation steps to learn how to add the necessary packages.
Setup simple keypair based identities for your app users. View tutorial.
To secure or not to secure¶
Learn how to use non-signing API keys for faster app development. View tutorial.
Start building apps¶
Build a photo gallery sharing app for users with Buckets. Start here.
Add API authorization¶
Add secure API keys and a login flow to your app. View tutorial.