Skip to content

แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข - A real-time messaging application designed for seamless and instant communication.

License

Notifications You must be signed in to change notification settings

Muntajir11/RealTimeChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

69 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข

Welcome to แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข - A real-time messaging application designed for seamless and instant communication. Built with the MERN stack (MongoDB, Express, React, Node.js) and Socket.IO for real-time chat functionality, แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข ensures your conversations are swift and secure.


Live Demo: แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข

๐Ÿš€ Features

  • ๐Ÿ’ฌ Real-time Messaging: Chat instantly with your contacts, with real-time updates.
  • ๐Ÿ”’ User Authentication: Secure sign-up and login using JWT-based authentication.
  • ๐Ÿ“ Add Contacts: Effortlessly add contacts to your chat list.
  • ๐Ÿ“ฑ Responsive Design: Optimized for both desktop and mobile devices.
  • ๐Ÿ” Search Functionality: Quickly find and start conversations with your contacts.
  • ๐Ÿ“‚ Sidebar Navigation: Manage your conversations and contacts from the intuitive sidebar.
  • ๐Ÿ”” Notifications: Receive notifications for new messages.

๐Ÿ› ๏ธ Installation

Get a local copy of CONNECT up and running with these simple steps:

  1. Clone the repository:

    git clone https://github.com/Muntajir11/RealTimeChat.git
    cd CONNECT
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the root directory and add the following:

    PORT=5000
    MONGO_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret
  4. Start the development server:

    npm run server   # In the Root folder
    npm run dev      # In the Frontend folder
  5. Access the application: Open your browser and navigate to:

    http://localhost:3000
    

You should now see the แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข application running locally.


๐Ÿ“ Project Structure

CONNECT
โ”œโ”€โ”€ ๐Ÿ—‚๏ธ Backend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ controllers       # Handles the logic for various routes
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ db                # Database configuration and models
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ middleware        # Custom middleware functions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ models            # Mongoose schemas and models
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ routes            # API route definitions
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ socket            # Socket.IO configuration and events
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ utils             # Utility functions
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ server.js         # Entry point for the Node.js server
โ”‚
โ”œโ”€โ”€ ๐Ÿ—‚๏ธ Frontend
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ public            # Static assets (images, icons, etc.)
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ src               # Main source directory for the React app
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ assets        # Images, fonts, and other assets
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿงฉ components    # Reusable React components
โ”‚   โ”‚   โ”œโ”€โ”€ ๐ŸŒ context       # React Context API for state management
โ”‚   โ”‚   โ”œโ”€โ”€ โš™๏ธ hooks         # Custom hooks for React
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ pages         # Page components for routing
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ› ๏ธ utils        # Utility functions for frontend
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ฆ zustand       # Zustand store for global state management
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ App.css           # Global styles for the React app
โ”‚   โ”œโ”€โ”€ โš›๏ธ App.jsx          # Main application component
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ index.css         # Global CSS file
โ”‚   โ””โ”€โ”€ โš›๏ธ main.jsx         # Entry point for the React application
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ .eslintrc.cjs         # ESLint configuration
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore            # Git ignore file
โ”œโ”€โ”€ ๐Ÿ“„ index.html            # Main HTML file for the React app
โ”œโ”€โ”€ ๐Ÿ“„ package.json          # Dependencies and scripts for the frontend
โ”œโ”€โ”€ ๐Ÿ“„ package-lock.json     # Locked versions of dependencies
โ””โ”€โ”€ ๐Ÿ“„ README.md             # Project documentation

๐Ÿ“ Explanation

  • Backend: ๐Ÿ—‚๏ธ Contains all server-side code including controllers, database configurations, middleware, models, routes, socket configuration, and utilities.
  • Frontend: ๐Ÿ—‚๏ธ Contains the front-end code organized into assets, components, context, hooks, pages, utilities, and Zustand store.
  • Root Files:
    • .eslintrc.cjs: ๐Ÿ“ ESLint configuration for consistent code quality.
    • .gitignore: ๐Ÿ“„ Specifies files and directories to be ignored by Git.
    • index.html: ๐Ÿ“„ The HTML template for the React app.
    • package.json & package-lock.json: ๐Ÿ“ฆ Manage project dependencies and scripts.

๐ŸŽฎ Usage

Once everything is set up:

  • Sign up: Create a new account.
  • Login: Use your credentials to log in.
  • Add Contacts: Search for users and add them to your contact list.
  • Start Chatting: Select a contact and begin a conversation.

๐Ÿ–ผ๏ธ Screenshots

Login Page
Login Page

SignUp Page
SignUp Page

Home Page
Home Page

Chat Window
Chat Window


๐Ÿ› ๏ธ Technologies Used

  • Frontend: React, Zustand, Tailwind CSS
  • Backend: Node.js, Express.js, MongoDB, Mongoose
  • Real-time Communication: Socket.IO
  • Authentication: JWT, bcrypt
  • Deployment: Render

๐Ÿค Contributing

Contributions are more than welcome! If you have ideas, improvements, or new features you'd like to add:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

Please ensure that your code is well-documented and tested.


๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ“ฌ Contact

Have questions, suggestions, or feedback? Feel free to reach out to the co-creators:



Thank you for using แ‘•Oแ‘Žแ‘ŽEแ‘•T ๐Ÿชข! ๐ŸŒŸ