Skip to content
Kuan Butts edited this page Dec 15, 2016 · 15 revisions

ClientComm splash image

What is ClientComm

ClientComm helps improve communications between case managers and clients by automating tedious communications documentation processes, including tracking multiple communications devices (including email, text, and voice).

ClientComm's catch phrase

Help clients navigate their requirements and graduate from pretrial or probation successfully. ClientComm makes it quick and easy to communicate with clients and document client supervision.

How to use this wiki

This wiki is intended to be useful to both non-technical and technical users. The wiki will cover aspects of the application, how they work, and documentation regarding the underlying mechanics of the application. A high level overview of each component of the application will also be included to help interested users follow along who are not interested in the specifics of a redeploy or otherwise dealing with the mechanics of the software.

Additional non-technical resources

An FAQ is also under construction in this same organization repository. It is linked to from within the application and should be a resource for non-technical users of the application as well.

Install

Instructions for deploying ClientComm. Process should be pretty straightforward - the complexity is in making sure the other service integrations are up to speed. npm install and bower install will install all necessary libraries.

Set up assistance Join the chat at https://gitter.im/slco-2016/clientcomm

Need assistance setting up this tool? Questions about the application structure? Send Kuan an email, or join the conversation on Gitter.

Versions

The application is designed to run on Node v6.9.1. It has also been tested on Node v6.5.0 and supports Node from v6.5.0 up. package.json sets base versions of all libraries we are using. For our database we are using RDS instances on AWS of PostgreSQL 9.4.5 . Check the "Setting Everything Up" section for more details on getting the production environment (and test environment) up and running.

Credentials

There is a file called exampleCredentials.js in the root directory of the repository. Modify these attributes to create your own deployment. You can view the file here.

// Environment is set with the CCENV process environment variable
// This can be set in the command line before commands 
// (e.g. CCENV=development npm start)
const CCENV = process.env.CCENV || 'development';

const baseProductionReadyCredentials = {

  // Allow access to CCENV be consistent from credentials.js
  // TODO: Update all references to CCENV to be from here
  CCENV: CCENV,

  // Root url
  rootUrl: 'http://unique.us-west-1.compute.amazonaws.com',

  // Twilio-related
  accountSid: '**************************',
  authToken:  '**************************',
  twilioNum:  '+12344564563',

  // Session
  sessionSecret: 'abcdefg',

  // For testing purposes
  // TODO: Make this something that is set when running the tests
  localDbUser: 'username',

  // Connection details for the production database
  db: {
    user:     'usernameunqiue',
    password: '**************************',
    host:     'unique.lksjdfbj3.us-west-1.rds.amazonaws.com',
  },

  // Currently we use Gmail Node library for email comms
  // TODO: Perhaps use Mailgun and stop relying on Google for outbound notifications
  em: {
    password: '**************************',
  },

  // New Relic monitoring information
  newrelic: {
    key: '**************************',
  },

  mailgun: {
    apiKey: '**************************',
  },

  // AWS interface/access secrets
  aws: {
    accessKey:       '**************************',
    secretAccessKey: '**************************',
  },

};

// Update the phone number for all non-production environments
if (CCENV !== 'production') {
  baseProductionReadyCredentials.twilioNum = '+18987327373';
}

// Changes made when we are developing (e.g. staging server, different rootURL, etc.)
if (CCENV == 'development') {
  baseProductionReadyCredentials.db = {
    user:     'foobar',
    password: '**************************',
    host:     'unique-staging.slkdfj9d8sf.us-west-1.rds.amazonaws.com',
  };
}

These attributes are modified with your own account for each of these related services (see Integrated Services section on the right menu) and what they do.

Style guide goals

There's no order in the current build(s) and everything is a mess. Naturally, we need to fix this as soon as possible. Goal for version 4.0.0 will be the following:

  • Camel case throughout (caveat: database will use underscores)
  • Spaces over tabs (2 spaces for insets)
  • "Class" -esque structure for databases which enable interaction and querying (all ORM functions are wrapped by class functions)