Chat Application for sending and recieving messages in groups.
- Register new user,
- login, authentication with json web token
- create new rooms, join existing rooms,
- send and recieve messages,
- notification on users joining and leaving rooms,
- notification on msg-typying.
- npm i jsonwebtoken dotenv bcrypt socket.io express pg cors cookie-parser (or clone the repositoty and npm install)
- npx create-react-app client and replace the default scaffold
- npm i socket.io-client react-router-dom
node server/models/schema.js
- Front-end: React, Socket io Client HTML,CSS
- Backend: Express, Socket io, postgress
- confirm insert in server socket before broadcastMsg // done
- broad cast on userJoin a room. // done
- Add a wrapper function to queries. // done
- handle network errors // done
- fire event to check username valid after entering userName
- Add error.code === '23505' => Status(409) in signUp in queries
- get msgs after joindate // done
- change psudo class in RoomsContainer.css // done
- show msg time.
- socket emit on typing // done
- private messages
- list active users
- save room msgs to db
- add backend validation as well similar to what is done on frontend.
- replace testing with userName // done
- execute last two queries useing wrapper
- display users and add private messaging
- persist room on reload
- deploy on render
- Review:
- get new room details from post response, dont make fetch room list
- switch to room on join and create
- change to MVC // done
- relevent parts in the header page // done
- handle different error cases
- response should always be an object or arr and consistent structure // done
- create sessions table
- return strings from db response inplace of statuscodes
- allow msg screen only after socket connection established