Converse.js is an open source webchat client, that runs in the browser and can be integrated into any website.
It's similar to Facebook chat, but also supports multi-user chatrooms.
Converse.js can connect to any accessible XMPP/Jabber server, either from a public provider such as jabber.org, or to one you have set up yourself.
It's possible to enable single-site-login, whereby users already authenticated in your website will also automatically be logged in on the chat server, but you will have to pre-authenticate them on your server. You can refer to the documentation for more info.
Features
- Single-user chat
- Multi-user chat in chatrooms (XEP 45)
- vCard support (XEP 54)
- Service discovery (XEP 30)
- Contact rosters
- Manually or automically subscribe to other contacts
- Accept or decline contact requests
- Roster item exchange (XEP 144)
- Chat statuses (online, busy, away, offline)
- Custom status messages
- Typing notifications
- Third person messages (/me )
- Translated into multiple languages (af, de, es, it, pt-BR)
Screencasts
- Screencast 1: Integrated into a Plone site via collective.xmpp.chat.
- Screencast 2: A static HTML page with Converse.js. Here we chat to external XMPP accounts on Jabber.org and Gmail.
Integration into other frameworks
Plone
collective.xmpp.chat is an add-on for Plone that uses Converse.js. Together with collective.xmpp.core, it provides for single-signon-support (SSO) and also enables you to manually or automatically register your Plone users onto your XMPP server.Django
django-conversejs is an app that makes it easer to integrate Converse.js into Django. It adds single-signon-support (SSO) support and a database model to store XMPP credentials.Roundcube
roundcube-converse.js-xmpp-plugin is a plugin for Roundcube Webmail. It's README states that it's still a work in progress.
If you have integrated Converse.js into any other CMS or framework, please let me know and I'll mention it on this page.
Demo
You can log in with any existing XMPP account. There is also a list of public XMPP providers on xmpp.net.
Note: currently the demo doesn't work in Internet Explorer older than 10. This is due to lacking support for CORS, a standard which enables cross-domain XmlHttpRequests. There are ways around this, but it hasn't been a priority for me to implement them for this demo. See here for more information.
Is it secure?
Yes, as long as you can trust that the Javascript being downloaded is not being tampered with. This page itself is served by Github and is not TLS/TLS encrypted (i.e. served via HTTPS). I don't know how probable it is that Github served pages could be hacked to insert malicious Javascript.
Ideally you'd want your site to be served encrypted via HTTPS. In this case, use with caution. You can of course go download the source from Github and run this page locally, removing the attack vector altogether.
Converse.js itself makes encrypted HTTPS requests to a connection manager, which will make an SSL/TLS encrypted connection to an XMPP server (if the server supports it).
Logging in happens via SASL.
That said, the developers don't assume any liability for any loss or damages as a result of using this software or demo. Use at your own risk.
Session support
The chat client will disconnect whenever you reload the page. If you want the user's session to persist across page reloads, you can establish an authenticated connection on the server side and then attach to this connection in your browser.
Converse.js already supports this usecase, but you'll have to do some integration work yourself.
Documentation
The documentation is included in the source download under the docs folder, or can be read online.
Tests
We use the Jasmine testing framework to write tests. Tests can be run in the browser (just open tests.html) or in the commandline via ``grunt test``.
Credits and Dependencies
Converse.js depends on a few third party libraries, including:
- JQuery
- strophe.js
- backbone.js
- require.js (optional dependency)
Licence
Converse.js is released under both the MIT and GPL licenses.
Contact
You can follow me on Twitter
My XMPP username is jc@opkode.im.
Send me an email via this contact form.