All Projects β†’ mihailgaberov β†’ chat

mihailgaberov / chat

Licence: MIT license
πŸ’¬ A React single page chat application (SPA), implementing Socket.io.

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to chat

bubbly
Full stack chat application created w/ Next.js, Socket.IO, Express, React and TypeScript
Stars: ✭ 24 (-75.51%)
Mutual labels:  styled-components, socketio
gobang
δΊ”ε­ζ£‹ε°ζΈΈζˆcanvas socket.io
Stars: ✭ 38 (-61.22%)
Mutual labels:  socketio
foliage
πŸƒ Style your components with performance
Stars: ✭ 29 (-70.41%)
Mutual labels:  styled-components
GoBarber
πŸ’ˆ Aplicação de agendamento para serviΓ§os de beleza, entre provedores e clientes.
Stars: ✭ 84 (-14.29%)
Mutual labels:  styled-components
Madara
✍️ A way for people to manage their tasks.
Stars: ✭ 17 (-82.65%)
Mutual labels:  styled-components
Noisekun
🎧 Web page made with Next.js and Typescript, for listen combinations of sounds for relaxing or getting more productive on tasks.
Stars: ✭ 17 (-82.65%)
Mutual labels:  styled-components
game-store-monorepo-app
A full-stack web app built with NestJS and ReactJS that helps you find and discover over 500,000+ video games on your device. Powered by RAWG API.
Stars: ✭ 106 (+8.16%)
Mutual labels:  styled-components
blue-collar-rocket
I built this as a capstone project of our web development boot camp. Blue Collar Rocket is an app to streamline processes in craftsmanship.
Stars: ✭ 13 (-86.73%)
Mutual labels:  styled-components
react-native-awesome-starter
βš›οΈ react-native initial development environment setting
Stars: ✭ 30 (-69.39%)
Mutual labels:  styled-components
YASCC
Yet Another SoundCloud Client
Stars: ✭ 30 (-69.39%)
Mutual labels:  styled-components
react-functional-select
Micro-sized & micro-optimized select component for React.js
Stars: ✭ 165 (+68.37%)
Mutual labels:  styled-components
react-toolbox-airbnb
An Airbnb DatePicker implementation using React Toolbox Core and Styled Components πŸ’…
Stars: ✭ 40 (-59.18%)
Mutual labels:  styled-components
SAAS-Starter-Kit-Pro
πŸš€A boilerplate for building Software-as-Service (SAAS) apps with Reactjs, and Nodejs
Stars: ✭ 313 (+219.39%)
Mutual labels:  styled-components
wendel.dev
My personal website and blog about software development, bleeding edge and open source πŸ”₯
Stars: ✭ 65 (-33.67%)
Mutual labels:  styled-components
babel-plugin-object-styles-to-template
Babel plugin to transpile object styles to template literal
Stars: ✭ 33 (-66.33%)
Mutual labels:  styled-components
hapio
A simple bridge plugin between HapiJS and SocketIO
Stars: ✭ 21 (-78.57%)
Mutual labels:  socketio
Skribbl.io-Bot
My try at creating fully automated game bot.
Stars: ✭ 63 (-35.71%)
Mutual labels:  socketio
aspnet-core-react-redux-playground-template
SPA template built with ASP.NET Core 6.0 + React + Redux + TypeScript + Hot Module Replacement (HMR)
Stars: ✭ 78 (-20.41%)
Mutual labels:  styled-components
dashboard
πŸ₯ McHacks dashboard
Stars: ✭ 28 (-71.43%)
Mutual labels:  styled-components
realtime-flask-experiment
Experimenting with PostgreSQL's Listen/Notify and Flask-SocketIO
Stars: ✭ 22 (-77.55%)
Mutual labels:  socketio

Mihail's Chat (React)

Tests

I have written a tutorial about how I did this. You can find it here or here, or here

A React single page chat application (SPA) built with the following technologies:

  • React with TypeScript (create-react-app my-app --scripts-version=react-scripts-ts)
  • Redux
  • Express.js with Socket.io
  • styled-components (SASS)
  • Jest/Enzyme/Sinon

