From 8ed9902391f0f79f66400e4b3f6395e12a83a842 Mon Sep 17 00:00:00 2001 From: cathrkri Date: Fri, 17 Apr 2026 16:14:11 +0200 Subject: [PATCH] feat: updated class Diagram --- helpmehelpapplication/Class_diagram.puml | 127 +++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 helpmehelpapplication/Class_diagram.puml diff --git a/helpmehelpapplication/Class_diagram.puml b/helpmehelpapplication/Class_diagram.puml new file mode 100644 index 0000000..771ac72 --- /dev/null +++ b/helpmehelpapplication/Class_diagram.puml @@ -0,0 +1,127 @@ +@startuml +skinparam classAttributeIconSize 0 + +' ====================== +' CONTROLLERS +' ====================== +package "Controllers" { + class OrganisationController { + +getAll() + +getById(id) + +search(query) + } + + class DonationController { + +createDonation() + +confirmDonation() + } + + class AuthController { + +login() + +register() + +logout() + } +} + +' ====================== +' SERVICES +' ====================== +package "Services" { + class OrganisationService { + +getOrganisations() + +getOrganisationDetails() + +searchOrganisations() + } + + class DonationService { + +createDonationIntent() + +confirmDonation() + } + + class AuthService { + +authenticate() + +createUser() + } + + class ScraperService { + +fetchFromAPI() + +enrichData() + } +} + +' ====================== +' REPOSITORIES +' ====================== +package "Repositories" { + class OrganisationRepository { + +findAll() + +findById() + +search() + } + + class DonationRepository { + +save() + +findByUser() + } + + class UserRepository { + +findByEmail() + +save() + } +} + +' ====================== +' MODELS / ENTITIES +' ====================== +package "Models" { + class Organisation { + id + name + description + category + imageUrl + } + + class Donation { + id + amount + userId + organisationId + createdAt + } + + class User { + id + email + passwordHash + } +} + +' ====================== +' RELATIONSHIPS +' ====================== + +' Controller -> Service +OrganisationController --> OrganisationService +DonationController --> DonationService +AuthController --> AuthService + +' Service -> Repository +OrganisationService --> OrganisationRepository +DonationService --> DonationRepository +DonationService --> OrganisationRepository +AuthService --> UserRepository + +' Service -> External logic +OrganisationService --> ScraperService + +' Repository -> Model +OrganisationRepository --> Organisation +DonationRepository --> Donation +UserRepository --> User + +' Model relations +Donation --> User +Donation --> Organisation + +@enduml \ No newline at end of file