mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 17:47:22 +00:00
Add user generation feature
This commit is contained in:
@@ -67,11 +67,47 @@ package "Domain: Models" {
|
||||
}
|
||||
|
||||
class UserResult {
|
||||
+ first_name : std::string
|
||||
+ last_name : std::string
|
||||
+ gender : std::string
|
||||
+ username : std::string
|
||||
+ bio : std::string
|
||||
+ activity_weight : float
|
||||
}
|
||||
|
||||
class Name {
|
||||
+ first_name : std::string
|
||||
+ last_name : std::string
|
||||
+ gender : std::string
|
||||
}
|
||||
|
||||
class ForenameEntry {
|
||||
+ name : std::string
|
||||
+ gender : std::string
|
||||
}
|
||||
|
||||
class NamesByCountry {
|
||||
- forenames_by_country_ : std::unordered_map<std::string, std::vector<ForenameEntry>>
|
||||
- surnames_by_country_ : std::unordered_map<std::string, std::vector<std::string>>
|
||||
+ SampleName(iso3166_1 : const std::string&,\n rng : std::mt19937&) : std::optional<Name>
|
||||
}
|
||||
|
||||
note right of NamesByCountry
|
||||
Backed by two source-shaped maps,
|
||||
keyed by ISO 3166-1 country code,
|
||||
sourced from popular-names-by-country-dataset
|
||||
(CC0) -- see ETHICS-AND-KNOWN-ISSUES.md.
|
||||
Gender is preserved per forename so it can
|
||||
be threaded through to persona/bio generation
|
||||
later; surnames carry no gender in the source
|
||||
data. Pairing happens at sample time, not at
|
||||
fixture-authoring time, so no information from
|
||||
the source dataset is discarded up front.
|
||||
end note
|
||||
|
||||
NamesByCountry *-- "0..*" ForenameEntry
|
||||
NamesByCountry ..> Name : produces
|
||||
|
||||
class CheckinResult {
|
||||
+ checked_in_at : std::string
|
||||
+ note : std::string
|
||||
@@ -110,9 +146,20 @@ package "Domain: Models" {
|
||||
+ user_id : uint64_t
|
||||
+ location : Location
|
||||
+ user : UserResult
|
||||
+ email : std::string
|
||||
+ date_of_birth : std::string
|
||||
+ password : std::string
|
||||
+ metadata : GenerationMetadata
|
||||
}
|
||||
|
||||
note right of GeneratedUser
|
||||
email, date_of_birth, and password are
|
||||
programmatically generated by the orchestrator
|
||||
(not LLM-authored) so a downstream auth-account
|
||||
seeding consumer can register real accounts from
|
||||
this export. See ROADMAP.md §1.
|
||||
end note
|
||||
|
||||
class GeneratedCheckin {
|
||||
+ checkin_id : uint64_t
|
||||
+ user_id : uint64_t
|
||||
@@ -321,15 +368,15 @@ package "Infrastructure: Data Preloading" {
|
||||
interface DataPreloader <<interface>> {
|
||||
+ LoadLocations(filepath : const std::filesystem::path&) : std::vector<Location>
|
||||
+ LoadBeerStyles(filepath : const std::filesystem::path&) : std::vector<BeerStyle>
|
||||
+ LoadPersonas(filepath : const std::filesystem::path&) : std::vector<Persona>
|
||||
+ LoadNamesByCountry(filepath : const std::filesystem::path&) : NamesByCountry
|
||||
+ LoadPersonas(filepath : const std::filesystem::path&) : std::vector<UserPersona>
|
||||
+ LoadNamesByCountry(forenames_filepath : const std::filesystem::path&,\n surnames_filepath : const std::filesystem::path&) : NamesByCountry
|
||||
}
|
||||
|
||||
class JsonLoader {
|
||||
+ LoadLocations(filepath : const std::filesystem::path&) : std::vector<Location>
|
||||
+ LoadBeerStyles(filepath : const std::filesystem::path&) : std::vector<BeerStyle>
|
||||
+ LoadPersonas(filepath : const std::filesystem::path&) : std::vector<Persona>
|
||||
+ LoadNamesByCountry(filepath : const std::filesystem::path&) : NamesByCountry
|
||||
+ LoadPersonas(filepath : const std::filesystem::path&) : std::vector<UserPersona>
|
||||
+ LoadNamesByCountry(forenames_filepath : const std::filesystem::path&,\n surnames_filepath : const std::filesystem::path&) : NamesByCountry
|
||||
}
|
||||
|
||||
}
|
||||
@@ -380,7 +427,7 @@ package "Infrastructure: Data Generation" {
|
||||
interface DataGenerator <<interface>> {
|
||||
+ GenerateBrewery(location : const Location&,\n context : const LocationContext&) : BreweryResult
|
||||
+ GenerateBeer(brewery_id : uint64_t,\n location : const Location&,\n context : const LocationContext&,\n style : const BeerStyle&) : BeerResult
|
||||
+ GenerateUser(location : const Location&) : UserResult
|
||||
+ GenerateUser(city : const EnrichedCity&,\n persona : const UserPersona&,\n name : const Name&) : UserResult
|
||||
+ GenerateCheckin(user : const GeneratedUser&,\n brewery : const GeneratedBrewery&,\n timestamp : const std::string&) : CheckinResult
|
||||
+ GenerateRating(user : const GeneratedUser&,\n beer : const GeneratedBeer&,\n checkin_id : uint64_t) : RatingResult
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user