Giter VIP home page Giter VIP logo

graphql-chat's Introduction

React-graphql-chat

Simple chat application using React, Node and Graphql.

All Libraries that are used:

  1. Server:
  • Get real-time updates from your GraphQL server through Subscription type.`
  • Mongoose integrated to model my application data.
  • graphql-yoga library too create a graphql server.
  • Data-loader integrated for avoiding unnecessary multiple requests to MongoDb.
  • bcrypt integrated to hash the password before write it to the db.
  • jsonwebtoken integrated for token operations.
  • cuursor-based pagination added (https://graphql.org/learn/pagination/#pagination-and-edges)
  1. Client:
  • Webpack set up
  • Babel set up
  • React-router-dom for routing operations
  • @apollo/client for state management that manages both local and remote data with GraphQL.
  • material-ui
  • draftjs and react-draft-wysiwyg for rich text editor
  • react-toastify to show error and info messages.
  • flow
  • eslint and prettier
  • infinite scroll added to load the previous messages

Demo:

alt tag

Setting up MongoDB

Note: You need MongoDB install and set up. Installation instructions If you don't want to install it, there is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started.[https://www.mongodb.com/cloud/atlas?tck=docs_server]

Once you've installed MongoDB or registered MongoDB Atlas, you need to get host and port for the db that you created. Change the host and port in .env file with yours.

How to run this project:

  1. Make sure to set up MongoDB
  2. Clone the repository
  • cd graphql-chat
  1. install npm dependencies:
npm install;
or
yarn install;
  1. start the server side:
npm server
or
yarn server
  1. start the client side:
npm start
or
yarn start
  1. navigates your browser to localhost:8000 for client side
  2. navigates your browser to localhost:4000 for server side

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.