Tatsumaki Chat
A real-time chat application built with Go, featuring SSE communications, Redis pub/sub for realtime messaging and PostgreSQL for data persistence.
π Features
- 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)
ποΈ Architecture
Tech Stack
- Language: Go
- Database: PostgreSQL
- Pub-Sub: Redis
- Real-time Communication: Server-Sent Events (SSE)
- HTTP Router: Go's native
net/http with http.ServeMux
π Getting Started
Prerequisites
- Go 1.23 or higher
- Docker and Docker Compose
- PostgreSQL (via Docker)
- Redis (via Docker)
Environment Setup
- Clone the repository:
git clone https://github.com/PandaX185/tatsumaki-chat.git
cd tatsumaki-chat
- Create
.env file:
DB_USER=
DB_PASS=
DB_HOST=
DB_NAME=
DB_SSLMODE=
PORT=
REDIS_URL=
- You can simply run:
make run-all
The server will start on http://localhost:8080
π Contributing
- 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
π License
This project is licensed under the MIT License.