Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
app fix/Disable the refresh button when emails are being refreshed already Dec 21, 2017
design Merge Dev to Master branch (#208) Jul 13, 2017
test feat/example: added new example for mail tutorial Sep 15, 2016
.compilerc babel-polyfill, found missing await Sep 28, 2017
.eslintignore
.eslintrc feat/example: added new example for mail tutorial Sep 15, 2016
.gitattributes feat/example: added new example for mail tutorial Sep 15, 2016
.gitignore Merge Dev to Master branch (#208) Jul 13, 2017
.travis.yml chore/config: update Node JS version requirement to ^8.0.0 Jan 18, 2018
CHANGELOG.md chore/deps: updates CHANGELOG and includes updated lock files Jan 31, 2018
README.md chore/config: update Node JS version requirement to ^8.0.0 Jan 18, 2018
appveyor.yml
erb-logo.png feat/example: added new example for mail tutorial Sep 15, 2016
package-lock.json chore/deps: updates CHANGELOG and includes updated lock files Jan 31, 2018
package.json chore/dependency: updates @maidsafe/safe-node-app to v0.7.0 Jan 31, 2018
server.js feat/example: added new example for mail tutorial Sep 15, 2016

README.md

Safe Mail Tutorial Application

The tutorial app show cases how to use the low level API from safe_app_nodejs library to build a simple email application.

Demonstrates the usage of:

  • Private MutableData
  • Public MutableData
  • Immutable data
  • App's own container
  • _publicNames and services containers

Please refer to the Application Data Model section below for additional details.

Install

First, clone the repository:

$ cd your-project-name

And then install the dependencies:

Note: You must use npm commands at the moment and not yarn: https://github.com/electron-userland/electron-forge/issues/249

$ 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

Run

$ npm start

This starts the app in development mode with hot-reloading.

Faking Authentication

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.

DevTools

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.

Package

$ 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.

Email App Data Model