Code Monkey home page Code Monkey logo

nextalk's Introduction

NexTalk

A real-time chat application built with React, Redux, Node.js, Express, and Socket.IO.

Features

  • Real-time messaging
  • User authentication
  • File uploads (images and documents)
  • Notifications for new messages
  • Online/offline user status
  • Persistent notifications using localStorage

Technologies Used

  • Frontend: React, Redux, Tailwind CSS
  • Backend: Node.js, Express, MongoDB
  • Real-time Communication: Socket.IO

Getting Started

Prerequisites

  • Node.js and npm
  • MongoDB

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/NexTalk.git
    cd NexTalk
  2. Install dependencies for the server:

    cd api
    npm install
  3. Install dependencies for the client:

    cd ../client
    npm install

Environment Variables

Create a .env file in the api directory and add the following:

PORT=***
MONGO_URI=your_mongo_url
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:3000

Running the Application

  1. Start the backend server:

    cd server
    npm start
  2. Start the frontend client:

    cd ../client
    npm start
  3. Open your browser and navigate to http://localhost:3000

Project Structure

Api

  • server.js: Entry point for the backend server.
  • config/connectDB.js: MongoDB connection configuration.
  • controllers: Contains the controller functions for user and message management.
  • models: Mongoose schemas and models.
  • routes: Express routes for user and message APIs.
  • middleware: Custom middleware functions.
  • utils: Utility functions.

Client

  • src: Main source directory.
    • components: Reusable React components.
    • context: Context API for global state management (e.g., notifications).
    • features: Redux slices for managing state (e.g., auth, messages).
    • hooks: Custom hook functions.
    • pages: Main pages for the application (e.g., Chat, Login, Register).
    • App.js: Main application component.
    • index.js: Entry point for the React application.
    • utils: Utility functions.

Usage

User Authentication

  • Register a new user.
  • Login with existing credentials.

Chat Functionality

  • Select a user from the contact list to start chatting.
  • Send text messages or upload files (images/documents).
  • Receive real-time notifications for new messages.
  • View online/offline status of users.

Notifications

  • New message notifications are stored in localStorage for persistence across sessions.

Contributing

Contributions are welcome! Please fork the repository and create a pull request.

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

License

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

Acknowledgements

nextalk's People

Contributors

lewisthagichu avatar

Watchers

 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.