Skip to content

DulanjaliSenarathna/mern-chat-app

Repository files navigation

Chat App (MERN Stack)

Table of Contents

Introduction

This is a full-stack chat application built using the MERN stack (MongoDB, Express, React, Node.js). The application allows users to create accounts, log in, and engage in real-time messaging with other users.

Features

  • User authentication and authorization
  • Real-time messaging using Socket.io
  • Private and group chats
  • Message notifications

Technologies Used

  • Frontend: React.js, React Context API, React Router
  • Backend: Node.js, Express.js
  • Real-time Communication: Socket.io
  • Database: MongoDB
  • Authentication: JWT (JSON Web Tokens)
  • Styling: CSS

Installation

Prerequisites

  • Node.js
  • MongoDB

Clone the Repository

git clone https://github.com/DulanjaliSenarathna/mern-chat-app.git
cd mern-chat-app

Backend Setup

Navigate to the backend directory:

cd backend

Install dependencies:

npm install

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

PORT=5000
MONGO_URI='mongodb+srv://dulanjalisenarathna93:Y4PZjgjl0ZUM8Lfw@cluster0.y4flykh.mongodb.net/?retryWrites=true&w=majority'
JWT_SECRET=dulanjali
NODE_ENV=production

Start the backend server:

npm start run

Frontend Setup

Navigate to the frontend directory:

cd frontend

Install dependencies:

npm install

Start the frontend server:

npm start run

Usage

Access the customer-facing app at http://localhost:3000. Register as a new user or log in with existing credentials. Create or join a chat group. Pay using dummy visa card Start chatting with other users in real-time.

Screenshots

mc1 mc2 mc3 mc4 mc5 mc6 mc7 mc8 mc9

API Documentation

The API endpoints for the backend can be documented using tools like Postman or Swagger. Include endpoints for user authentication, menu items, orders, and more.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes. Make sure to follow the code style and include relevant tests.

Contact

For any questions or suggestions, feel free to contact me.

Happy coding!

Feel free to customize this template according to your specific project details and requirements.