Giter Site home page Giter Site logo

chat-app's Introduction

React Chat App

A simple React app for managing chats with a user interface similar to the provided mock.

Table of Contents

  • Overview
  • Features
  • Setup
  • Usage
  • Testing
    • Unit Tests
    • Integration Tests
  • Dependencies
  • Contributing

Features

  • Display a list of chats fetched from the API.
  • Clicking on a chat opens the chat with the list of messages.
  • Filter chats by Chat Title / Order ID.
  • Messages are displayed in a bottom-to-top order.
  • Differentiate between 'text' and 'optionedMessage' message types.
  • Align messages based on the sender ('BOT' or 'USER').
  • Input box for sending messages.
  • Option to request a call.
  • Date labels for message separation.
  • Sort messages based on the timestamp.

Setup

  1. Clone the repository:

    git clone https://github.com/shreya-mishra/chat-app.git
    
    cd chat-app 
    
  2. Install dependencies:

    npm install
    

Usage

  1. Run the development server:

    npm start
    
    
  2. Open your browser and navigate to http://localhost:3000.

  3. Explore the chat app, filter chats, and interact with messages.

Testing

Unit Tests

This project uses Jest for unit testing. To run the unit tests, use the following command:

npm test

Integration Tests

This project uses Jest and React Testing Library for integration tests with Mock Service Worker (msw). To run the integration tests, use the following command:

npm test

Dependencies

  • React
  • Axios

Contributing

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

chat-app's People

Contributors

shreya-mishra 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.