A real-time chat application built with Go, featuring SSE communications, Redis pub/sub for realtime messaging and PostgreSQL for data persistence.
- User authentication with JWT tokens
- Real-time messaging using Server-Sent Events (SSE)
- Multi-user chat rooms with member management
- Unread message tracking with real-time notifications
- Message persistence with PostgreSQL
- Redis pub/sub to track realtime events (new unread message, mark as read)
- Language: Go
- Database: PostgreSQL
- Pub-Sub: Redis
- Real-time Communication: Server-Sent Events (SSE)
- HTTP Router: Go's native
net/httpwithhttp.ServeMux
- Go 1.23 or higher
- Docker and Docker Compose
- PostgreSQL (via Docker)
- Redis (via Docker)
- Clone the repository:
git clone https://github.com/PandaX185/tatsumaki-chat.git
cd tatsumaki-chat- Create
.envfile:
DB_USER=
DB_PASS=
DB_HOST=
DB_NAME=
DB_SSLMODE=
PORT=
REDIS_URL=- You can simply run:
make run-allThe server will start on http://localhost:8080
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.