How amrl97/cdp works
This Laravel/Inertia application manages crewing contracts and the resulting compliance certificates: staff create and share contracts, crew authenticate against a contract, complete policy declarations, and certificate status reflects contract validity and declaration completion. Staff also administer policies, ranks, vessels, users, items, certificates, and audit history. The graph emphasizes the sampled contract-creation and crew-declaration behavior; several staff capabilities are represented at their controller subsystem because their individual implementations were not sampled. Relationships are limited to shown calls and model links.
Main entry points: Contract.php Contract · ContractSharingService.php Contract sharing · Certificate.php Certificate · ContractCreationService.php Contract creation
Components 19
User workflows
- Staff operations
app/Http/Controllers/Staff - Crew declarations
app/Http/Controllers/Crew/DeclarationController.php - Crew certificates
app/Http/Controllers/Crew/CertificateController.php
Compliance domain
- Policy
app/Models/Policy.php - Policy items
app/Models/Item.php - Ranks
app/Models/Rank.php - Vessels
app/Models/Vessel.php
Domain services
- Contract creation
app/Services/ContractCreationService.php - Contract sharing
app/Services/ContractSharingService.php - Access keys
app/Services/Contract/ContractAccessKeyService.php - Pending keys
app/Services/PendingAccessKeyStore.php - Policy attachments
app/Services/Policy/PolicyAttachmentService.php - Certificate status
app/Services/Certificate/CertificateStatusService.php - Certificate PDFs
app/Services/Certificate/CertificatePdfService.php
Persistent records
- Contract
app/Models/Contract.php - Certificate
app/Models/Certificate.php - Declaration
app/Models/Declaration.php - Crew and staff
app/Models/User.php
Other components
- Email service
Connections 24
- Staff operations → Contract creation: creates contracts
app/Http/Controllers/Staff/ContractController.php - Contract creation → Contract: creates
app/Services/ContractCreationService.php - Contract creation → Certificate: issues
app/Services/ContractCreationService.php - Contract creation → Declaration: generates
app/Services/ContractCreationService.php - Staff operations → Contract sharing: shares contracts
app/Http/Controllers/Staff/ContractController.php - Contract sharing → Access keys: issues keys
app/Services/ContractSharingService.php - Contract sharing → Pending keys: holds keys
app/Services/ContractSharingService.php - Contract sharing → Email service: sends email
app/Services/ContractSharingService.php - Contract sharing → Contract: updates sharing
app/Services/ContractSharingService.php - Crew declarations → Policy attachments: views attachments
app/Http/Controllers/Crew/DeclarationController.php - Crew declarations → Certificate status: refreshes status
app/Http/Controllers/Crew/DeclarationController.php - Crew declarations → Declaration: confirms declarations
app/Http/Controllers/Crew/DeclarationController.php - Crew certificates → Certificate status: checks status
app/Http/Controllers/Crew/CertificateController.php - Crew certificates → Certificate: loads certificate
app/Http/Controllers/Crew/CertificateController.php - Staff operations → Certificate PDFs: serves PDFs
- Contract → Crew and staff: belongs to
app/Models/Contract.php - Contract → Ranks: references rank
app/Models/Contract.php - Contract → Vessels: references vessel
app/Models/Contract.php - Contract → Certificate: has certificate
app/Models/Contract.php - Certificate → Declaration: has declarations
app/Models/Certificate.php - Declaration → Policy: references policy
app/Models/Declaration.php - Policy → Policy items: assigns items
app/Models/Policy.php - Certificate status → Certificate: updates status
app/Services/Certificate/CertificateStatusService.php - Certificate status → Contract: reads live status
app/Services/Certificate/CertificateStatusService.php