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:07:14 +00:00
1 parent 5088313f74
commit f57fe229fc
13 files changed
+1427 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import 'dart:convert';
import 'package:relic/relic.dart';
import '../config/config.dart';
extension RequestHelper on Request {
/// Parses the request body as JSON
Future<Map<String, dynamic>> asJson() async {
final bodyText = await readAsString();
return jsonDecode(bodyText);
}
}
extension MapToBody on Map<String, dynamic> {
/// Converts a Map to a JSON Body
Body get toBody => Body.fromString(jsonEncode(this));
}
extension BodyHelper on Body {
/// Creates a JSON body from a Map
static Body fromJson(Map<String, dynamic> json) {
return Body.fromString(jsonEncode(json));
}
}