Overview · Prerequisites · Start the server · Run examples · Documentation · License
Tanker is an open-source client SDK that can be embedded in any application.
It leverages powerful client-side encryption of any type of data, textual or binary, but without performance loss and assuring a seamless end-user experience. No cryptographic skills are required.
This repository features example applications using the JavaScript, iOS, and Android encryption SDKs.
Developing on Windows? Click here to display additional instructions.
On Windows 10 version 1607 or later, the easiest way to run the quickstart examples is by installing the Windows Subsystem for Linux.
Although it is possible to set up a Node.js stack on older Windows versions, the amount of work required is out of the scope of this guide.
Once you have enabled Windows Subsystem for Linux, open a new Command Prompt instance and type the following:
bash
Your Command Prompt instance should now be a Bash instance.
For the record, you can access your Windows C:\
drive at anytime under /mnt/c
.
Let's update the repo lists and packages:
sudo apt update -y && sudo apt upgrade -y
Install Node.js:
sudo apt install nodejs
Install Yarn by following the Ubuntu instructions on yarnpkg.com.
Check your Node.js and Yarn versions, and upgrade if needed:
node -v # >= 10 (maintained version, not eol)
yarn -v # >= 1.0 (workspaces support)
We recommend using yarn
rather than npm
, as it will manage the dependencies of all the applications for you from the root of the repository.
Clone this repository:
git clone https://github.com/TankerHQ/quickstart-examples.git
Install all dependencies at once:
cd quickstart-examples && yarn
Use the dashboard and follow the instructions. No account yet? Contact us to get access at https://tanker.io/contact.
Since you are just testing Tanker within demo applications, feel free to enable the test mode.
Once you use Tanker in real production applications, it is imperative to create a new application without activating the test mode.
Take the JSON configuration file from the previous step and copy it under the config/
folder. Add an authToken
key containing the value of the
authorization token in the "API credentials" section of the dashboard.
Note that the JSON configuration file can have any name ending with the .json
extension and must have the following format:
// e.g. config/app.json
{
"appId": "...",
"appSecret": "...",
"authToken": "..."
}
That's all you need to start the server and applications!
Start the example server in a terminal with:
yarn start:server
The example server provides applications with:
- a mock auth system
- an endpoint to retrieve user tokens as needed by the Tanker SDK
- a couple of routes to upload/download user data
You may also provide the path of a config file explicitely:
yarn start:server --config <path>
Note: before running any of the example applications, don't forget to always start the server first!
Go to the homepage of the example server in your browser:
http://127.0.0.1:8080/
On this page, you will find all the instructions needed to run the example applications.
For more details and to go beyond the example applications, please refer to:
The Tanker iOS SDK is licensed under the Apache License, version 2.0.