Skip to main content

Template configuration

./iosdk folder

This folder is intended to be kept intact. This approach is similar to create-react-app in the sense that it allows upgrades of the theme functionality and visual theme even after your application development is in progress..

Modifying the template will likely break or limit your capability to install new updates to the template, similarly to CRA's eject functionality. This is ok if you are sure you'd like to diverge from further iosdk updates but should be approached thoughfully.

Note the ./iosdk/config.tsx contains urls and settings for key network services like newgraph, newcoin, newsafe and more. Since the project is is early stage expect some of them to change. The easiest way to incorporate the changes will be using mostly automated upgrades that will be provided as the changes are implemented.

./config.tsx file

The primary config is located in ./config.tsx file. It contains the config for both modules and global settings. You may refer to ./iosdk/config.tsx to see all of the options. As mentioned above, it is not recommended to modify the fules in ./iosdk, therefore overriding them is the much better way to go. ./config.tsx is the place to do so.

Overmind

The application is based on overmindjs, a state management framework that cuts on the typical state management boilerplate. The iosdk templates store the boilerplate in ./iosdk folder with predefined extension points for user implementations.

Check the ./overmind/app.ts to see how modules are added. http://src/overmind/newcounter/ provides the minimal example for implementing some state management. To learn more check https://overmindjs.org/ for detailed documentation.

Standard modules

Newcoin

provides write and basic read functionality into newgraph. While in early stages some operations are implemented in newgraph (see below).

The operations are implemented in https://github.com/newfound8ion/newcoin-sdk, also a work in progress.

Newgraph

provides read functionality into newgraph. While in early stages some operations, write operations in particular, that belong to the newcoin domain are implemented in newgraph. The trend however is to provide most of write operaions in newcoin, keeping Newgraph to deal with advanced analytical data representation in at least three shapes: graph, timeline and indexed search. https://github.com/newstackdev/iosdk-newgraph-client-js is the official TS/JS client library for newgraph. Other language variants may be found at https://github.com/newstackdev/iosdk-newgraph-client-variants.

Newsafe

Newsafe is a cloud wallet and security permissions management service. At its core is a proxy into the newcoin chain which allows

  1. progressive onboarding of technically limited users who would not be able to easily use the newcoin wallet.
    To make a write transaction to newcoin via newsafe the user will be redirected to https://auth.newsafe.org. In future temporary tokens will be provided to enable direct calls from applications to newsafe without redirection to newsafe with some exceptions.
  2. OAuth-style coordination of credentials between applications in the newstack ecosystem. Services in newstack will accept the `Authorization: newsafe <jwt>` token, enabling the user to provide and withdraw approvals for all newstack applications. The newstack application configuration allows scope configuration for your application and its upstream services which will be communicated to the user when requesting access for an app.

Newstack

Newstack is used to manage your application and configure upstream services usage. The financial model of newstack follows newcoin, where instead of paying for access downstream applications/services stake to access. If a backend is also a part of your application, you would be able to enable a stake-to-access model with different pricing for different service levels.

Please note that while in early stages the security model of newstack/newsafe is relaxed but will tighten as the ecosystem matures. When this happens existing tokens may be invalidated and users/applications will have to obtain new tokens to continue operations.

IOSDK

IOSDK is not a service as such. It provides the UI components, library entrypoints and Overmind (see above) wrappers for the core services to enable easy application development.

Refer to the IOSDK repo for more information.

Where do I start?

If you haven't yet, go to newstack.dev and create an app (if you haven't need to create a username - follow the rabbit hole when trying to sign in)