6.0 Partnerships - FatinaAlTaherr/HopeConnect GitHub Wiki
Overview
The Partnership Management System facilitates relationships between HopeConnect and various partner organizations (NGOs, charities, corporations) that support orphanages. It handles partner registration, verification, and tracking of partnership details.
Models
Partner
Core entity representing a partner organization.
- Attributes:
id
: Unique identifier (auto-generated)name
: Organization namecontactEmail
: Primary contact emailphone
: Contact phone numbertype
: Partner classification (NGO, CHARITY, etc.)supportedOrphanage
: Associated orphanage (many-to-one)partnershipStartDate
: When partnership began (auto-set)updatedAt
: Last modification timestamp (auto-updated)verified
: Verification statusverificationDocumentsUrl
: Storage link for verification docs
PartnerType (Enum)
Classification of partner organizations:
NGO
CHARITY
HUMANITARIAN_ORG
CORPORATE_SPONSOR
INDIVIDUAL
DTOs
PartnerDTO
Data Transfer Object for partner information.
- Fields:
- All Partner fields
orphanageSummary
: Nested DTO with orphanage details
OrphanageSummaryDTO
Condensed orphanage information.
- Fields:
id
,name
,email
,location
Services
PartnerService
Core partnership business logic.
- Key Methods:
createPartner()
: Registers new partner with email notificationverifyPartner()
: Admin verification with document storagegetPartnersByType()
: Filters by partner classificationgetPartnersByVerificationStatus()
: Filters by verification stategetPartnersByOrphanage()
: Finds partners supporting specific orphanagemapToDTO()
: Converts Partner to PartnerDTO
Controllers
PartnerController
Handles all partnership-related HTTP requests.
- Endpoints:
GET /partners/type/{type}
: Lists partners by typeGET /partners/status/verified
: Lists verified partnersGET /partners/status/pending
: Lists pending partnersPOST /partners
: Creates new partnershipGET /partners/orphanage/{orphanageId}
: Lists orphanage's partnersPUT /partners/{id}/verify
: Verifies partner (admin)
Workflows
Partner Registration
- Organization submits partnership request
- System sends document request email
- Admin reviews and verifies with documents
- Partner appears in verified listings
Verification Process
- Admin accesses pending partners list
- Reviews submitted documents
- Updates verification status
- System records verification proof
Orphanage Matching
- Orphanage views potential partners
- Filters by partner type/status
- Initiates partnership contact
Email Notifications
- Registration Confirmation:
- Sent to new partners
- Contains document submission instructions
- Verification Alerts:
- Coming soon feature
- Will notify upon verification completion
Security Considerations
- Verification endpoint requires admin privileges
- All endpoints require authentication
- Sensitive documents stored securely
- Audit trails for verification changes
Example Payloads
Partner Creation Request
{
"name": "Helping Hands NGO",
"contactEmail": "[email protected]",
"phone": "+1234567890",
"type": "NGO",
"supportedOrphanage": {
"id": 1
}
}