subbu6502 / apollo

IM, group chat, and video calls built on Respoke

Home Page:https://www.respoke.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apollo

IM, group chat, and video calls built on Respoke.

Requirements

Setup

  1. Perform the following commands in a terminal:

    git clone https://github.com/respoke/apollo
    cd apollo
    npm install
  2. Edit settings in the two config files:

    • Server configuration: ./config.example.js and copy to ./config.js
    • Browser configuration: ./public/js/client-config.example.js and copy to ./public/js/client-config.js
  3. Start the app via terminal:

    npm start
  4. Apollo will be running at http://localhost:3000/.

Using Google OAuth 2.0 authentication

You should be able to input your google auth credentials in ./config.js, set config.google.enable = true and it will work.

Google auth requires that you create a Google developer project in their developer console.

  1. Click Create Project and select that project
  2. Go to APIs and Auth > Credentials and click on "Create New Client ID" under Oauth
  3. Choose "Web Application".
  4. Add your site's base URL including http:// or https:// under "AUTHORIZED JAVASCRIPT ORIGINS". (e.g. https://localhost:8080)
  5. Add /auth/google/callback under "AUTHORIZED REDIRECT URI". (e.g. https://localhost:8080/auth/google/callback)
  6. Obtain the Client ID and Client Secret for Apollo (the google section of ./config.js)
  7. Go to APIs and Auth > Consent Screen and add your information including a product name

This blog post gives an overview of basic concepts for Google OAuth 2.0.

Extending Apollo

Custom message parsing plugins

Apollo lets you add your own plugins to parse message contents. You might want to turn a certain string into a link, or fetch an image when a particular string is in a message, embed a video, etc.

Message parsing plugins are middleware - executed asynchronously, in series according to the clientConfig.messageRenderingMiddleware array in your ./public/js/client-config.js file.

Example middleware:

function (messageInputText, next) {

    // replace all instances of "Billy" with "Cheeseface"
    var err = null;

    next(err, messageInputText.replace(/Billy/g, "Cheeseface"));

}
Custom server plugins

You can extend the base Apollo application.

An example plugin can be seen at ./example-plugin.js.

Apollo automatically loads (via require) all plugins that are placed in the ./plugins/ folder.

Desktop app

Apollo has a companion desktop application which uses node-webkit.

You must configure to point to your Apollo server, then build it. Thus, it will not work without first setting up an Apollo server.

Requirements

If you would like to build the desktop app, proceed with the following steps.

  1. Edit the following example config files and rename them:
    • ./nodewebkit.example.json to ./nodewebkit.json
    • ./public/passthrough.example.html to ./public/passthrough.html
  2. From the Apollo directory, run grunt release.
  3. The applications will be in the ./public/release/<your app name> folder.
  4. It is recommended to compress them by running grunt pack.

Screensharing - local setup

  1. You need the Respoke chrome extension setup.
  2. It only works over https.
  3. Using a tunnel like ngrok helps. Make sure you add it to the extension manifest.

Documentation

Run grunt jsdoxy.

Output goes to .docs/.

License

AGPL v3

See the LICENSE file for text.

Apollo - Copyright (c) 2015, Digium. All Rights Reserved. Licensed Software.

About

IM, group chat, and video calls built on Respoke

https://www.respoke.io

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 82.1%Language:HTML 10.6%Language:CSS 7.2%