GithubHelp home page GithubHelp logo

omarelgabry / chat.io Goto Github PK

View Code? Open in Web Editor NEW
1.5K 65.0 495.0 630 KB

A Real Time Chat Application built using Node.js, Express, Mongoose, Socket.io, Passport, & Redis.

Home Page: https://chatio.herokuapp.com/

License: MIT License

JavaScript 62.25% HTML 22.39% CSS 15.36%
real-time chat nodejs express mongoose socket passport redis

chat.io's People

Contributors

fossabot avatar omarelgabry avatar shaialon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat.io's Issues

save messages in database

why does it not save the messages when i come back to the same room?

but looks amazing, thank you:)

Offline support?

Hi,

I've seen this today on reddit and looks like a great project, does it have or will have sometime offline support for messages?

Thanks,
Keep up the good work!

mongo

(node:11048) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection()
Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials.

not secure, current implementation passes username from frontend

anyone user can send a message with any alias

$(".chat-message button").on("click", function(e) {
        var textareaEle = $("textarea[name='message']");
        var messageContent = textareaEle.val().trim();
        if (messageContent !== "") {
          var message = {
            content: messageContent,
            username: username,
            date: Date.now()
          };

          socket.emit("newMessage", roomId, message);
          textareaEle.val("");
          app.helpers.addMessage(message);
        }
      });

any user can thus pass any username

Private messaging

Hi,

This is a great little App indeed. I would like to know whether there is an option for private messaging in this?

Thanks!

Integrate this into a web app

Hey, this is a neat chat app. I would like to integrate this into a personal web page as a mini window that can be minimized and maximized. Does anyone know how to do this?

couldn't run the app

After downloading the zip i did the steps but i couldn't go beyond the registrations

Production ready

Is the application is production ready for android ? please guide ? can we integrate the firebase ? how ? how to send the queries to Linux server ?

Uncaught TypeError: Cannot create property 'username' on string '59101c3aa72c3e279bb4aeb1'

Hello, excuse for my bad one in English. I use a translator. Today I have ascertained something strange. I have thought, it is due to the fact that I have altered the chat. After some tests I have the original try tested. There this mistake also appears. I have tested it with a lot of devices and browser.

If a user is already in a chat space and a new user announces himself who enters then this chat space, this sees the users does not list.

the Google-Chrome-Console shows the following mistake:

Uncaught TypeError: Cannot create property 'username' on string '59101c3aa72c3e279bb4aeb1'

Is this problem known? I ask for help. I find of the chat first-class. So I would adapt this with pleasure on my needs and extend!

Many greetings

Björn End

use with android

Hi,how connect with android, i use passport jwt for authentication from android device but socket.request.session.passport is null

mongo error

npm start

[email protected] start /root/chat.io
node server.js

(node:14927) DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
{
"date": "Tue Jul 03 2018 14:51:34 GMT+0000 (UTC)",
"process": {
"pid": 14927,
"uid": 0,
"gid": 0,
"cwd": "/root/chat.io",
"execPath": "/root/.nvm/versions/node/v8.11.3/bin/node",
"version": "v8.11.3",
"argv": [
"/root/.nvm/versions/node/v8.11.3/bin/node",
"/root/chat.io/server.js"
],
"memoryUsage": {
"rss": 66256896,
"heapTotal": 56217600,
"heapUsed": 26144704,
"external": 18695889
}
},
"os": {
"loadavg": [
0.0751953125,
0.05517578125,
0.06396484375
],
"uptime": 1518
},
"trace": [
{
"column": 35,
"file": "/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js",
"function": null,
"line": 336,
"method": null,
"native": false
},
{
"column": 13,
"file": "events.js",
"function": "emitOne",
"line": 116,
"method": null,
"native": false
},
{
"column": 7,
"file": "events.js",
"function": "Pool.emit",
"line": 211,
"method": "emit",
"native": false
},
{
"column": 12,
"file": "/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js",
"function": null,
"line": 280,
"method": null,
"native": false
},
{
"column": 30,
"file": "events.js",
"function": "Object.onceWrapper",
"line": 317,
"method": "onceWrapper",
"native": false
},
{
"column": 13,
"file": "events.js",
"function": "emitTwo",
"line": 126,
"method": null,
"native": false
},
{
"column": 7,
"file": "events.js",
"function": "Connection.emit",
"line": 214,
"method": "emit",
"native": false
},
{
"column": 49,
"file": "/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js",
"function": null,
"line": 187,
"method": null,
"native": false
},
{
"column": 30,
"file": "events.js",
"function": "Object.onceWrapper",
"line": 315,
"method": "onceWrapper",
"native": false
},
{
"column": 13,
"file": "events.js",
"function": "emitOne",
"line": 116,
"method": null,
"native": false
},
{
"column": 7,
"file": "events.js",
"function": "Socket.emit",
"line": 211,
"method": "emit",
"native": false
},
{
"column": 8,
"file": "internal/streams/destroy.js",
"function": "emitErrorNT",
"line": 64,
"method": null,
"native": false
},
{
"column": 11,
"file": "internal/process/next_tick.js",
"function": "_combinedTickCallback",
"line": 138,
"method": null,
"native": false
},
{
"column": 9,
"file": "internal/process/next_tick.js",
"function": "process._tickCallback",
"line": 180,
"method": "_tickCallback",
"native": false
}
],
"stack": [
"MongoError: failed to connect to server [:27017] on first connect [MongoError: getaddrinfo ENOTFOUND :27017]",
" at Pool. (/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js:336:35)",
" at emitOne (events.js:116:13)",
" at Pool.emit (events.js:211:7)",
" at Connection. (/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:280:12)",
" at Object.onceWrapper (events.js:317:30)",
" at emitTwo (events.js:126:13)",
" at Connection.emit (events.js:214:7)",
" at Socket. (/root/chat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:187:49)",
" at Object.onceWrapper (events.js:315:30)",
" at emitOne (events.js:116:13)",
" at Socket.emit (events.js:211:7)",
" at emitErrorNT (internal/streams/destroy.js:64:8)",
" at _combinedTickCallback (internal/process/next_tick.js:138:11)",
" at process._tickCallback (internal/process/next_tick.js:180:9)"
],
"level": "error",
"message": "uncaughtException: failed to connect to server [:27017] on first connect [MongoError: getaddrinfo ENOTFOUND :27017]"
}

room into error

"stack": [
"TypeError: Cannot read property 'id' of undefined",
" at /chat/app/socket/index.js:57:27",
" at /chat/node_modules/mongoose/lib/model.js:4056:16",
" at /chat/node_modules/mongoose/lib/services/model/applyHooks.js:175:17",
" at process._tickCallback (internal/process/next_tick.js:150:11)"
],
"level": "error",
"message": "uncaughtException: Cannot read property 'id' of undefined"

Looks great!

Hi Omar,

This looks familiar 👍 Great job with it!

Remove authentication

Hi, I want to use this app but i don't want any authentication system.I just want to join room and start chatting.How can i achieve this? May you please list the steps which have to be performed to remove this authentication system.

I have uninstalled passport , passport-local , passport-twitter, passport-facebook modules from this app. What else should i do?

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.