Table of Contents
Here's a simple multiple user chat application for real-time messaging written in GoLang and React framework
- Real‐time messaging for multiple users (Used WebSocket protocol for connection, goroutines and channel for asynchronous operation)
- Authorization and authentication (By storing JSON Web Tokens in Cookies)
- Users' Database (Implemented using GORM ORM library and PostgreSQL)
-
Go version 1.16 or greater installed. To set this up, visit the https://go.dev/doc/install to install it for your operation system
-
In case you are setting up the server, it will be required to use PostgreSQL database server, visit https://www.postgresql.org/download/ and follow the installation instructions
-
Clone the repo
git clone https://github.com/ssergomol/Realtime-Chat
-
By default server tries to connect to database
realtimechat
using your system username. To change connection parametres, go through thebackend/pkg/database/connection.go
file -
Install dependencies
go mod download
- Start server
# cd backend/cmd
go run main.go
- Install node package manager
npm install npm@latest -g
- Start React server
# cd frontend
npm start
If you have any intentions that would make this project better, fork the repo and create pull request
- 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
Sergey Molchanov - @ssergomol - [email protected]
Project Link: https://github.com/ssergomol/Realtime-Chat