# Chat Service

> Real-time chat service with End-to-End Encryption (E2EE) for GoodGo platform.

## Documentation / Tài Liệu

> **EN**: [English Documentation](docs/en/README.md)  
> **VI**: [Tài liệu Tiếng Việt](docs/vi/README.md)

## Quick Links

| English | Vietnamese |
|---------|------------|
| [Architecture](docs/en/ARCHITECTURE.md) | [Kiến trúc](docs/vi/ARCHITECTURE.md) |
| [Quick Start](docs/en/README.md#quick-start) | [Bắt Đầu Nhanh](docs/vi/README.md#bắt-đầu-nhanh) |
| [API Reference](docs/en/README.md#api-endpoints) | [API Reference](docs/vi/README.md#api-endpoints) |

## Tech Stack

- **.NET 10** - Core framework
- **ASP.NET Core SignalR** - Real-time communication
- **PostgreSQL 16+** - Message persistence
- **Redis 7+** - Backplane & caching
- **E2EE with X3DH** - End-to-end encryption

## Key Features

- 🔒 **End-to-End Encryption** - X3DH key exchange, AES-256-GCM
- 💬 **Real-time Chat** - SignalR with WebSocket/SSE/Long Polling
- 🤖 **AI Integration** - Smart chatbot with streaming responses
- 📱 **Multi-device** - User mapping across devices
- 🚀 **High Performance** - MessagePack protocol

## Development

```bash
# Restore dependencies
dotnet restore

# Build
dotnet build

# Run
dotnet run --project src/ChatService.API
```

## Docker

```bash
docker build -t chatservice:latest .
docker run -p 5000:8080 --env-file .env chatservice:latest
```

## License

Proprietary - GoodGo Platform
