JavaScript client library implementation for AeroGear
Pull request Compare This branch is 52 commits behind aerogear:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

aerogear-js Build Status devDependency Status

JavaScript client library implementation for AeroGear. Eventually, this will include API's for persistence, security, data synchronization and more. For more information and downloads, visit


The AeroGear.Authorization namespace provides an authorization API. Through the use of adapters as well as coupled with Pipeline, this library will help provide access to services that need authorization.

See the Authorization API docs for more info.


The AeroGear.Auth namespace provides an authentication and enrollment API. Through the use of adapters, this library provides common methods like enroll, login and logout that will just work.

See the Auth API docs for more info.


The AeroGear.Crypto namespace provides a straightforward API to provide an easy to use cryptography interface for data encryption and decryption.

See the Crypto API Docs for more info.


A collection of data connections (stores) and their corresponding data models. This object provides a standard way to interact with client side data no matter the data format or storage mechanism used.

See the DataManager API docs for more info.


Notifier is a collection of adapters which provide a unified or similar API for interacting with different messaging services and protocols.

See the Notifier API docs for more info.


Pipeline is a JavaScript library that provides a persistence API that is protocol agnostic and does not depend on any certain data model. Through the use of adapters, both provided and custom, user supplied, this library provides common methods like read, save and delete that will just work.

See the Pipeline API docs for more info.


SimplePushClient is a client implementation and polyfill for the Mozilla SimplePush specification. SimplePush allows for simple push notification support in web, as well as Firefox OS, applications. This implementation does differ slightly from the specification in that it only works in applications that are "online" and active in the browser. This implementation also supports connecting to both Mozilla's SimplePush server as well as the AeroGear project's server.

See the SimplePushClient API docs for more info. Also, please see the Mozilla SimplePush specification for more info on SimplePush.


UnifiedPushClient is used in conjunction with AeroGear's UnifiedPush server to register web applications for push notifications. Using the SimplePushClient, a web application can register for push notifications from a SimplePush network and then inform the UnifiedPush server as to where it should send those push notifications.

See the UnifiedPushClient API docs for more info.

Feature Stability

All features of the library are given a stability rating which is noted in the documentation for that feature. The stability ratings are as follows:

  • Experimental - This feature is new and has not been thoroughly tested outside of development. This feature could be changed or removed at any time. Use of these features in a production environment is at your own risk.
  • Stable - This feature has existed for a full release cycle and has been thoroughly tested. These features are considered safe for use in production environments.
  • Deprecated - This feature is being removed or replaced. As with experimental features, these features could be removed at any time and their use in production environments is at your own risk. For features being replaced, it is recommended to update to the next version and begin using the new feature.

Library Dependencies

Some parts of AeroGear.js depend on external libraries which are not bundled in the same file. Below is a list of each plugin and their adapters along with external dependencies, if they have any. It is recommended to use the latest stable version of each dependency unless otherwise noted.




  • SJCL - bundled w/ AeroGear.js








Grunt is used as the build tool which requires Node.js version >= 0.10. Please refer to for details regarding installing Node.js. Please refer to Grunt's getting started guide for details regarding installing Grunt.

Installing Build Dependencies

To install the dependencies of the project run the following command:

$ npm install

This will install the versions of the dependencies declared in package.json. This is only required to be done once before building the first time, or if the dependencies in package.json have been updated.

Building the project

$ grunt

The produced JavaScript will be in the dist directory.

Custom Build

There is a special grunt task called, custom to help create custom builds of the library.

The custom task takes a comma delimited list of "modules".

For example, if you wanted a build with Pipeline and the SimplePushClient, you would do

$ grunt custom:pipeline,simplePush

The produced JavaScript will be in the dist directory as aerogear.custom.js.

For usage and a list of available "modules" run,

$ grunt custom:help

Generating the documentation

To generate the API docs, run the following command:

$ jsdoc-aerogear src/ -r -d docs

or by running the grunt docs task

$ grunt docs

The docs use a slightly modified version of jsdoc