IM, group chat, and video calls built on Respoke.
- Node.js
- MongoDB
- A Respoke account, an app ID, an app secret, and a role ID.
- Make sure you create a Role in the Respoke developer console! More about Respoke permissions and roles
-
Perform the following commands in a terminal:
git clone https://github.com/respoke/apollo cd apollo npm install
-
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
- Server configuration:
-
Start the app via terminal:
npm start
-
Apollo will be running at http://localhost:3000/.
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.
- Click Create Project and select that project
- Go to APIs and Auth > Credentials and click on "Create New Client ID" under Oauth
- Choose "Web Application".
- Add your site's base URL including http:// or https:// under "AUTHORIZED JAVASCRIPT ORIGINS". (e.g. https://localhost:8080)
- Add /auth/google/callback under "AUTHORIZED REDIRECT URI". (e.g. https://localhost:8080/auth/google/callback)
- Obtain the Client ID and Client Secret for Apollo (the
google
section of./config.js
) - 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.
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"));
}
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.
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.
If you would like to build the desktop app, proceed with the following steps.
- Edit the following example config files and rename them:
./nodewebkit.example.json
to./nodewebkit.json
./public/passthrough.example.html
to./public/passthrough.html
- From the Apollo directory, run
grunt release
. - The applications will be in the
./public/release/<your app name>
folder. - It is recommended to compress them by running
grunt pack
.
- You need the Respoke chrome extension setup.
- It only works over
https
. - Using a tunnel like ngrok helps. Make sure you add it to the extension manifest.
Run grunt jsdoxy
.
Output goes to .docs/
.
AGPL v3
See the LICENSE file for text.