Skip to content

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.

License

Notifications You must be signed in to change notification settings

datpham0412/go-realtime-chat

Repository files navigation

💬 Real-time Chat with GraphQL Subscriptions in Go

License: MIT Go Report Card GitHub issues GitHub stars

📋 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 vue redis graphql docker

  • 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:
git clone https://github.com/datpham0412/go-realtime-chat.git
cd go-realtime-chat
  1. Environment Configuration: Create a .env file with:
REDIS_URL=redis://redis:6379
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
  1. Start Development Services:
docker-compose up -d
  1. Run Frontend Development Server:
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

  2. Login to Fly.io:

fly auth login
  1. Deploy the Application:
fly deploy
  1. Set Environment Variables:
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 file for details.

📞 Contact

For any inquiries, please open an issue in the GitHub repository.

Made with ❤️ by Dat Pham

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published