remove hardcoded box colours, remove text about historical auth repo

This commit is contained in:
Aaron Po
2026-09-01 15:50:04 -04:00
parent 22bf0d0298
commit 3448f82d6f
10 changed files with 28 additions and 48 deletions

View File

@@ -2,21 +2,19 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant ConfirmHandler as ConfirmUserHandler participant ConfirmHandler as ConfirmUserHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService participant TokenSvc as TokenService
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant JWT as JWT Infrastructure participant JWT as JWT Infrastructure
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: POST /api/auth/confirm?token={token} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(ConfirmUserCommand(token)) API->>Mediator: Send(ConfirmUserCommand(token))

View File

@@ -2,17 +2,15 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant DeleteAccountHandler participant DeleteAccountHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: DELETE /api/auth/account (requires Bearer access token)
activate API activate API
API->>Mediator: Send(DeleteAccountCommand(GetAuthenticatedUserId())) API->>Mediator: Send(DeleteAccountCommand(GetAuthenticatedUserId()))
@@ -37,7 +35,7 @@ sequenceDiagram
UserMgr->>UserStore: DeleteAsync(user) UserMgr->>UserStore: DeleteAsync(user)
activate UserStore activate UserStore
UserStore->>DB: DELETE FROM UserAccount WHERE UserAccountID = @Id 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<br/>(UserAvatar cascades transitively through UserProfile).<br/>Posts, comments, photos, and follows use ON DELETE NO ACTION<br/>if any reference this account, the DELETE throws a foreign key violation (SQL error 547)
alt Foreign key violation (dependent records exist) alt Foreign key violation (dependent records exist)
UserStore-->>UserMgr: IdentityResult.Failed (AccountHasDependentRecords) UserStore-->>UserMgr: IdentityResult.Failed (AccountHasDependentRecords)
@@ -49,7 +47,7 @@ sequenceDiagram
deactivate UserMgr deactivate UserMgr
alt Account has dependent records 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<br>"Account cannot be deleted while it still has associated posts, comments, photos, or follows."
Mediator->>API: propagate Mediator->>API: propagate
API->>User: 409 Conflict API->>User: 409 Conflict
else !result.Succeeded (other failure) else !result.Succeeded (other failure)

View File

@@ -2,22 +2,20 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant LoginHandler participant LoginHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService participant TokenSvc as TokenService
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher participant Argon2 as Argon2PasswordHasher
participant JWT as JWT Infrastructure participant JWT as JWT Infrastructure
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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} User->>API: POST /api/auth/login {username, password}
activate API activate API
API->>Mediator: Send(LoginCommand) API->>Mediator: Send(LoginCommand)

View File

@@ -2,21 +2,19 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant RefreshHandler as RefreshTokenHandler participant RefreshHandler as RefreshTokenHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService participant TokenSvc as TokenService
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant JWT as JWT Infrastructure participant JWT as JWT Infrastructure
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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<br/>Header: X-Refresh-Token: {token} User->>API: POST /api/auth/refresh<br/>Header: X-Refresh-Token: {token}
activate API activate API
API->>Mediator: Send(RefreshTokenCommand(refreshToken)) API->>Mediator: Send(RefreshTokenCommand(refreshToken))

View File

@@ -2,26 +2,24 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant RegHandler as RegisterUserHandler participant RegHandler as RegisterUserHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService participant TokenSvc as TokenService
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher participant Argon2 as Argon2PasswordHasher
participant JWT as JWT Infrastructure participant JWT as JWT Infrastructure
participant SMTP as Email Provider participant SMTP as Email Provider
participant Template as Template Provider participant Template as Template Provider
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
participant ProfileHandler as CreateUserProfileHandler<br/>(Profile slice) participant ProfileHandler as CreateUserProfileHandler<br/>(Profile slice)
participant EmailDispatcher as EmailDispatcher<br/>(Features.Emails) participant EmailDispatcher as EmailDispatcher<br/>(Features.Emails)
end end
participant DB as SQL Server 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} User->>API: POST /api/auth/register {username, firstName, lastName, email, dateOfBirth, password}
activate API activate API
API->>Mediator: Send(RegisterUserCommand) API->>Mediator: Send(RegisterUserCommand)

View File

@@ -2,23 +2,21 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant ResendHandler as ResendConfirmationEmailHandler participant ResendHandler as ResendConfirmationEmailHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
participant TokenSvc as TokenService participant TokenSvc as TokenService
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant SMTP as Email Provider participant SMTP as Email Provider
participant Template as Template Provider participant Template as Template Provider
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
participant EmailDispatcher as EmailDispatcher<br/>(Features.Emails) participant EmailDispatcher as EmailDispatcher<br/>(Features.Emails)
end end
participant DB as SQL Server 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) User->>API: POST /api/auth/confirm/resend?userId={id} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(ResendConfirmationEmailCommand(userId)) API->>Mediator: Send(ResendConfirmationEmailCommand(userId))

View File

@@ -2,17 +2,15 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant UpdateEmailHandler participant UpdateEmailHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: PATCH /api/auth/email {newEmail} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(UpdateEmailCommand(GetAuthenticatedUserId(), newEmail)) API->>Mediator: Send(UpdateEmailCommand(GetAuthenticatedUserId(), newEmail))

View File

@@ -2,20 +2,18 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant UpdatePasswordHandler participant UpdatePasswordHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
end end
box rgb(235,236,227) Infrastructure Layer box Infrastructure Layer
participant Argon2 as Argon2PasswordHasher participant Argon2 as Argon2PasswordHasher
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: PATCH /api/auth/password {currentPassword, newPassword} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(UpdatePasswordCommand(GetAuthenticatedUserId(), currentPassword, newPassword)) API->>Mediator: Send(UpdatePasswordCommand(GetAuthenticatedUserId(), currentPassword, newPassword))

View File

@@ -2,17 +2,15 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant UpdateProfileHandler participant UpdateProfileHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: PATCH /api/auth/profile {firstName, lastName, dateOfBirth} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(UpdateProfileCommand(GetAuthenticatedUserId(), firstName, lastName, dateOfBirth)) API->>Mediator: Send(UpdateProfileCommand(GetAuthenticatedUserId(), firstName, lastName, dateOfBirth))

View File

@@ -2,17 +2,15 @@ sequenceDiagram
actor User actor User
participant API as API Controller participant API as API Controller
participant Mediator as MediatR pipeline<br/>(ValidationBehavior) participant Mediator as MediatR pipeline<br/>(ValidationBehavior)
box rgb(241,243,234) Handler Layer box Handler Layer
participant UpdateUsernameHandler participant UpdateUsernameHandler
participant UserMgr as UserManager(ApplicationUser) participant UserMgr as UserManager(ApplicationUser)
end end
box rgb(219,238,221) Repository / Cross-slice box Repository / Cross-slice
participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore) participant UserStore as DapperUserStore<br/>(IUserStore/IUserPasswordStore/IUserEmailStore)
end end
participant DB as SQL Server 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) User->>API: PATCH /api/auth/username {newUsername} (requires Bearer access token)
activate API activate API
API->>Mediator: Send(UpdateUsernameCommand(GetAuthenticatedUserId(), newUsername)) API->>Mediator: Send(UpdateUsernameCommand(GetAuthenticatedUserId(), newUsername))