Code Monkey home page Code Monkey logo

react-ts-chat-app's Introduction

Chat App (React, Redux, Typescript & Socket.IO) ๐Ÿ‘‹

Version Twitter: adis_reve

React SPA chat application, written with

  • React
  • Redux
  • TypeScript
  • Express.js
  • Socket.io
  • Module SCSS

App Features

  • Pages

    • Navigation Bar
      • Dark/Light Mode Toggle
      • Navigation
    • Chat Page
      • Sending and receiving messages on the same server
      • Chat Panel with messages from guest user and away user
      • Unread messages, when away from chat tab
      • Automatic scrolling to the bottom of chat everytime it loads or user writes a message
      • Avatar based on username
      • Showing time on which every message is sent
      • Emoji support in messages
      • Link Parser
    • Settings Page
      • Change username
      • Clock Display (12h / 24h)
      • Send message on CTRL + Enter
      • Persist data to local storage
      • Reset Settings to Default TODO:
  • Add localization

  • Check for unique usernames and assign it by default

  • Scroll to bottom CTA

  • Parse links with metadata

  • Online and offline status

  • Write tests

Installation process:

Installation Process

Development

Clone the project to your local directory.

  1. Ensure that NodeJS is installed.
  2. Install npm.
  3. From the project folder, execute the following commands:

After cloning is done, run command yarn install to install all necessary dependencies for the project:

Installation of dependencies could take a few minutes to finish.

Usage

To start the application, we first need to run the server - yarn run server or ```node server`` after which Socket.io connections will be instanciated and server will listen for events on PORT 3001

Port is defined in server.js file, so it can be easily reconfigured if needed. If deployed somewhere else, it is set up that it works equally as well for production use.

const port = process.env.PORT || 3001;

After starting a server, run React app by executing the following command yarn start.

When application starts, go to settings and update username, after which you can open a new window with localhost:3000 - (preferably in Incognito mode or different browser/same browser with different application state).

Alternatively

Run yarn run app in root folder and the app (server and client-side) will be hosted on http://localhost:3001

Happy Chatting! ๐Ÿ˜„

Build

To build the app, type yarn run build - this will generate a folder build/, from which we can serve the app

Technical Details

Browserlist Target: >0.2%, not dead

Author

๐Ÿ‘ค Adis Jugo

Show your support

Give a โญ๏ธ if this project helped you!


react-ts-chat-app's People

Contributors

adisreve avatar

Stargazers

 avatar

Watchers

 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.