Coder Social home page Coder Social logo

mario-christopher / chat-with-all Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 196 KB

A Simple chat application built using ReactJS, Node and Express. Redux is used for Client State Management. Redis is used for Server side session management. Socket.io is used for real-time messaging.

JavaScript 94.44% CSS 4.02% HTML 1.54%

chat-with-all's Introduction

Chat with ALL

Chat with ALL is a simple chat application built using :

  • React - to create the front end.
  • Redux - used for client side state management.
  • Node - to handle the server stuff.
  • Express - as the web framework, and for RESTApi.
  • Redis - used for server side session management, data storage and pub-sub for messages.
  • Socket.io - used for realtime messaging.
  • Live app hosted on Heroku and RedisLabs.

Try it out:

https://chat-with-all.herokuapp.com/

Setup

  • git clone https://gitlab.com/mario-christopher/chat-with-all.git
  • cd chat-with-all
  • npm install
  • Edit the file source\server\redis\config.js to add your redis server url (REDIS_URL) and password (REDIS_DB_PWD), or, alternatively, edit the package.json scripts to send them in as env variables. The app will not work without Redis configured.
  • npm run server - runs server on port 3000.
  • npm run client - runs client on port 3001 (on another terminal).
  • Browse to http://localhost:3001 ( tested on Chrome and IE.11 ).

Note : To simulate multiple clients chatting on the same computer, open the client (http://localhost:3001) in different browsers ( eg.: Client1 on Chrome, Client2 on IE etc ).

Application features:

  • User-name to identify the user in the chat session.
  • Broadcast a message to connected users when someone connects or disconnects.
  • After joing the chat, see who else is on the chat.
  • Rejoin the chat from where you left off automatically, if server crashes and/or restarts.
  • Rejoin the chat from where you left off automatically, if browser crashes and/or refreshes.
  • User is remembered (messages) until they explicitly leave the chat.
  • User sessions and app data are stored externally, on a Redis server, to allow for recoveries on crashes, multiple servers, load balancing, scaling etc.
  • Use of socket.io-express-session to share session with socket.io, so user information is safe in single source within session.
  • Use of ES6 features and Promises on Server and Client.

License

Shared under MIT License.

chat-with-all's People

Stargazers

Mario Christopher avatar Koji Hirano avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.