Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Serverless service to send push notifications via Expo for Carrot users

License

Notifications You must be signed in to change notification settings

open-company/open-company-push-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCompany Push Notifications Lambda function

License: CC BY-NC-SA 4.0

Background

Transparency, honesty, kindness, good stewardship, even humor, work in businesses at all times.

-- John Gerzema

Teams struggle to keep everyone on the same page. People are hyper-connected in the moment with chat and email, but it gets noisy as teams grow, and people miss key information. Everyone needs clear and consistent leadership, and the solution is surprisingly simple and effective - great leadership updates that build transparency and alignment.

With that in mind we designed Carrot, a software-as-a-service application powered by the open source OpenCompany platform and this source-available web UI.

With Carrot, important company updates, announcements, stories, and strategic plans create focused, topic-based conversations that keep everyone aligned without interruptions. When information is shared transparently, it inspires trust, new ideas and new levels of stakeholder engagement. Carrot makes it easy for leaders to engage with employees, investors, and customers, creating alignment for everyone.

Transparency expectations are changing. Organizations need to change as well if they are going to attract and retain savvy teams, investors and customers. Just as open source changed the way we build software, transparency changes how we build successful companies with information that is open, interactive, and always accessible. Carrot turns transparency into a competitive advantage.

To get started, head to: Carrot

Local Setup

Prospective users of Carrot should get started by going to Carrot.io. The following local setup is for developers wanting to work on the OpenCompany Notify Service.

Most of the dependencies are internal, meaning NPM will handle getting them for you. There are a few exceptions:

Overview

The OpenCompany Web Application provides a Web UI for creating and consuming open company content and data.

OpenCompany Screenshot

Expo Push Notification Lambda Development

The notify service is responsible for sending push notifications to mobile users. Currently we use Expo's Push Notification service to accomplish this task. The only viable SDK for working with this service at the time of writing was the expo-server-node-sdk. Because of this, the notify service includes a serverless project in the expo-push-notifications subfolder containing a few Lambda functions leveraging the SDK. When developing on these, it is useful to deploy experimental changes without disrupting staging/prod. To do so:

# Install serverless globally (one-time setup)
npm install -g serverless

cd expo-push-notifications
serverless deploy --stage dev

This will output the name of a Lambda function, the prefix of which will be used in the following configuration. For example, if the created Lambda function is named expo-push-notifications-dev-sendPushNotifications, then the prefix would be expo-push-notifications-dev-.

You can then test it by sending a test payload like:

{
  "notifications": [{"pushToken": "ExpoPushToken[AlmostValidToken]",
                    "body": "Some text here",
                    "data": {}},
                    {"pushToken": "VeryBadToken",
                     "body": "Some text here",
                     "data": {}}
                  ]
}

License

Distributed under the GNU Affero General Public License Version 3.

Copyright © 2015-2021 OpenCompany, LLC.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

About

Serverless service to send push notifications via Expo for Carrot users

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published