A real-time chat application built with Golang (backend), Next.js (frontend), and PostgreSQL (database). It uses WebSockets for real-time communication and Goroutines & Channels for concurrency.
- Real-time messaging with WebSockets.
- Efficient message handling using a worker pool (Goroutines & Channels).
- User authentication.
- Persistent chat history with PostgreSQL.
- Responsive UI built with Next.js and TailwindCSS.
- Backend: Golang, WebSockets, PostgreSQL
- Frontend: Next.js, TailwindCSS
- Go (v1.16+)
- Node.js (v14+)
- Clone the repo:
git clone https://github.com/ifrah-ashraf/livechat.git cd livechat/server
- Set the env variable and run backend:
go mod tidy go run main.go
- Run the frontend
cd livechat/client npm i && npm run dev
Make sure to set the correct env variable to run it properly with the postgres URL.