Giter Club home page Giter Club logo

nodechat's Introduction

pietertolsma.com

Build Setup

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate

For detailed explanation on how things work, check out Nuxt.js docs.

nodechat's People

Contributors

pietertolsma avatar waffle-iron avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

waffle-iron

nodechat's Issues

Name loss on server reboot

When the server reboots, the IRC does not save the usernames and the client does not prompt the user to re-enter the name, which causes the name to default to guest.

Either reprompt or find a way to temp. save the usernames!

Refreshing quickly glitches user count

When refreshing really quickly, the connectedClients array isn't emptied correctly which causes the user count to be more than it actually is.

Edit: see issue #4 which is closely related to this.

Add emoji's in chat

Emoji's are unmissable in todays means of communication!

Unicode (UTF8) already supports the use of emoji's, but standard keyboards (non-mobile) aren't set up for this.

Find a way to put emoji's in the input box.

Responsive design

The current formatting is not responsive. Would be a good addition to change this!

See who's typing

Like in whatsapp, it is useful to see who is currently typing a message.

Tip: use $("#input").on('change', function(e){}); and emit to the server. The server should then display that you are typing for a specific amount of time, and remove it when the input hasn't pinged within that time again.

Name validation

It is still possibly to have really long names or empty ones.

Prevent spamming

Currently users can send around 5 messages per second and quickly disconnect and reconnect. This is a very vulnerable spot to hackers/spammers.

This issue is closely related to issue #1 and I believe that fixing this will also fix this issue. You need to find a way to set a cooldown on users, for example by setting a timestamp in the chatbacklog and checking when the last time was a user sent a message every time a user wants to send a new message. Also, there should be a client-side cooldown to prevent server overload (savvy hackers can of course overcome this, but we don't want to make it easy for them).

Setting a cooldown on reconnections is important as well. One way to do this is to track the IP's of clients and basically doing the same as with the chat messages.

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.