Skip to content

Latest commit

 

History

History
126 lines (92 loc) · 4.12 KB

README.md

File metadata and controls

126 lines (92 loc) · 4.12 KB

💬 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