ver. 2.0 prerelease

Embed instant messaging into your ASP.NET app!

ChatJS is a full-featured, lightweight, Facebook style chat library for ASP.NET web applications. It contains a set of JQuery plugins written in TypeScript and a server .NET library to make it easier to integrate in your existing ASP.NET application.

Download demo project Buy ChatJS 2.0 prerelease Join demo chat

Features:

  • Real time message sharing.
  • Automatically parses URLs and emoticons .
  • Automatically remembers opened windows across diferent requests (through cookies).
  • Triggers a sound notification when you receive a message.
  • Indicates when the other user is typing.
  • Supports user online and offline status.
  • Supports multiple chat rooms opened simultaneously with broadcast support.
  • Supports multiple browser windows opened with the same session. They all get properly sinchronized.
  • Customizable layouts. As ChatJS is composed of several jQuery components, it's possible to recombine them to create customizable layouts.
  • Customizable texts. You can easily translate it to your language.

How it works:

In the client, ChatJS is a set of jQuery plugins written in TypeScript. In the server, it's a simple .NET library. In order enable chat in your application, you just have to create a SignalR Hub implementing the IChatHub interface. It's really simple (Example).

ChatJS comes with a full server side implementation with database access using Entity Framework and SQL Server, but it's easy to implement your own server.

Roadmap:

These are the features already scheduled for the near future:

  • Ability to add multiple users to a conversation (June 2014)
  • Mobile specific layout using jQuery Mobile (August 2014)
  • Node.js + Socket.io (November 2014)

License:

ChatJS v2.0 is offered under a commercial license. During the prerelease and beta stages, all licenses are $39, with 12 months of free updates. After these, licenses will be at normal prices and free updates will be shortened to 6 months.

Pricing

ChatJS is provided under a commercial license. All licenses include:

  • Full commented ChatJS source code (TypeScript, JavaScript and C#).
  • 6 months of free updates.
  • Early access to new features through the GitHub private repository. (In development)
  • Support through the GitHub private repository issue tracker. (In development, e-mail support is currently available)

Single domain license

Allows publishing ChatJS to a single domain.

Price: $59

Unlimited domains license

Allows publishing ChatJS to unlimited domains.

Price: $169

Redistributable license

Allows publishing ChatJS to unlimited domains and unlimited redistribution with no royalt fees.

Price: $269

During the prerelease and demo stages, all licenses are at $39 with 6 months of extra free updates (12 months total).

Buy ChatJS 2.0 prerelease

How to get ChatJS up and running in your existing ASP.NET application

1) Setting up the references and dependencies

Install ChatJS in your application. To do so, in the Package Manager Console, type the following instruction. This will automatically install jQuery and SignalR if necessary.

Install-Package ChatJS

2) Make sure SignalR is properly set up

If you didn't have SignalR installed in your application already, you need to do so. First, create a file called Startup.cs in the root folder of your application, with this content:

using ChatJs.Admin;
using Microsoft.Owin;
using Owin;
[assembly: OwinStartup(typeof (Startup))]
namespace ChatJs.Admin
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            this.ConfigureAuth(app);
            app.MapSignalR();
        }
    }
}
    

Then, you need to include the client side scripts in the pages you need ChatJS:

<script src="/Scripts/jquery.signalR-2.0.3.min.js"></script>
<script src="/signalr/hubs" type="text/javascript"></script>

For more instructions on how to use SignalR, please refer to the Signalr website and the Getting Started tutorial.

3) Add a reference to the ChatJS script and style

Add a reference to the necessary client side resources, in the pages you want to use ChatJS:

<script src="/Scripts/jquery.chatjs-2.0.0.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="/Content/ChatJs/Styles/jquery.chatjs.css" />

4) Create the SignalR Hub for ChatJS

Create a SignalR Hub for ChatJS, implementing IChatHub, called ChatHub. Please refer to the sample implementation.

5) Initialize ChatJS

<script type="text/javascript">
    $(function() {
        $.chat({
            // your user information
            userId: 1, // this should be dynamic
            // text displayed when the other user is typing
            typingText: ' is typing...',
            // the title for the user's list window
            titleText: 'Chat',
            // text displayed when there's no other users in the room
            emptyRoomText: "There's no one around here. You can still open a session in another browser and chat with yourself :)",
            // the adapter you are using
            adapter: new SignalRAdapter()
        });
    });
</script>
        

About the author

Hello everyone, my name is André Pena. I'm a .NET developer from Brazil. I hope you will enjoy ChatJS as much as I enjoy developing it. If you have a suggestion for ChatJS, or if you want to hire me to help integrating ChatJS into your application, contact me at andrerpena@gmail.com.

Feedback

Please help us improve. Give us feedback at our UserVoice page.

Third Party:

ChatJS uses jQuery autosize by Jack Moore and emoticons by Aha.