Skip to content

⚡ Realtime Chat with socket.IO ✔️ Multi-user ✔️ OAuth ✔️ MongoDB ✔️ Server-side rendering with EJS ✔️ Login and chat with multiple accounts or create your own chatroom 💬

Notifications You must be signed in to change notification settings

jempico/realtime_chat_socketio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

A realtime chat

A chat where multiple users can join and create their own chats!

Table of Contents
  1. About The Project
  2. Built With
  3. Installation
  4. Things I've Learned
  5. Contact

About The Project

As part of my NodeJS learning journey , I've built a realtime chat with ExpressJS, Socket.IO and MongoDB.

Here are the main features of the app:

  • Google Token Authentication: users can login with their Google Account.
  • Multi-user: Different users can login and chat with each other. To try it out in a single machine, just login with different Google Accounts on different browsers.
  • Chatroom creation: users can either select a chatroom from a list of create their own chatrooms from scratch.

Screenshot 2021-05-16 at 02 50 13

Screenshot 2021-05-16 at 02 53 51

(back to top)

Built With

This is the tech stack I've worked with:

(back to top)

Installation

To get a local copy up and running follow these simple steps.

  1. Clone the repo
    git clone https://github.com/jempico/realtime_chat_socketio
  2. Install NPM packages
    npm install
  3. Add environment variables: edit or create and .env file in the root directory with the following data:
     PORT= 3000
     DB_USER = tester
     DB_PASSWORD = AWnHq3IDZaeDL8DP
    

(back to top)

Things I've learned

  • Authenticate users with Google Token (google-auth-library).
  • Using Socket.io to create web sockets.
  • Using MongoDB and Mongoose for schema validation.
  • Set up a MongoDB Atlas cluster.
  • Server Side Rendering with EJS template engine to inject dynamic content into the html.

(back to top)

Contact

Jemimah Pico - Portfolio - Linkedin - [email protected]

Project Link: https://github.com/jempico/realtime_chat_socketio

About

⚡ Realtime Chat with socket.IO ✔️ Multi-user ✔️ OAuth ✔️ MongoDB ✔️ Server-side rendering with EJS ✔️ Login and chat with multiple accounts or create your own chatroom 💬

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published