Safe Mail Tutorial Application
The tutorial app show cases how to use the low level API from
library to build a simple email application.
Demonstrates the usage of:
- Private MutableData
- Public MutableData
- Immutable data
- App's own container
_publicNamesand services containers
Please refer to the Application Data Model section below for additional details.
First, clone the repository:
$ cd your-project-name
And then install the dependencies:
Note: You must use
npm commands at the moment and not
$ npm install
If you are working on a development environment, you can run the command below instead, in order to get the
safe_client libraries that use the
MockVault file rather than connecting to the SAFE Network:
$ NODE_ENV=dev npm install
$ npm start
This starts the app in development mode with hot-reloading.
If you don't have authenticator set up and want to run the test with randomly generated testing credentials, run it as:
$ NODE_ENV=dev SAFE_FAKE_AUTH=1 npm start
Note: requires a node version >= 4 and an npm version >= 2.
Toggle Chrome DevTools
- OS X: Cmd Alt I or F12
- Linux: Ctrl Shift I or F12
- Windows: Ctrl Shift I or F12
See electron-debug for more information.
$ npm run package
To package apps for all platforms:
$ npm run package-all
To package apps with options:
$ npm run package -- --[option]
Application Data Model
The following diagram depicts how the emails are stored in the SAFE network, as well as how the email app stores email accounts information.