Skip to content

Commit

Permalink
feat: updated class Diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
cathrkri committed Apr 17, 2026
1 parent 0881467 commit 8ed9902
Showing 1 changed file with 127 additions and 0 deletions.
127 changes: 127 additions & 0 deletions helpmehelpapplication/Class_diagram.puml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8ed9902

Please sign in to comment.