Skip to content
Dmitry Kolomiets edited this page Nov 13, 2018 · 5 revisions

TWAIN Cloud

Reference implementation of TWAIN Cloud specification.

Build Status

Overview

TWAIN Cloud reference implementation includes two main components:

TWAIN Working Group and HazyBits maintain hosted version of TWAIN Cloud APIs and Web Frontend, accessible at https://twain.hazybits.com.

Authentication

Reference implementation relies on serverless authentication boilerplate to integrate with social OAuth providers. Facebook and Google supported out of the box, custom implementation can be added as needed. Example of the custom OAuth provider can be found here.

Differences between public and private environment

Travis-CI job is configured to build and deploy this repository to HazyBits AWS infrastructure. This is so-called public deployment of TWAIN Cloud that is managed by HazyBits.

Alternative private deployments of TWAIN Cloud is possible - the process of setting up the environment is specified below.

AWS Account

First, you need an AWS account (you can create a free one here) and configured AWS CLI tools.

Clone repository and setup dependencies

Clone the repository and install necessary dependencies using

npm install

Update deployment settings

This repository contains two sets of deployment settings:

  • serverless.deployment.public.yml - settings for public hosted version of TWAIN Cloud
  • serverless.deployment.private.yml - template for alternative TWAIN Cloud deployments

You need to update serverless.deployment.private.yml by specifying the following:

Deploy private TWAIN Cloud stages

It is possible to have multiple TWAIN Cloud stages. Stage is an independent copy of the infrastructure that allows you to test changes on one stage without affecting users of another. It is common to have dev and prod stages.

Run the following commands to deploy TWAIN Cloud to the appropriate stage:

npm run deploy-private-dev

or

npm run deploy-private-prod