net10, the refactor finished, and federation that works
Build / Build (push) Successful in 28s
Deploy / privapub.thepra.dev (push) Successful in 19s

The tree had not compiled since its first commit: Group, DmGroup and
IGroupUsersService were referenced and never written, an IDE rename had
turned the user-settings DTO into the ViewAvatarServer enum, and the settings
were saved as an entity they no longer were.

Built now:
- Group (an ActivityPub Group actor with its own keys, members, invitation
  code and optional password) and DmGroup (a conversation), with
  /clientapi/group/{list,insert,update,join,leave,approve}.
- Posts and DMs: /clientapi/post/{list,insert,delete}, /clientapi/dm/{list,insert};
  DM recipients are local usernames or user@host handles resolved by WebFinger.
- Invitation sign-up and login against the group's invitation code, checking
  the password before any account is created.
- Federation: WebFinger, NodeInfo 2.0, actors at /peasants/{name} (Person,
  Group, and an Application instance actor) with SPKI keys, draft-cavage
  RSA-SHA256 HTTP signatures both ways, an inbox handling Follow (+Accept),
  Undo, Create, Delete and Update, an outbox, notes at /posts/{id}, and a
  persisted, retried, signed delivery queue. A post to a group is announced
  by the group to its followers (FEP-1b12).
- The unused, broken typed ActivityPub models are replaced by a renderer;
  NSign's HMAC setup, which could not federate, is gone.

Upgrade: net10.0, MongoDB.Entities 25.1 (instance DB API, Standard GUIDs),
Swashbuckle 10 / OpenApi 2, Serilog.AspNetCore 10, MailKit 4.18,
PasswordGenerator 3. The JWT keys are 64 bytes (IdentityModel 8 refuses
shorter for HS512). Production runs its own mongod on 127.0.0.1:27022, as
Sintopia's apps do, and deploys to privapub.thepra.dev from the build runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-01 08:05:56 +02:00
1 parent 56c5396106
commit 075c22228a
78 files changed
+3419 -1091

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
using Microsoft.IdentityModel.Tokens;
using Microsoft.IdentityModel.Tokens;
using PrivaPub.ClientModels;
using PrivaPub.ClientModels.User;
@@ -19,7 +19,7 @@ namespace PrivaPub.StaticServices
Configuration = configuration;
}
public JwtUser GenerateToken(RootUser user, ViewAvatarServer userSettings)
public JwtUser GenerateToken(RootUser user, ViewUserSettings userSettings)
{
var expiration = DateTime.UtcNow.AddHours(int.Parse(Configuration["AppConfiguration:Jwt:HoursTimeout"]));
var securityKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(Configuration["AppConfiguration:Jwt:Key"]));
+20 -11
View File
@@ -1,7 +1,9 @@
using MongoDB.Entities;
using MongoDB.Entities;
using PrivaPub.Models;
using PrivaPub.Models.Data;
using PrivaPub.Models.Federation;
using PrivaPub.Models.Group;
using PrivaPub.Models.Post;
using PrivaPub.Models.User;
@@ -9,19 +11,26 @@ namespace PrivaPub.StaticServices
{
public class DbEntities
{
public Find<RootUser> RootUsers { get { return DB.Find<RootUser>(); } }
public Find<RootUserNote> RootUserNotes { get { return DB.Find<RootUserNote>(); } }
public Find<RootUser> RootUsers { get { return DB.Default.Find<RootUser>(); } }
public Find<RootUserNote> RootUserNotes { get { return DB.Default.Find<RootUserNote>(); } }
public Find<AppConfiguration> AppConfiguration { get { return DB.Find<AppConfiguration>(); } }
public Find<Language> Languages { get { return DB.Find<Language>(); } }
public Find<EmailRecovery> EmailRecoveries { get { return DB.Find<EmailRecovery>(); } }
public Find<AppConfiguration> AppConfiguration { get { return DB.Default.Find<AppConfiguration>(); } }
public Find<Language> Languages { get { return DB.Default.Find<Language>(); } }
public Find<EmailRecovery> EmailRecoveries { get { return DB.Default.Find<EmailRecovery>(); } }
public Find<Post> Posts { get { return DB.Find<Post>(); } }
public Find<DmPost> DmPosts { get { return DB.Find<DmPost>(); } }
public Find<Post> Posts { get { return DB.Default.Find<Post>(); } }
public Find<DmPost> DmPosts { get { return DB.Default.Find<DmPost>(); } }
public Find<Avatar> Avatars { get { return DB.Find<Avatar>(); } }
public Find<ForeignAvatar> ForeignAvatars { get { return DB.Find<ForeignAvatar>(); } }
public Find<Avatar> Avatars { get { return DB.Default.Find<Avatar>(); } }
public Find<ForeignAvatar> ForeignAvatars { get { return DB.Default.Find<ForeignAvatar>(); } }
public Find<RootToAvatar> RootToAvatars { get { return DB.Find<RootToAvatar>(); } }
public Find<RootToAvatar> RootToAvatars { get { return DB.Default.Find<RootToAvatar>(); } }
public Find<Group> Groups { get { return DB.Default.Find<Group>(); } }
public Find<DmGroup> DmGroups { get { return DB.Default.Find<DmGroup>(); } }
public Find<Follower> Followers { get { return DB.Default.Find<Follower>(); } }
public Find<Delivery> Deliveries { get { return DB.Default.Find<Delivery>(); } }
public Find<InstanceActor> InstanceActors { get { return DB.Default.Find<InstanceActor>(); } }
}
}