Our Blog

We are passionate about high quality applications

Aug 29

DynamoDB in Universal Relay Boilerplate and Push Notifications in Rebar

We updated the Universal Relay Boilerplate to support AWS DynamoDB. In addition, Push Notifications functionality has been added to Rebar.

The Universal Relay Boilerplate, now at version 9.7.4 with the help of our contributors has been updated with the following changes:

  • Local version of nodemon is used.
  • Completed working version of DynamoDB persister and added a docker image for running DynamoDB locally.
  • Refactored ObjectManager with simpler, more consistent method names and signatures.
  • Fixed bugs in To Do example.
  • Updated to React Native 0.32 and React 15.3.
  • Synchronized native app and web app URL schema in order to simplify features like deep linking and push notifications.
  • Fixed build issue.
  • Simplified the setting of the default persister.

The same changes have been implemented in Rebar.

A new module for Push Notifications has been added to Rebar. It facilitates the sending of push notifications to mobile apps and hides the complexities of the process from the application developer. Sending a push notification can be done by simply passing the message, the URL route and the UserID of the recipient, and it is sent to all of the user's devices. Here is an example that add a push notification every time a new To Do item is added:

import ObjectManager from '../../../graphql/ObjectManager'
import { sendNotificationToUser } from '../../../units/rb-push-notifications/server/notificationsServer'

export default function serverExtensions( router )
  ObjectManager.RegisterTriggerForAdd( 'ToDo', ( objectManager, newToDo ) =>
    sendNotificationToUser( newToDo.ToDo_User_id, newToDo.ToDo_Text +
      ' has been added to your To Do list', '/todo'