/AngularChat

Primary LanguageJavaScript

AngularChat - chat app using node.js, socket.io and AngularJS

Libraries used

Backend

  • node.js
  • socket.io
  • Express
  • node-uuid
  • underscore
  • ejs
  • shrinkwrap

Frontend

  • AngularJS
  • Angular-Bootsrap (angular-ui)
  • Bootstrap (Yeti theme)
  • Font Awesome

Functionality

The functionality list will continually be extended.

  • People can join the chat server after picking a username (usernames have to be unique per user, alternative usernames are generated as well)
  • Once connected people can createa room (roomnames again have to be unique)
  • User agent and geolocation are both automatically detected (geo location has to be approved in the browser first of course)
  • People can start chatting with each other once they are ina a room
  • Chat history is also displayed, by default the last 10 messages are shown (this setting can be changed)
  • 'who is typing' feature is also enabled

Setup and configuration

Make sure that you update app.js at the backend with your own IP address or hostname:

app.set('port', process.env.OPENSHIFT_NODEJS_PORT || 3000);
app.set('ipaddr', process.env.OPENSHIFT_NODEJS_IP || '192.168.56.102');

Also, tell the frontend where to listen for socket.io - update public/js/services.js:

var socket = io.connect('192.168.56.102:3000');

(the IP address or host name here should be the same that you've defined in app.js at the backend.)

To install the application execute npm install. This will also automatically install all frontend dependcies using bower (no need to install that separately).

To launch the application please execute node app.js.

For some background on the project, please read this article: http://tamas.io/angularchat/

Demo

For a working demo, please check: http://angularchat-tamasnode.rhcloud.com

Future

I will keep on adding new featues that I have removed from the other application such as:

  • whisper (private messages)
  • Web Speech API
  • "and who knows what else..." :)