https://github.com/datpham0412/go-realtime-chat
The Real-time Chat Application is a modern web-based chat platform built using Go, Vue.js, and GraphQL. It enables users to engage in real-time conversations through a clean, intuitive interface. The application leverages GraphQL subscriptions for instant message delivery, Redis for message persistence, and GitHub OAuth for secure authentication.
https://github.com/datpham0412/go-realtime-chat
docker flyio golang graphql redis
Last synced: 6 months ago
JSON representation
The Real-time Chat Application is a modern web-based chat platform built using Go, Vue.js, and GraphQL. It enables users to engage in real-time conversations through a clean, intuitive interface. The application leverages GraphQL subscriptions for instant message delivery, Redis for message persistence, and GitHub OAuth for secure authentication.
- Host: GitHub
- URL: https://github.com/datpham0412/go-realtime-chat
- Owner: datpham0412
- License: mit
- Created: 2024-11-09T01:40:17.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-20T13:11:46.000Z (11 months ago)
- Last Synced: 2025-03-25T00:17:44.011Z (7 months ago)
- Topics: docker, flyio, golang, graphql, redis
- Language: Go
- Homepage: https://go-realtime-chat.fly.dev/
- Size: 938 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 💬 Real-time Chat with GraphQL Subscriptions in Go
[](LICENSE)
[](https://goreportcard.com/report/github.com/datpham0412/go-realtime-chat)
[](https://github.com/datpham0412/go-realtime-chat/issues)
[](https://github.com/datpham0412/go-realtime-chat/stargazers)## 📋 Project Description
A modern real-time chat application built with Go and Vue.js, featuring GraphQL subscriptions for live updates. The application demonstrates the implementation of real-time features using GraphQL subscriptions, Redis for message persistence, and GitHub OAuth for authentication. Perfect for developers looking to understand how to build real-time applications with modern web technologies.
## 🛠 Technologies Used
- **Go**: Backend server implementation
- **Vue.js**: Frontend framework
- **GraphQL**: API query language with subscription support
- **Redis**: Message persistence and real-time features
- **Docker**: Containerization and deployment
- **GitHub OAuth**: User authentication
- **WebSocket**: Real-time communication
- **gqlgen**: GraphQL server library for Go## 📚 Features
- Real-time message updates using GraphQL subscriptions
- Persistent chat history with Redis
- GitHub OAuth authentication
- Modern, responsive UI with Vue.js
- Docker containerization for easy deployment
- GraphQL playground for API testing
- Message timestamps and user identification
- Cross-platform compatibility## 🚀 Installation and Running the Project
### Prerequisites
- Docker and Docker Compose
- Go 1.22 or later
- Node.js 18 or later
- GitHub OAuth credentials### Development Setup
1. **Clone the Repository**:
```bash
git clone https://github.com/datpham0412/go-realtime-chat.git
cd go-realtime-chat
```2. **Environment Configuration**:
Create a `.env` file with:```env
REDIS_URL=redis://redis:6379
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
```3. **Start Development Services**:
```bash
docker-compose up -d
```4. **Run Frontend Development Server**:
```bash
cd frontend
npm install
npm run start
```### Production Deployment with Fly.io
1. **Install Fly CLI**:
Follow instructions at [fly.io/docs/hands-on/install-flyctl](https://fly.io/docs/hands-on/install-flyctl/)2. **Login to Fly.io**:
```bash
fly auth login
```3. **Deploy the Application**:
```bash
fly deploy
```4. **Set Environment Variables**:
```bash
fly secrets set GITHUB_CLIENT_ID=your_client_id
fly secrets set GITHUB_CLIENT_SECRET=your_client_secret
```## 📜 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 📞 Contact
For any inquiries, please open an issue in the GitHub repository.
Made with ❤️ by [Dat Pham](https://github.com/datpham0412)