Files

48 lines
1.3 KiB
Markdown

# Chat Server
A self-hosted Discord alternative with decentralized identity using the Home Server model.
## Architecture
Each user has a **home server** where their identity lives (keypair), and can seamlessly join other **guest servers** using cryptographic signatures.
- **NO identity server** - just use one regular server as "home"
- **NO federation protocol** - servers don't talk to each other
- **Client does everything** - syncs, cross-server requests, profile updates
See [ARCHITECTURE.md](./ARCHITECTURE.md) for full details.
See [CLIENT_INTEGRATION.md](./CLIENT_INTEGRATION.md) for client protocol/API integration details.
## Quick Start
```bash
# Install dependencies
dart pub get
# Generate ObjectBox code
dart run build_runner build
# Run server
dart run lib/server.dart
```
## Project Structure
```
lib/
├── server.dart # Entry point, routes
├── models.dart # User, Channel, Message entities
├── objectbox.g.dart # Generated
├── config/config.dart # Server config
└── src/
├── auth/ # Keypair, JWT, middleware
├── handlers/ # API endpoints
└── utils/ # Helpers
```
## Tech Stack
- **Framework**: Relic 1.0
- **Database**: ObjectBox
- **Auth**: JWT + ECDSA signatures