Real Time Chat Room with Text, Image and File support built on NodeJS, ExpressJS and Socket.IO

by: Saurabh Nandu in: Programming tags: ExpressJS, NodeJS, SocketIO,


We would like to announce the release of our open source small project, a real time chat room with Text, Image and File transfer support. Built on NodeJS, ExpressJS and Socket.IO.

You can see the live demo here



  • Provides chat messaging using
  • Allows file sharing of image,doc,pdf,excel,text and mp3.
  • Periodic file deletion to save server space.
  • Quick messaging and file sharing using formadible

Screen Shots

Figure1: Login page

Figure 2: Chat Room


You need node,npm and bower installed globally:

- Step1: Clone ChatRoom repository locally
- Step2: cd into cloned directory <Ex : ChatRoom/> 
- Step3: install dependencies using commands 
$ sudo npm install
$ bower install
- Step4: cd into <your_app_directory/public/app/js/> and edit app.js 
  set $rootScope.baseUrl to <http://your_ip_address:8282>
  set $socketProvider.setConnectionUrl('http://your_ip_address:8282')
- Step5: run project using node app.js in terminal  
- Step6: go to your browser and enter url <http://your_ip_address:8282>

File shared among users will be stored in /public/app/upload in respective doc, music and image directory. The files in upload directory are stored with some expiry time (8 hours), the files will be deleted after expiry time. The routine_cleanup function deletes files after every one hour.

you can change the file expiry time by changing variable expiryTime and routine cleanup time by changing variable routineTime in app.js.

ChatRoom uses a number of open source projects to work properly:

  • [AngularJS] - HTML enhanced for web apps!
  • [Bootstrap] - great UI boilerplate for modern web apps
  • [AdminLTE] - great UI based on bootstrap
  • [node.js] - evented I/O for the backend
  • [Express] - fast node.js network app framework
  • [jQuery] - javascript library
  • [lightbox] - javascript plugin for image pop-ups

Get Source

And of course ChatRoom itself is open source with a public repository on GitHub.