** I'm not going to maintain this repo anymore, but feel free to use the code **
Demo: https://zh47.herokuapp.com
Stack:
- React
- Socket.io
- Express
- Node.js
- MongoDB
I didn't use any state container (like Redux) yet, but it might be useful in the future to avoid passing data between components.
- Users can choose a nickname
- Users can join chatrooms of their own choosing
- Users can send messages to other users
- Mobile-friendly UI (Material-UI)
- Stores messages on the server (only messages from channels are saved at the moment, but it's quite easy to extend it to support private messages also)
- Supports multiple logged clients at the same time from one user (e.g. desktop & mobile clients)
- Authentication is made with Passport.js which makes other sign up methods easy to implement (e.g. Facebook OAuth)
- Highlights unread conversations
- Keeps list of online users in real time
The server includes webpack-dev-middleware & webpack-hot-middleware to show code changes on browser without refreshing
npm install
npm start
Most of the real time and routes api are covered in the tests.
npm test
Coverage report can be generated by running
npm run coverage
npm run lint
to fix most of the warnings automatically:
npm run lint:fix