Skip to content

This project is a chat application inspired by Mattermost. It has a backend built in Golang, a frontend created with React, and MongoDB is used for data storage. Both the backend and frontend are dockerized, which makes the application simple to deploy and manage.

Notifications You must be signed in to change notification settings

Sahil-4555/GOLANG_CHAT_DEMO

Repository files navigation

💬 Chat Application

This is a chat application where the backend is written in Golang, the frontend is created in React, and MongoDB is used for data storage. Both the backend and frontend are dockerized into a Docker container for easy deployment.

✨ Features

  • Real-time Chat: Utilizing Websockets for instant messaging.
  • User Authentication: Secured via JWT for user access.
  • Chat Room Management: Users can create and manage chat rooms.

🛠️ Technologies Used

  • Backend: Golang
  • Frontend: React
  • Database: MongoDB
  • Docker

🚀 Getting Started

📋 Prerequisites

For Docker

  • Install Docker on your machine.
  • In the project root, create a .env file based on .example.env and fill in the environment variables.
  • Inside the client folder, create a .env file based on .example.env.

For Local

  • Golang installed on your machine.
  • Node.js and npm installed on your machine.
  • MongoDB installed and running on your machine.
  • Create a .env file in the root directories of both the backend and frontend based on their respective .env.example files and fill in the environment variables.

🏃‍♂️ Running the Application

  1. Clone this repository:

    git clone https://github.com/Sahil-4555/GOLANG_CHAT_DEMO.git
  2. Navigate to the project directory:

    cd GOLANG_CHAT_DEMO

Using Docker

  1. Create a .env file in the root directories of both the backend and frontend based on their respective .env.example files and fill in the environment variables.

  2. Start the application using Docker Compose:

    docker compose up --build

Running Locally

  • Backend
  1. Navigate to the backend directory:

    cd backend
  2. Create a .env file in the root directory of the backend based on .env.example and fill in the environment variables.

  3. Install dependencies and run the backend:

    go mod tidy
    go run main.go
  • Frontend
  1. Navigate to the frontend directory:

    cd frontend
  2. Create a .env file in the root directory of the frontend based on .env.example and fill in the environment variables.

  3. Install dependencies and run the frontend:

    npm install
    npm start

About

This project is a chat application inspired by Mattermost. It has a backend built in Golang, a frontend created with React, and MongoDB is used for data storage. Both the backend and frontend are dockerized, which makes the application simple to deploy and manage.

Topics

Resources

Stars

Watchers

Forks