Commit Graph

16 Commits

Author SHA1 Message Date
Aaron Po
c514eb9814 Replace raw environment variable reads with IConfiguration in backend 2026-08-23 00:52:26 -04:00
Aaron Po
9e9fc98d33 Add self-service account management commands (delete, update username/email/password/profile) 2026-08-23 00:52:26 -04:00
Aaron Po
7a981bc331 Remove obsolete AuthRepository/IAuthRepository 2026-08-23 00:52:26 -04:00
Aaron Po
6b9c14c14b Migrate TokenService.RefreshTokenAsync to UserManager
Last remaining IAuthRepository call site; RefreshTokenResult now
carries a plain (Guid, string) instead of UserAccount.
2026-08-23 00:52:26 -04:00
Aaron Po
2e5f02fb38 Migrate handlers to UserManager<> 2026-08-23 00:52:26 -04:00
Aaron Po
781d6bb2e6 Wire ASP.NET Core Identity DI alongside existing AuthRepository
Both stacks coexist until handlers are migrated one by one.
2026-08-23 00:52:26 -04:00
Aaron Po
885b2a9570 Decouple ITokenService from UserAccount entity
Token generation only ever needed the id/username, not the full UserAccount.
2026-08-23 00:52:26 -04:00
Aaron Po
7793129284 Add ApplicationUser, DapperUserStore, Argon2PasswordHasher scaffolding
Unwired Identity store/hasher adapters, ahead of wiring them into DI.
2026-08-23 00:52:26 -04:00
Aaron Po
f015ac8025 Fix code analysis warnings 2026-08-22 00:03:11 -04:00
6297cb141c Migrate Auth/Brewery/Location repositories to pure Dapper; rename Timer to RowVersion (#237)
* Integrate Spectre.Console into seed application, use async data loading

* Replace stored-procedure repositories with Dapper-based repositories

Removes the USP_* stored procedures for Auth, Location, and Brewery
data access in favour of services built with Dapper.

Adds a new Features.Locations slice and optimistic concurrency support
for the Brewery slice.

* Add new documentation for Dapper migration/database schema

* Update FluentAssertions to most recent open source ver

* Update XML doc comment in backend projects

* Modify brewery location dto to include denormalized data

* - Updated column names from 'Timer' to 'RowVersion' in schema.sql for
- Introduced new BeerPost entity and updated BreweryPost and BreweryPostLocation entities to use 'RowVersion' for concurrency.
- Modified UserAccount, UserCredential, UserVerification, City, StateProvince, and Country entities to use 'RowVersion' instead of 'Timer'.
- Updated tests and command handlers to reflect changes in concurrency token from 'Timer' to 'RowVersion'.
- Adjusted BreweryDto and BreweryDtoMapper to include 'RowVersion' and updated mapping logic accordingly.
- Ensured all repository methods and interfaces are aligned with the new concurrency handling approach.

* updates

* Add BeerStyle entity and related properties; refactor BreweryDto to remove BeerPosts

* Fix Api.Specs test failures: stale Timer column refs and missing test.user fixture

* Remove repository tests, usages of registration dto used in repo

* archive old stored procs/functions

* update stale docs

* Add instructions for generating cryptographically secure base64 secrets on macOS/Linux and Windows
2026-08-21 13:09:13 -04:00
Aaron Po
48ee6b0fef Format 2026-08-04 06:30:44 -04:00
Aaron Po
88abb8e995 update features docs 2026-08-04 06:30:44 -04:00
Aaron Po
1d1edd37d0 Refactor user registration process to use UserRegistrationDto;
implement user registration in seed app
2026-08-04 06:30:44 -04:00
Aaron Po
79ae18b3e2 Format ./web/backend/Features/Features.Auth 2026-06-20 15:54:53 -04:00
Aaron Po
254431928f code style cleanup 2026-06-20 15:54:53 -04:00
Aaron Po
fd341e332c Migrate Auth and Emails to vertical slices (Features.Auth, Features.Emails)
Auth and Emails land together since Auth's registration/resend flows need
Emails to exist first. Service.Auth's four services (Register, Login,
Confirmation, Token) collapse into MediatR commands/queries in
Features.Auth; TokenService stays as a slice-internal service since
multiple handlers call it. Auth no longer references Emails directly —
it sends SendRegistrationEmailCommand/SendResendConfirmationEmailCommand
(defined in Shared.Application) which Features.Emails handles, so neither
slice has a project reference on the other.

Service.Emails' IEmailService becomes Features.Emails' IEmailDispatcher,
simplified to take (firstName, email, token) instead of a full UserAccount
since that's all it ever used. API.Specs' TestApiFactory/MockEmailService
are updated to swap in the relocated interface.

Also deletes Infrastructure.Repository now that Breweries, UserManagement,
and Auth have all moved their repos out of it, and replaces the two
now-dead docker-compose test services (repository.tests, service.auth.tests,
both pointing at deleted Dockerfiles) with a single unit.tests service that
runs every Features.*.Tests project via Dockerfile.tests.
2026-06-20 15:54:53 -04:00