Giter VIP home page Giter VIP logo

hapi-socketio-redis-chat-example's Issues

Additional feature ideas

  1. Authenticating the application with Github / Google / Facebook
  2. Make rooms
    • Display rooms to join
  3. Display list of users on side of channel or room
  4. Custom notifications
    • Sounds
    • Notifications from other rooms
  5. Uploading files
  6. Markdown friendly / Custom text (e.g. bold, italics)
  7. Emojis
  8. Monetise chatrooms
  9. Private chatrooms
  10. Video chat
  11. Sound messages
  12. Random chat (chatroulette)

Rooms

Hi, guys, I am wondering what would be the best practice to add rooms to this chat. And how to handle the room from the client to the handler?
Thank you.

Test hanging

When the repo is downloaded, and you run npm run test, the 3rd test in server.js hangs.

We found it could be resolved by JSON.stringifying the res.payload

instead of io.emit on.message we should redis.subscribe on each node.js server for horizontal scalability

At present we have:

socket.on('message', function (msg) {
    redisClient.HGET("people", socket.client.conn.id, function (err, name) {
            if (err) {
                console.log(err);
            }
            var obj = { // store each message as a JSON object
                m: msg,
                t: new Date().getTime(),
                n: name
            }
            var str = JSON.stringify(obj)
            redisClient.RPUSH("chat", str);
            io.emit('message', str);
    })
});

We should de-couple the io.emit('message, str) from the socket.on('message' ...

Re-structure CSS

Currently it's not a great example of how things are done at dwyl.

current-css-at-hapi-chat

CSS | 'Send' button disappears with smaller width windows

When a window width is reduced, the 'Send' button disappears.

Essentially it gets wrapped to the next line but the div height pushes it off the screen - you can see it at the very bottom of the screen in the screenshot below.
hapi-chat-css-width-issue-on-send-button

script injection is possible

this could help

function sanitise(txt) {
  if(txt.indexOf("<") > -1 || txt.indexOf(">") > -1) {
    txt = txt.replace(/</g, "&lt").replace(/>/g, "&gt");
  }
  return txt;
}

Body element must be height of window at all times

When the window is resized, the body must continue to be the same height as the window.
If it is not, the content (messages) will be allowed to increase in height when the window is made thinner, which will cause the messages to hide behind the messages input form as per #8.

Last comment, "And this is the last message" can no longer be seen when window is made smaller:
content-hidden-on-window-resize

How about with node.cluster?

Are you guys wondering to implement it on this project?
Does anyone implemented a HapiJS Chat with Socket.io and Redis?

Add .env to .gitignore file

unfortunately pushed an env file, but realised that the gitignore did not contain any means to ignore it.

can we please add it to the master. Thanks.

Long name causes horizontal scroll

  1. I was thinking, I could add a style to cause the word to break, preventing horizontal scroll.
  2. It might also be worthwhile adding a max-length to the name - but that might be a bit more involved.

Shall I submit a pull request with 1?

Latest message must be displayed on load

The window should be scrolled down to the very bottom of the messages when it loads so that the latest messages are always visible and people can scroll up if they want to see past conversations.

Currently the very top of the message history is displayed when the app loads - i.e. The first message entered into the chat, in this case "First message ever written to my local chat"
hapi-socketio-redis-chat-example-scrolled-to-top-on-load

You have to manually scroll all the way down to get to the last message when this should happen automatically on load:
hapi-socketio-redis-chat-example-scrolled-to-bottom-manually

Heroku / Redis Cloud

Hello,

I believe you have used Redis Cloud add-on in Heroku.
I can get 30mb storage free on Heroku but need to put in my bank card details, have you heard of any issues with this before?

Is Redis Cloud add-on in Heroku still the best approach for hosting an app with Redis? My project is very similar to your chat app.

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.