A sample business system built with Meteor and the Smooch API.
Intended use: This code is a proof of concept and is not meant to be used in production. It should be used as a reference only to create your own implementation.
-
Install meteor. Note that currently this project requires meteor 1.6
curl https://install.meteor.com/?release=1.6 | sh
-
Clone this repository
git clone https://github.com/smooch/smooch-desk.git
-
In the smooch-desk directory, run
npm install
andmeteor npm install
-
Configure a Smooch webhook to send "All Triggers" to your smoochDesk app at the "/hook" route
-
Using the settings.json.example file as a guide, create a settings.json file and populate the missing fields:
-
For
smoochSecretKey
andsmoochKeyId
: You need an account level key, found under https://app.smooch.io/account. (If yoursmoochKeyId
has anapp_
prefix, it won't work) -
The
smoochAppId
can be found in your app's settings page.
-
-
Run it:
meteor --settings settings.json
You can visit "/web-messenger" to send test messages as an end-user
This project's structure and UI is based on work done by [@timbrandin] as part of his Meteor Slack project. Substantial changes have been made since to repurpose the project for use as a Smooch "business system" example. As such, this code is made available under the GPL.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Comment:
find server client -not \( -path client/compatibility -prune \) -type f -name '*.js' -print0 | xargs -0 sed -i '' 's/\(\/\*\*.*\*\/$\)/\1\/\*/g'
Uncomment:
find server client -not \( -path client/compatibility -prune \) -type f -name '*.js' -print0 | xargs -0 sed -i '' 's/\(\/\*\*.*\)\/\*$/\1/g'