Sojourn is a really simple example of what you can do with an approach to Web3 storage that our team simplified for a React Native application. It’s a note taking application...or rather, it is a set of UI and back-end components that you can use to construct your own Web3 note taking application.
This DevKit includes a React Native app built with a focus on iOS. To demonstrate the pattern, we're using uPort for authentication and Ethereum interactions. Developers are encouraged to use other providers where it makes sense. To get up and running you need to:
Clone the repo and install dependencies:
$ git clone [email protected]:ConsenSys/imagineering-sojourn.git $ cd imagineering-sojourn $ yarn install
Register a uPort App and fill in the details
in file named
# .env.development UPORT_APP_NAME=Sojourn UPORT_APP_ADDRESS=<YOUR_APP_ADDRESS> UPORT_PRIVATE_KEY=<YOUR_PRIVATE_KEY>
Run the development app to a simulator. (Uses ganache-cli for Ethereum interactions.)
# One time per simulator to install $ yarn ios # Every time to start the metro bundler and ganache cli $ yarn start
Run the development app on your device. (Uses uPort and requires an installed uPort app on your phone).
# One time per device to install $ yarn react-native run-ios --device "<YOUR_DEVICE_NAME>" # Every time to start the metro bundler $ yarn start
We've provided deployed smart contracts for Rinkeby. If you'd like to deploy
your own, or on a different network, create an infura.io
api key and setup an HD wallet like metamask and add them to your
# .env.development # ... Other environment variables INFURA_KEY=<INFURA_API_KEY> DEPLOY_WALLET_MNEMONIC=<HD_WALLET_MNEMONIC>
Network definitions are located in
truffle.js. You can add your own test-net
or use ours. To do a migration, run:
$ yarn truffle migrate --network YOUR_NETWORK_ID
For more details see Truffle's Documentation.
Sojourn uses IPFS to securely store each document in a way where the user can access it from any device without compromising the security of their data. The way we do this is via Shamir's Secret Sharing Algorithm. Specifically, it encrypts each file with AES, splits it apart with Shamir's Secret Sharing Algorithm, and spreads the shards onto IPFS. Web3Studio created an open source project integrating this pipeline into React-Native,
react-native-sssa. Pull request are welcome and encouraged.
The ConsenSys Web3 Studio in Durham, NC has a pretty sweet job. Our team of developers, designers and writers spend our days coming up with what we hope are novel, unexpected ways to use blockchain and Web3-related technologies.
Success for us is you taking the kit’s ideas and open source code and building your own web3 applications.
What do we want in return? Two things: