Skip to content
/ gochat Public

realtime chat application with go and websocket

Notifications You must be signed in to change notification settings

mkyai/gochat

Repository files navigation

GO-CHAT

Realtime chat application using websockets and golang.

Tech Stack

  • Golang
  • Websockets
  • MongoDB
  • Crypto
  • JWT

Features

  • Realtime chat
  • User authentication
  • User registration
  • User search
  • Channel creation
  • Channel listing

Installation

  1. Clone the repository
  2. Run go mod tidy
  3. Run application at port 3020
go run .

Usage

  1. Register a new user
curl -X POST http://localhost:3020/signup -d '{"username": "test" ,"name": "test" ,"password": "test"}'
  1. Login with the registered user
curl -X POST http://localhost:3020/login -d '{"username": "test" ,"password": "test"}'
  1. List all users
curl -X GET http://localhost:3020/users
  1. Create a new channel
curl -X POST http://localhost:3020/channels -d '{"user": "__userID__"}' -H "Authorization: Bearer __JWT__"
  1. List all channels
curl -X GET http://localhost:3020/channels -H "Authorization: Bearer __JWT__"
  1. List all messages in a channel
curl -X GET http://localhost:3020/messages/{channelID} -H "Authorization: Bearer __JWT__"
  1. Start the chat [WEBSOCKET]
connect at ws://localhost:3020/{channelID}?token=__JWT__

TODO

  • Verify Dockerfile
  • Kafka integration
  • Redis integration
  • Frontend Templates
  • Group chat
  • Message encryption
  • CI/CD

About

realtime chat application with go and websocket

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published