diff --git a/docs/web/diagrams/auth/confirm-user.mmd b/docs/web/diagrams/auth/confirm-user.mmd
index f340267c..dc680e76 100644
--- a/docs/web/diagrams/auth/confirm-user.mmd
+++ b/docs/web/diagrams/auth/confirm-user.mmd
@@ -2,21 +2,19 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant ConfirmHandler as ConfirmUserHandler
participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant JWT as JWT Infrastructure
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: POST /api/auth/confirm?token={token} (requires Bearer access token)
activate API
API->>Mediator: Send(ConfirmUserCommand(token))
diff --git a/docs/web/diagrams/auth/delete-account.mmd b/docs/web/diagrams/auth/delete-account.mmd
index 8467d2d5..c1788cb2 100644
--- a/docs/web/diagrams/auth/delete-account.mmd
+++ b/docs/web/diagrams/auth/delete-account.mmd
@@ -2,17 +2,15 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant DeleteAccountHandler
participant UserMgr as UserManager(ApplicationUser)
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: DELETE /api/auth/account (requires Bearer access token)
activate API
API->>Mediator: Send(DeleteAccountCommand(GetAuthenticatedUserId()))
@@ -37,7 +35,7 @@ sequenceDiagram
UserMgr->>UserStore: DeleteAsync(user)
activate UserStore
UserStore->>DB: DELETE FROM UserAccount WHERE UserAccountID = @Id
- Note right of UserStore: UserCredential, UserVerification, and UserProfile cascade on delete (UserAvatar cascades transitively through UserProfile). Posts, comments, photos, and follows use ON DELETE NO ACTION — if any reference this account, the DELETE throws a foreign key violation (SQL error 547)
+ Note right of UserStore: UserCredential, UserVerification, and UserProfile cascade on delete
(UserAvatar cascades transitively through UserProfile).
Posts, comments, photos, and follows use ON DELETE NO ACTION
if any reference this account, the DELETE throws a foreign key violation (SQL error 547)
alt Foreign key violation (dependent records exist)
UserStore-->>UserMgr: IdentityResult.Failed (AccountHasDependentRecords)
@@ -49,7 +47,7 @@ sequenceDiagram
deactivate UserMgr
alt Account has dependent records
- DeleteAccountHandler->>Mediator: throw ConflictException "Account cannot be deleted while it still has associated posts, comments, photos, or follows."
+ DeleteAccountHandler->>Mediator: throw ConflictException
"Account cannot be deleted while it still has associated posts, comments, photos, or follows."
Mediator->>API: propagate
API->>User: 409 Conflict
else !result.Succeeded (other failure)
diff --git a/docs/web/diagrams/auth/login.mmd b/docs/web/diagrams/auth/login.mmd
index 06de7dcc..55d55356 100644
--- a/docs/web/diagrams/auth/login.mmd
+++ b/docs/web/diagrams/auth/login.mmd
@@ -2,22 +2,20 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant LoginHandler
participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher
participant JWT as JWT Infrastructure
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: POST /api/auth/login {username, password}
activate API
API->>Mediator: Send(LoginCommand)
diff --git a/docs/web/diagrams/auth/refresh-token.mmd b/docs/web/diagrams/auth/refresh-token.mmd
index ca1273b9..4e23bb4f 100644
--- a/docs/web/diagrams/auth/refresh-token.mmd
+++ b/docs/web/diagrams/auth/refresh-token.mmd
@@ -2,21 +2,19 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant RefreshHandler as RefreshTokenHandler
participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant JWT as JWT Infrastructure
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: POST /api/auth/refresh
Header: X-Refresh-Token: {token}
activate API
API->>Mediator: Send(RefreshTokenCommand(refreshToken))
diff --git a/docs/web/diagrams/auth/registration.mmd b/docs/web/diagrams/auth/registration.mmd
index dd3a0dc4..efc66e2b 100644
--- a/docs/web/diagrams/auth/registration.mmd
+++ b/docs/web/diagrams/auth/registration.mmd
@@ -2,26 +2,24 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant RegHandler as RegisterUserHandler
participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher
participant JWT as JWT Infrastructure
participant SMTP as Email Provider
participant Template as Template Provider
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
participant ProfileHandler as CreateUserProfileHandler
(Profile slice)
participant EmailDispatcher as EmailDispatcher
(Features.Emails)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: POST /api/auth/register {username, firstName, lastName, email, dateOfBirth, password}
activate API
API->>Mediator: Send(RegisterUserCommand)
diff --git a/docs/web/diagrams/auth/resend-confirmation.mmd b/docs/web/diagrams/auth/resend-confirmation.mmd
index 2c2e271e..cd985da3 100644
--- a/docs/web/diagrams/auth/resend-confirmation.mmd
+++ b/docs/web/diagrams/auth/resend-confirmation.mmd
@@ -2,23 +2,21 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant ResendHandler as ResendConfirmationEmailHandler
participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant SMTP as Email Provider
participant Template as Template Provider
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
participant EmailDispatcher as EmailDispatcher
(Features.Emails)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: POST /api/auth/confirm/resend?userId={id} (requires Bearer access token)
activate API
API->>Mediator: Send(ResendConfirmationEmailCommand(userId))
diff --git a/docs/web/diagrams/auth/update-email.mmd b/docs/web/diagrams/auth/update-email.mmd
index f7f875b5..14f029e4 100644
--- a/docs/web/diagrams/auth/update-email.mmd
+++ b/docs/web/diagrams/auth/update-email.mmd
@@ -2,17 +2,15 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant UpdateEmailHandler
participant UserMgr as UserManager(ApplicationUser)
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: PATCH /api/auth/email {newEmail} (requires Bearer access token)
activate API
API->>Mediator: Send(UpdateEmailCommand(GetAuthenticatedUserId(), newEmail))
diff --git a/docs/web/diagrams/auth/update-password.mmd b/docs/web/diagrams/auth/update-password.mmd
index 8f249c4d..ba09c5d0 100644
--- a/docs/web/diagrams/auth/update-password.mmd
+++ b/docs/web/diagrams/auth/update-password.mmd
@@ -2,20 +2,18 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant UpdatePasswordHandler
participant UserMgr as UserManager(ApplicationUser)
end
- box rgb(235,236,227) Infrastructure Layer
+ box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: PATCH /api/auth/password {currentPassword, newPassword} (requires Bearer access token)
activate API
API->>Mediator: Send(UpdatePasswordCommand(GetAuthenticatedUserId(), currentPassword, newPassword))
diff --git a/docs/web/diagrams/auth/update-profile.mmd b/docs/web/diagrams/auth/update-profile.mmd
index 1d91cb72..4180f9c4 100644
--- a/docs/web/diagrams/auth/update-profile.mmd
+++ b/docs/web/diagrams/auth/update-profile.mmd
@@ -2,17 +2,15 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant UpdateProfileHandler
participant UserMgr as UserManager(ApplicationUser)
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: PATCH /api/auth/profile {firstName, lastName, dateOfBirth} (requires Bearer access token)
activate API
API->>Mediator: Send(UpdateProfileCommand(GetAuthenticatedUserId(), firstName, lastName, dateOfBirth))
diff --git a/docs/web/diagrams/auth/update-username.mmd b/docs/web/diagrams/auth/update-username.mmd
index 07b0d5d8..d25c075d 100644
--- a/docs/web/diagrams/auth/update-username.mmd
+++ b/docs/web/diagrams/auth/update-username.mmd
@@ -2,17 +2,15 @@ sequenceDiagram
actor User
participant API as API Controller
participant Mediator as MediatR pipeline
(ValidationBehavior)
- box rgb(241,243,234) Handler Layer
+ box Handler Layer
participant UpdateUsernameHandler
participant UserMgr as UserManager(ApplicationUser)
end
- box rgb(219,238,221) Repository / Cross-slice
+ box Repository / Cross-slice
participant UserStore as DapperUserStore
(IUserStore/IUserPasswordStore/IUserEmailStore)
end
participant DB as SQL Server
- Note over UserMgr: ASP.NET Core Identity's UserManager replaces the deleted AuthRepository — handlers delegate to UserManager, which calls DapperUserStore (persistence) and Argon2PasswordHasher.
-
User->>API: PATCH /api/auth/username {newUsername} (requires Bearer access token)
activate API
API->>Mediator: Send(UpdateUsernameCommand(GetAuthenticatedUserId(), newUsername))