Adds transactional outbox and email verification

Implements outbox pattern for reliable message delivery
Adds email verification flow with Postmark integration
Enhances account registration with secure token generation

Introduces background processing for asynchronous email sending
Implements database-level notification mechanism for message processing
This commit is contained in:
Janus C. H. Knudsen 2026-01-10 11:13:33 +01:00
parent 88812177a9
commit 54b057886c
35 changed files with 1174 additions and 358 deletions

View file

@ -0,0 +1,27 @@
#nullable enable
namespace PlanTempus.Core.Outbox;
public class OutboxMessage
{
public Guid Id { get; set; }
public required string Type { get; set; }
public required object Payload { get; set; }
public string Status { get; set; } = "pending";
public DateTime CreatedAt { get; set; }
public DateTime? ProcessedAt { get; set; }
public int RetryCount { get; set; }
public string? ErrorMessage { get; set; }
}
public static class OutboxMessageTypes
{
public const string VerificationEmail = "verification_email";
}
public class VerificationEmailPayload
{
public required string Email { get; set; }
public required string UserName { get; set; }
public required string Token { get; set; }
}