Skip to content

fmoga/servustalk

Repository files navigation

ServusTalk

ServusTalk is a web-based group chat geared toward personal (private) use within groups of friends. It features many customizations missing from current web-based solutions which make a better experience out of informal group chatting. Biggest advantage would be that it is easy to set up a private instance.

It is written using node.js, more precisely Express as a web framework, Jade as templating engine and Socket.io for the real-time communication. Mainly tested and used with Google Chrome due to desktop notifications support.

Features

  • Authentication using Google Account via OAuth 2
  • HTML5 desktop notifications
  • Inline display of image links
  • Basic NSFW protection
  • Drag & drop image resizing
  • Inline display of Youtube, Soundcloud, Mixcloud and mp3 links
  • Displays upcoming events in a public Google Calendar
  • Basic idle detection
  • Bookmark showing messages typed since going idle
  • Mentions support with @name syntax and autocompletion using Tab key
  • Archives
  • Code syntax highlighting using /code
  • IRC-style /me support
  • /slap support (utter chaos)
  • Emoticons
  • Chat title (topic)
  • Announcements and alerts using /#<hexcolor> text syntax
  • Input history using the up arrow
  • Uptoke system similar to reddit.com
  • Commands support (e.g. /clear will clear user's messagebox)
  • User moderation. Chat access is based on a whitelisting process. New users can't access the group chat until a whitelisted user accepts their request. First user to connect to the group chat is automatically accepted (he's probably the administrator) and then the whitelisting process continues normally. New requests, whitelisting/blacklisting trigger notifications in the chat area and they have realtime effects (e.g. blacklisting a user will instantly disconnect him from all active sessions).
  • Using long-polling as Comet technique so server push works on the vast majority of browsers including on Kindle, iOS and Android-based devices
  • HTML5 geolocation
  • Check-in support, and a map of past checkins
  • Ability to check in current location
  • Meme support using /meme meme-name "top text" "bottom text"
  • Listing existing memes using /meme list
  • Memegeist (meme archive)
  • Support for i18n
  • Press ? for help

Installation

  • Install node.js (0.6.9)

  • Install npm (1.1.0-3)

  • If on Windows, remove forever dependency from package.json as it is only used in production and fails to compile on Windows

  • Run npm install in the root folder

  • Install mongodb and create database named after definition in config.js

  • Register Google App via Google APIs Console. OAuth callback endpoint can be found at /auth/google/callback.

  • Add my_config.js file as described below

      var my_config = {}
      my_config.server = {
          port: 8000
      }
      my_config.app = {
          google_client_id: "GOOGLE_CLIENT_ID_TOKEN",
          google_client_secret: "GOOGLE_CLIENT_SECRET_TOKEN",
          calendar: 'https://www.google.com/calendar/render?cid=<GOOGLE_CALENDAR_ID>'
      }
      module.exports = my_config
    

This will override default configs in config.js.

  • Configure GOOGLE_CLIENT_ID_TOKEN, GOOGLE_CLIENT_SECRET_TOKEN and GOOGLE_CALENDAR_ID in my_config.js
  • Configure Google Calendar atom feed link in public/js/config.js using the GOOGLE_CALENDAR_ATOM_FEED key
  • Run node app.js
  • Open browser at http://<server host>:8000

Notes

  • Everyauth fails to parse Google OAuth response once in a while and causes the server to crash. Workaround for this is to use the forever node.js module when starting the server which respawns the app once it crashes. However, this is not necessary during development.
  • Enviornment variables used for webserver port, listen address and mongo connection. They are prefixed with SERVUS_

About

Private web-based group chat

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published