Chat application using NodeJS, ReactJS and Redux
Fri 05 Oct 2018

Repository Here.

Node.js currently is pretty hot. I can see that there are a lot of companies which are recruiting Node.js developers. Node.js, React.js, Ruby, Python...they are just programming languages which provide us the weapons for solving problems. If you are programmer and you are good at one modern language programming, you will see that they are the collection of syntaxes. At first, they build the syntaxes. Then they build the libraries based on those syntaxes. In order to build a product, we decide which language we use. We learn syntaxes then we read the API to learn the libraries. 

There are two approaches for learning a new language programming. 

  • Which problems does it solve? The idea behind each of them. 
    • golang for performance issues.
    • ruby on rails for web application.
    • python for web, machine learning. 
    • cobol for insurance and banking.
  • Learn syntaxes and library's API.

Node.js and React.js are both javascript. They are made by javascript. Speaking of React.js we use "import" to use the libraries. Regarding to Node.js we use "require". I'm ruby on rails developer but I used to be Java and Cobol developer. I found the same way to learn any language programming like that. I care much more about the ideas behind them. The problems each of them will solve. 

React.js is a javascript framework. It is pretty cool with the design of components and containers. That really make it easy for maintenance. When we use it with Redux, the front-end becomes more powful with data flow transferred among containers. 

Node.js is javascript for server side. It's good at realtime, works on a non-blocking IO model that makes it clean and usable. It is very efficient in managing asynchronous IO. 

Let's get started with a simple chat application without saving data. Simple application is always powerful. If we are startup we should build only simple application. Then we get feedback from users, in order to go on the right track. Simple application doesn't mean easy. Because we want to keep it simple so that we have to let a room for extending. When the project goes on the next stage, it will prove our development skills.

Functional Requirements

  • User registration: Because this is demo project so users just should be able to register easily. No need to save the account. Users provide the username and that would be fine.
  • Creating a room: After registration, users have the right to create a new room or choosing an existing room to join.
  • Sending Message:
    • Users should be able to send message to all users in a room.
    • Direct message to another user in the same room.
  • Message status: Users should now that the messages they sent were read or not.
  • Leaving.
    • Leaving a room: users won't receive any messages.
    • Leaving session: informing in the rooms that users left.

Non-Functional Requirements

  • Message must be sent instantly.
  • Privacy: Users only see other users in the same room. We don't want to be public although the account will be delete after leaving.
  • Code need to be readable, extendable, maintainable, reliable and robust.


Activity Diagram

Usecase Diagram

Flow Chart Diagrams

to be continued...