Code Monkey home page Code Monkey logo

chat-app's Introduction

chat-app

React-Redux Client Node.js Express Server Socket.io

Hello! I created this application to learn about websockets. I also wanted to develop and deploy a decoupled architecture from scratch.

The goal was to have many devices be connected to a socket and send messages to one another. A user can create a room with a password and share the credentials with others. The messages are not stored so they are all lost when the window is reloaded or closed. The room name and password are stored so a user can claim a room and password (hashed and salted with BCrypt) for repeated use.

##Client

Requirements:

  • Gulp (to run gulp style:watch)
  • Node.js

How to run:

  • Don't forget to npm install inside client directory.
  • Run gulp style:watch to watch all the files in the /sass directory and build.
  • Run npm run dev to watch all javascript files in the /app directory have webpack build bundle.js.
  • Run node app.js or nodemon to run client on localhost:3002.

##Server

requirements:

  • MySQL (v5.6 or higher)
  • Node.js (v4.2.3 or higher)

Setup:

  • Don't forget to npm install inside server directory.
  • Create a local MySQL database and run migrations located in /sql/migrations/.
  • Modify /config/mysql.js to have the correct user, password, and database name for the server to access.

How to run:

  • Run node index.js or nodemon.

##TODO

  • navbar
  • store messages in NoSQL for every room
  • track active users in socket

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.