Screenshots

screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot screenshot

Application features:

  • Header

    1. Chat tab - blinking when new message is received until is read, i.e. when the user is on Settings page
    2. Settings tab
    3. Unread messages counter
    4. Font Awesome icons
  • Chat page

    1. Chat area (includes left aligned and right aligned messages)
    2. Message (text, datetime, left or right depending on if it's received or sent)
    3. Showing nickname only for received message
    4. Message sender - input and button. Input is cleared and focused when button is clicked
    5. Send messages with Ctrl+Enter
    6. Auto scroll to bottom when the chat area is not enough to show all messages
  • Settings page

    1. UserProfile component - possibility to change user name
    2. Interface color component - change the color theme of the app
    3. ClockDisplay component - change the time mode 12h or 24h, shown with each message
    4. Send messages with Ctrl+Enter - On/Off
    5. LanguageSwitcher - dropdown menu allowing changing the language of the app (currently English and Deutsch are supported)
    6. Reset button - resets all settings stored to local storage

    Improvements (done and pending)

    • Add video chat feature.
    • πŸ‘ Added AM/PM time formatting for when 12h mode is selected.
    • πŸ‘ Added possibility to send message via ENTER by default. If the setting to send messages with CTRL+ENTER is ON, then this is going to be the only way (except via mouse/touch of course).
    • πŸ‘ Optimized for iDevices (media queries).
    • πŸ‘ Fix blinking/active class for the Chat tab issue - related to React Router not able to properly re-render connected components https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/blocked-updates.md
    • πŸ‘ Clear input field when new message is sent.
    • πŸ‘ Auto scroll to bottom main chat area when new messages exceed available space.
    • πŸ‘ Prevent 'doubling messages' (or multiple messages duplicates when more clients are connected).
    • πŸ‘ Add unit tests for the react components.
    • Add unit tests for redux stuff - reducers, store, action creators.
    • πŸ‘ Add media queries for responsiveness - test and adjust on more devices.
    • πŸ‘ Add demo to heroku.
    • πŸ‘ Add nice how-to in README.
    • Add animations for the messages (animejs).
    • Add sounds (with options to turn on/off in settings).
    • Add more color themes.
    • Add welcome message (broadcasts on user connected).
    • πŸ‘ Add icons ( use font awesome).
    • History of all the conversations.
    • Handle case when socket's connection state change (visually).
    • Handle case when there has been a socket error.
    • Handle case when a very long word (without) spaces is entered and it goes beyond the message background color.
    • πŸ‘ Emoticons support - such as :D, :P, :), ;), πŸ˜‰, ❀️, etc.
    • πŸ‘ Link Parser - youtube link (embedded video should appear), link to an image (embedded image should appear), all other links should appear as anchor.

Demo

⭐ mihails-chat.herokuapp.com ⭐

Running The App locally

To run the app, follow these steps.

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

To install dependencies:

  npm i

To run the client app:

  npm start

To run the server app:

  npm run server:watch

To run the tests:

  npm t

Browse to http://localhost:3000 and see the running app. In order to test, open it in two different computers, or computer and a phone, or two browsers on the same computer (one of it in incognito mode). If you are running it locally, make sure to change the host variable in Socket.ts (line:28) and its value to match your local network address - the one of the computer you are running the server app.

Deploy to Heroku

This step assumes you have already a Heroku account, installed heroku-cli and did login.

  1. npm build to build the project to build folder.
  2. Add build folder to be committed to Git
  3. Make sure that express server loads static resources from it.
  4. Commit all: git commit -m 'Deploy to Heroky'.
  5. Run git push heroku master.
  6. Open the app from the given URL (in my case: mihails-chat.herokuapp.com).

Resources

Stargazers

Stargazers repo roster for @mihailgaberov/chat

Forkers

Forkers repo roster for @mihailgaberov/chat

Star History

Star History Chart

MIT License

Copyright (c) 2018-2022 Mihail Gaberov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].