Commit Graph

597 Commits

Author SHA1 Message Date
8a047e8d9f Update database handling code (#247) 2026-08-25 13:42:51 -04:00
Aaron Po
03ca966708 C++ code formatting 2026-08-24 01:13:41 -04:00
Aaron Po
b64c42ebde formatting 2026-08-24 01:09:48 -04:00
c825d99b0a Refactor comments and update documentation for backend and pipeline (#246)
* Remove restating comments in backend

* Remove restating comments in frontend stories

* Remove restating comments in pipeline

* Remove restating comments in pipeline scripts

* Restore location-clear comment in BreweryRepository

* Remove stale/restating comments found in second pass

* Restore mock curated-data branch comment in main.cc

* Remove more restating/filler comments in backend

* Document account-management endpoints, compose files, and env generator

* Squashed commit of the following:

commit a8a5b8abd9969859c695092fae6990d03b2135ed
Author: Aaron Po <aaron.po97@gmail.com>
Date:   Sun Aug 23 23:53:56 2026 -0400

    Add reverse geocoding for brewery street addresses (#245)

    * Add geocoding to seed application, remove postal codes from generator

    Update comments

* Update pipeline class diagram for OpenAI generator

* Update pipeline activity diagram for brewery coordinates and OpenAI backend

* Add mailpit, production, db-only, and minimal environments to deployment diagram

* Fix authentication flow diagram for Identity migration

* Add account-management flows to authentication diagram

* Fix database schema diagram note referencing removed AuthRepository
2026-08-24 01:09:48 -04:00
cd5fd2d998 Add reverse geocoding for brewery street addresses (#245)
* Add geocoding to seed application, remove postal codes from generator

Update comments
2026-08-24 01:09:48 -04:00
e738fe484a Update generate pipeline to add OpenAI api as an additional backend (for comparison testing), add brewery coordinates (#244)
* add brewery coordinates

* Add openai mode

* Add coordinates to schema

* Fix C++ review findings in pipeline: k-prefixed enum values, include ordering, populated validation error messages, conventional const notation, and endl replaced with newline
2026-08-24 01:09:48 -04:00
31da1d557c Handle fetch fail in client app, fix data binding in location data (#243)
* Improve error handling for server rendered routes

* Fix data binding issue for country/state codes (use alias in sql)
2026-08-24 01:09:48 -04:00
bfd45842fe Refactor authentication and account management with modular UI components (#242) 2026-08-24 01:09:48 -04:00
Aaron Po
6a44afd6b6 Replace raw environment variable reads with IConfiguration in backend 2026-08-24 01:09:48 -04:00
Aaron Po
c380bebdd6 Add self-service account management commands (delete, update username/email/password/profile) 2026-08-24 01:09:48 -04:00
Aaron Po
93e0d089f9 Remove obsolete AuthRepository/IAuthRepository 2026-08-24 01:09:47 -04:00
Aaron Po
77c3407792 Migrate Database.Seed to UserManager<ApplicationUser> 2026-08-24 01:09:47 -04:00
Aaron Po
fe83c47e37 Migrate TokenService.RefreshTokenAsync to UserManager
Last remaining IAuthRepository call site; RefreshTokenResult now
carries a plain (Guid, string) instead of UserAccount.
2026-08-24 01:09:47 -04:00
Aaron Po
63d195ddf7 Migrate handlers to UserManager<> 2026-08-24 01:09:47 -04:00
Aaron Po
f06f4bf3a9 Wire ASP.NET Core Identity DI alongside existing AuthRepository
Both stacks coexist until handlers are migrated one by one.
2026-08-24 01:09:47 -04:00
Aaron Po
3c0ca485b8 Decouple ITokenService from UserAccount entity
Token generation only ever needed the id/username, not the full UserAccount.
2026-08-24 01:09:47 -04:00
Aaron Po
1a7267ca4a Add ApplicationUser, DapperUserStore, Argon2PasswordHasher scaffolding
Unwired Identity store/hasher adapters, ahead of wiring them into DI.
2026-08-24 01:09:47 -04:00
Aaron Po
b61a440994 Delete report.sarif 2026-08-24 01:09:47 -04:00
Aaron Po
f433b21bc1 Fix code analysis warnings 2026-08-24 01:09:47 -04:00
1031a76099 Create launchSettings.json (#239) 2026-08-24 01:09:47 -04:00
df160f1f72 Web/backend/solution rename (#238)
* Rename solution

* Remove unused item group in API.Core
2026-08-24 01:09:47 -04:00
de1e9ac02b 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-24 01:09:47 -04:00
Aaron Po
b27b5bdb40 Documentation updates (#236)
Remove vague or flowery language, use Simplified Technical English whenever possible
2026-08-24 01:09:47 -04:00
Aaron Po
30cdb48491 remove comment 2026-08-24 01:09:47 -04:00
Aaron Po
37667db2f6 Format 2026-08-24 01:09:47 -04:00
Aaron Po
f665df578c update backend/shared docs 2026-08-24 01:09:47 -04:00
Aaron Po
f9acdc8ada update infra docs 2026-08-24 01:09:47 -04:00
Aaron Po
19dfad5ab5 update features docs 2026-08-24 01:09:47 -04:00
Aaron Po
633550f808 update domain docs 2026-08-24 01:09:47 -04:00
Aaron Po
2b69c99d54 update api docs 2026-08-24 01:09:47 -04:00
Aaron Po
1f43f48276 Add navigation properties to entity types 2026-08-24 01:09:47 -04:00
Aaron Po
9862d1cff4 format sql 2026-08-24 01:09:47 -04:00
Aaron Po
c9a02dbedf Refactor user registration process to use UserRegistrationDto;
implement user registration in seed app
2026-08-24 01:09:47 -04:00
Aaron Po
d469c07250 Update database migration and seeding logic; adjust Docker port mapping 2026-08-24 01:09:47 -04:00
Aaron Po
76380d32c3 add wiring 2026-08-24 01:09:47 -04:00
Aaron Po
7162244454 Update viewer 2026-08-24 01:09:47 -04:00
Aaron Po
b2095e7bdd Create biergarten_seed_2026-07-20T05-46-02.993511Z.sqlite 2026-08-24 01:09:47 -04:00
Aaron Po
5fd60b33f7 Add sqlite load into Database.Seed 2026-08-24 01:09:47 -04:00
Aaron Po
ec770aa724 Formatting 2026-08-24 01:09:47 -04:00
Aaron Po
8e7ecf2fc3 Pipeline: City rename, add address/postal-code generation, add xeger generation (#232) 2026-08-24 01:09:47 -04:00
Aaron Po
901f30ffd8 Fix mock-only builds (#231) 2026-08-24 01:09:47 -04:00
b20852bcd4 Pipeline: Add LLM and mocked user generation to the pipeline (#230) 2026-08-24 01:09:47 -04:00
Aaron Po
08a75d6ed0 update pipeline docs 2026-08-24 01:09:47 -04:00
Aaron Po
10aed47def commit csharpier config update 2026-08-24 01:09:47 -04:00
Aaron Po
1699da6b74 update mailkit 2026-08-24 01:09:47 -04:00
Aaron Po
cd99c1fbc3 formatting 2026-08-24 01:09:47 -04:00
Aaron Po
254431928f code style cleanup 2026-06-20 15:54:53 -04:00
Aaron Po
07aedcb866 Update documentation to reflect new architecture and previous refactors 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
Aaron Po
5cf4df1fd8 Migrate UserManagement to a vertical slice (Features.UserManagement)
Same pattern as the Breweries migration: Service.UserManagement and the
UserAccount repository fold into Features.UserManagement, with MediatR
queries replacing UserService. UpdateUserCommand/Handler carry forward
IUserService.UpdateAsync as-is (it has no HTTP route today, and adding one
is a separate decision from this migration). Adds handler/repository test
coverage that didn't exist before, since Service.UserManagement had no
test project.
2026-06-20 15:54:53 -04:00