feat: Initial MVP with home server identity model

- User model with Ed25519 keypair identity
- Register/login on home server (creates keypair)
- Join guest servers with signature verification
- Public endpoints for cross-server identity
- Channel and message CRUD
- JWT authentication middleware

Architecture: Home server model, no federation, client-driven sync
This commit is contained in:
Z User committed 2026-02-19 23:29:52 +00:00
commit 6a8977c4c3
14 files changed
+1494

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
# 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.
## 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 + Ed25519 signatures