A Simple Group Chat application made using MERN (MongoDB Express React Node) stack along with graphQL and JWT based login support.
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This is a simple project to learn graphQL by building a group chat application where we build a node.js server to host the graphql API's and a React based client to connect to it
Major Features of this application:
- Registration / Login functionality with JWT based authentication
- MongoDB Schema using Mongoose library
- GraphQL schema generation using graphql-compose-mongoose
- React based client with Material-ui components.
- GraphQL subscriptions for real-time messaging
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- npm
npm install npm@latest -g
- Creata a free cluster on MongoDB Atlas and get the connection URI
- Clone the repo
git clone https://github.com/shivamkataria2000/group-chat
- Install NPM packages
npm install
- Create a
.env
file with the followingNODE_ENV=development PORT=8000 MONGODB_URI=***GET_FROM_MONGO_DB_ATLAS**** HEALTH_ENDPOINT=up JWT_SECRET=***ChangeThis***
- Update config.js
export const HTTP_API_URL = "http://localhost:8080/graphql"; export const WS_API_URL = "ws://localhost:8080/graphql";
- Start the server
npm run dev Open http://localhost:8000/ for graphQL playground
- Start the client
npm run client Open http://localhost:3000/
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Shivam Kataria - @smartShivkat - [email protected]
Project Link: https://github.com/shivamkataria2000/group-chat
-
UI is deployed with vercel
-
Updated from node 14 to 16 (As of 9th Oct 2023)
-
Sevice layer migrated from Heroku to Render as of 9th Oct 2023