Giter Site home page Giter Site logo

buzzchat's Introduction

BuzzChat

image

📌 Brief: A Real-Time Messenger app using Nodejs, React, Postgresql and Redis.


Table of Contents


Description

BuzzChat is a Messenger Clone app that allows users to add friends and chat with them in real-time, The app uses the following technologies:


Backend Technologies:

  • Node.js:. The foundation of BuzzChat's backend, providing a robust and efficient runtime environment.
  • Express: Utilized for routing and creating APIs, ensuring smooth communication between the client and server.
  • Express Sessions: Used for handling authentication and user sessions securely.
  • Socket.io: Empowers the app with event-driven real-time communication, making chats instantaneous.
  • Yup: Used for server-side form data validation,to guarantee data integrity and security.
  • PostgreSQL Database: The reliable database solution responsible for storing and managing user's data.
  • Redis: Used for caching and performance optimization.

Frontend Technologies:

  • React: The basis of the app's frontend, providing a interactive and responsive interface.
  • Formik: Enhances the user experience by simplifying form handling and validation.
  • Yup (Client-Side): Ensures data entered by users on the client side is valid, maintaining data quality.
  • Chakra UI: Simplifies the process of building and styling interface components, with visually appealing ready components.
  • Socket.io-client: handles communication with the backend through Socket.io, enabling real-time messaging capabilities.

Installation

  1. Clone the repository:
    git clone https://github.com/SaifAshrafHelmy/BuzzChat
    cd buzzchat

  2. Install the required dependencies:
    npm install

  3. Create the .env files:

    for backend:
    DATABASE_HOST=localhost
    DATABASE_PORT=5432
    DATABASE_USER=postgres
    DATABASE_PASSWORD=Enter your db password
    COOKIE_SECRET=Enter a cookie secret
    CLIENT_URL=http://localhost:3000
    NODE_ENV=production

    for frontend: REACT_APP_SERVER_URL=http://localhost:3030

  4. create the postgresql with the command in database.sql

  5. run the redis server using sudo service redis-server start

  6. run the Nodejs server using cd server && npm run dev

  7. run the React interface using cd client && npm start

Usage

  1. Register or log in to your account.
  2. Add a friend through their username.
  3. Tell your friend to also add you as friend using your username.
  4. Click on their username and chat with them.

Features

  • User authentication and registration.
  • Authorization before sending or accessing the messages.
  • Real-time communication with slim-to-zero delay.
  • Showing the connected status in real-time.
  • Responsive design for various devices.

ProjectTree

📦server
┣ 📂controllers
┃ ┣ 📂socketControllers
┃ ┃ ┣ 📜addFriend.js
┃ ┃ ┣ 📜authorizeUser.js
┃ ┃ ┣ 📜dm.js
┃ ┃ ┣ 📜initializeUser.js
┃ ┃ ┣ 📜onDisconnect.js
┃ ┃ ┗ 📜parsedFriendsList.js
┃ ┣ 📜authController.js
┃ ┣ 📜rateLimiter.js
┃ ┣ 📜serverController.js
┃ ┣ 📜socketController.js
┃ ┗ 📜validateForm.js
┣ 📂routers
┃ ┗ 📜authRouter.js
┣ 📜.env
┣ 📜database.sql
┣ 📜db.js
┣ 📜index.js
┣ 📜package-lock.json
┣ 📜package.json
┗ 📜redis.js

📦client
┣ 📂public
┃ ┗ 📜index.html
┣ 📂src
┃ ┣ 📂components
┃ ┃ ┣ 📂Auth
┃ ┃ ┃ ┣ 📜Login.jsx
┃ ┃ ┃ ┗ 📜SignUp.jsx
┃ ┃ ┣ 📂Home
┃ ┃ ┃ ┣ 📜AddFriendModal.jsx
┃ ┃ ┃ ┣ 📜Chat.jsx
┃ ┃ ┃ ┣ 📜ChatBox.jsx
┃ ┃ ┃ ┣ 📜Homepage.jsx
┃ ┃ ┃ ┣ 📜Sidebar.jsx
┃ ┃ ┃ ┗ 📜useSocketSetup.jsx
┃ ┃ ┣ 📜AccountContext.jsx
┃ ┃ ┣ 📜PrivateRoutes.jsx
┃ ┃ ┣ 📜TextField.jsx
┃ ┃ ┣ 📜ToggleColorMode.jsx
┃ ┃ ┗ 📜Views.jsx
┃ ┣ 📜App.jsx
┃ ┣ 📜index.jsx
┃ ┣ 📜socket.js
┃ ┗ 📜theme.jsx
┣ 📜.env
┣ 📜package-lock.json
┣ 📜package.json
┗ 📜README.md

Screenshots

image image image image image image

buzzchat's People

Contributors

saifashrafhelmy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.