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.
- 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
- 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
- Docker and Docker Compose
- Go 1.22 or later
- Node.js 18 or later
- GitHub OAuth credentials
- Clone the Repository:
git clone https://github.com/datpham0412/go-realtime-chat.git
cd go-realtime-chat
- 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
- Start Development Services:
docker-compose up -d
- Run Frontend Development Server:
cd frontend
npm install
npm run start
-
Install Fly CLI: Follow instructions at fly.io/docs/hands-on/install-flyctl
-
Login to Fly.io:
fly auth login
- Deploy the Application:
fly deploy
- Set Environment Variables:
fly secrets set GITHUB_CLIENT_ID=your_client_id
fly secrets set GITHUB_CLIENT_SECRET=your_client_secret
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, please open an issue in the GitHub repository.
Made with ❤️ by Dat Pham