PMS architecture and ERD — version 1

Proposed design for owner review · companion of docs/architecture/architecture-design-proposal-v1.md · 2026-10-18

1. System context and trust boundaries

One central web application used by ship crews and shore staff of one company (ADR-01, ADR-02). Users reach it over the internet with TLS; the hosting party runs the infrastructure but has no business role; a company-held anchor store sits outside the hosting party's reach so that log tampering is detectable.

System context: users, the PMS, external systems and trust boundariesTB-4 Hosting boundary · H3 recommended (ADR-15, UD-01)Ship ranks (P.I.C.)2/E 3/E 4/E E/L C/O 2/O 3/O ·desktop; phone for photos (Q-37a)Chief Engineer · MasterLevel-1 approval, own vessel(Q-14 b, UD-11)Shore department headLevel-2 approval, vessels inscope (Q-14 b)Final approverLast approval level (Q-17 b)Web administratorUsers, configuration, import;logs read-only (TB-3, decision4)Company log requesterRequests log and full-dataexports (decision 4, UD-12)TB-1 Internet · TLSPMS web application — one central installation (ADR-01)Modular monolith M01–M17 (ADR-03) · vessel boundary on every request,list, report and export (TB-2) · one scheduling definition (NFR-PMS-010)· approval chains (ADR-07) · business audit trail and security log,hash-chained (ADR-11) · optional modules switchable (ADR-13) · bilingual(ADR-16)PostgreSQLschemas pms + audit ·point-in-time recovery (ADR-04)Object storagefiles, log segments · versioned(ADR-12)Hosting operator — no business role in the applicationDatabase access is outside the app; alteration of anchored log entries isdetected through the company-held anchor (TB-4, R-009, UD-22)Company-held anchor storeTB-5 · daily chain heads · holder open(FQ-23)Backup storageSeparate account or location · WAL archive,base backups, replicas (FL-11)E-mail relayOnly with notifications M15 (FL-13)OPTIONALIdentity provider (OIDC)Possible later; not needed now (ADR-05)OPTIONALNTP time sourceAudit timestamps in UTC (8.4)SMA / other systemsNot connected (Q-24, NFR-PMS-025)daily anchor (FL-10)WAL stream (FL-11)notificationsOIDC (later)timeTB-6 Environments: development (synthetic data) · verification (isolated; real copies only under Q-38 conditions) · production
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

Trust boundaries

BoundaryBetweenControls
TB-1 InternetBrowsers on ship and shore networks, and phones; the applicationTLS only; authentication on every function (NFR-PMS-016); rate limits on sign-in; MFA for administrators and shore approvers
TB-2 VesselOne vessel's data and another'sVessel scope checked on every request, list, report and export (ENG-14); composite foreign keys; row-level security as a second line (ADR-06)
TB-3 Application administratorWeb administrator and operational usersSeparate system roles; administrators do not approve maintenance; every administrator action in the security log (ENG-34)
TB-4 HostingThe application and whoever operates the database and hostsNo application function can alter logs; database roles without UPDATE or DELETE on log tables; the anchor held by the company detects alteration of anchored entries by anyone with database access (ADR-11; UD-22, UD-23)
TB-5 Company-held anchorThe hosting party and the companyThe anchor store is outside the hosting party's control (FQ-23)
TB-6 EnvironmentsProduction and verification or developmentNo production credentials, data or channels in other environments unless Q-38's conditions are met (testing policy §12)

Users

User (position or role)WhereMain tasksEvidence
Engine officers (2/E, 3/E, 4/E, E/L) and deck officers (C/O, 2/O, 3/O), as P.I.C.Ship; desktop; phone for photographsSee their due work; record completions with evidence; enter running hoursDATA-PMS-006; Q-04 b; Q-37 a; journeys J1–J3
Chief Engineer (and Master for deck work, UD-11)Ship; desktopFirst approval level; review the vessel's plan; request extensions; propose task changesQ-14 b, Q-17 b; FQ-28
Shore department head (technical superintendent)Office; desktopSecond approval level for the vessels in scope; fleet overviewQ-14 b ("trưởng bộ phận")
Final approverOffice; desktopLast approval levelQ-14 b, Q-17 b
Web administratorOffice (company and/or delivery side, UD-12)Vessels, users, positions and assignments; configuration; import; read-only access to the audit and security logs; exports on company requestOwner decisions 4, 6; NK-4, NK-6
Company log requesterCompanyAsks for log or full-data exportsOwner decision 4; NK-4 b blank (UD-12)
Hosting operatorOutside the applicationRuns the infrastructure and database backups; has no business role in the applicationENG-34; R-009

2. Application architecture

A modular monolith: one codebase, a web process and a background worker, one PostgreSQL database and one object store (ADR-03, ADR-04). Arrows point from a module to the module it depends on. Optional and provisional modules depend on the core, never the reverse (NFR-PMS-011).

Application architecture: modules, layers and key dependenciesPresentation (server-rendered pages + JSON endpoints, same authorisation path)Desktop pagesmonitoring, recording, approvals,reports, administrationJSON endpointsinteractive grids, approvals, uploads(/api/v1)Phone capture pagesphotograph to an open work order (J2)Background worker (same codebase)anchors, integrity checks, segments,recompute, exportsApplication services: authorise (ADR-06) · check vessel scope · validate · idempotency key · one transaction per command (11.3)Optional and provisional modules — depend on the core, never the reverse (NFR-PMS-011, ADR-13)M13 DefectsOPTIONALM14 Event-basedOPTIONALM15 NotificationsOPTIONALM16 DocumentsOPTIONALM17 MaterialsPROVISIONALM08 Monitoring & reportsviews, staged warnings, M008, exportsM06 Work executionwork orders, extensions, risk assessments,correctionsM10 Importvalidation-only, load, provenanceM05 Scheduling engineone definition; policy versions (ADR-09)M07 Approval workflowchains, requests, decisions (ADR-07)M04 Running hourscounters, readings, events (ADR-10)M03 Equipment & plantree, groups, tasks, limits, task changesM01 Identity & accessaccounts, positions, assignments, rolesM09 Filesupload checks, storage, links (ADR-12)M02 Organisationcompany, vessels, departmentsM12 Configurationmodule switches, value lists, i18nM11 Audit & security logwriter, chains, anchors, viewer (ADR-11)due pointsrecompute on closeapproval requestsreading at completionlimitsreadingsposition & scopeload readingsvesselsecurity eventsmaterial use only (interface)defect from work orderPersistencePostgreSQL · schema pms (business tables)vessel_id on every operational row; composite keys; row-level security (4.4)schema audit (append-only)audit_entry · security_event · chains ·anchorsObject storagefiles · log segmentstriggers (FL-9)
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

Modules

ModuleResponsibilityOwns (section 5)Depends onStatus
M01 Identity and accessSign-in, MFA, sessions, accounts, positions, assignments, roles, permissions, scope evaluationArea AM12Core
M02 OrganisationCompany, vessels, departmentsCompany, Vessel, DepartmentM12Core
M03 Equipment and planEquipment tree, groups, tasks, limits, task changes, templates linkArea BM02, M01, M07Core
M04 Running hoursCounters, readings, counter events, rate estimationRunningHourCounter, CounterReading, CounterEventM03, M07Core
M05 Scheduling engineThe one definition of due points and statuses (NFR-PMS-010); policy versions; schedule projection; warning stagesSchedulingPolicy, TaskScheduleStateM03, M04 (read interfaces). The last closed execution and any active extension are passed in by M06 when it calls M05, so there is no cycleCore; rules pending signed examples
M06 Work executionWork orders, execution data, extension requests, risk assessments, correctionsWorkOrder, DueExtension, RiskAssessment, CorrectionRequestM03, M04, M05, M07, M09Core
M07 Approval workflowChain definitions and versions; approval requests and decisions; separation-of-duties rulesApprovalChain, ApprovalStep, ApprovalRequest, ApprovalDecisionM01Core
M08 Monitoring and reportsMonitoring view, in-app staged warnings, monthly plan, history, uncompleted and overdue list, Form M008 for all groups (RPT-PMS-001 to 003, 010, 011); the further documented report groups (overdue analysis, critical, KPI; RPT-PMS-004 to 009) laterExportRecord (reads others)M05, M06, M01Core
M09 FilesUpload checks, storage, authorised download, linksStoredFile, AttachmentLinkM01Core
M10 ImportWorkbook parsing, validation-only runs, mapping, complete-or-nothing load, reversal, provenanceImportBatch, ImportIssueM02, M03, M04, M06, M09Core
M11 Audit and security logLog writer function, chains, anchors, integrity checks, log viewer, log exportArea H— (lowest layer)Core
M12 ConfigurationModule switches, value lists, i18n resources, settingsModuleSetting, ValueListItemM11Core
M13 Defects and unplanned workOptional moduleDefectM06Optional
M14 Event-based maintenanceOptional moduleMaintenanceEvent, EVENT limitsM03, M05Optional
M15 NotificationsOptional e-mail moduleNotificationMessageM05, M01Optional
M16 DocumentsOptional controlled documentsControlledDocument, DocumentRevisionM09, M07Optional
M17 Materials and storesProvisional moduleArea FM06 (work-order interface only), M07Provisional

Data flows

FlowPathTransaction and integrity
FL-1 Interactive command (for example, submit a completion)Browser → TLS → web process → application service (authorise, check scope, validate, idempotency key) → database transaction (business rows + audit entries by trigger) → responseOne transaction per user action; a retry with the same key returns the first result (NFR-PMS-022, 026)
FL-2 Query (monitoring view)Browser → web process → read model (tasks, schedule projection, open work orders, counter values) filtered by scope → status evaluated by M05 for today's vessel dateNo writes; nothing to audit
FL-3 File uploadPhone or desktop → web process (type and size check, fingerprint, optional scan) → object storage (private bucket, content-addressed key) → StoredFile + AttachmentLink in the databaseFile stored before the database commit; an orphaned object (commit failed) is reported by a sweep and kept, never served (no deletion, IN-13)
FL-4 File downloadBrowser → web process (entitlement to the owning record) → short-lived signed URL or streamed response → security eventNo direct public object URLs
FL-5 Reading entryBrowser → M04 (validation BR-PMS-017, confirmation step) → CounterReading → M05 recompute for the tasks on that counter → TaskScheduleStateOne transaction; at most a few hundred tasks per counter
FL-6 ApprovalApprover → M07 (position held, scope, separation of duties) → ApprovalDecision → subject transition; on the final step M06 closes the work order and M05 recomputes the taskOne transaction
FL-7 ImportAdministrator uploads workbook → StoredFile → M10 parse (no macros, no recalculation) → staging → validation-only report (ImportIssue) → sign-off → load as one transaction → provenance and one creation entry per record (P-19)Complete-or-nothing (NFR-PMS-030); reversal (NFR-PMS-031)
FL-8 ExportUser or administrator → M08 query within scope → file → StoredFile + ExportRecord (manifest) → security event → downloadLog and full-data exports require a company request reference (owner decision 4)
FL-9 Audit captureEvery write to an audited table → database trigger → log writer function → AuditEntry (chain head locked, hash computed)Same transaction as the change (P-17)
FL-10 Log protectionWorker, hourly → copies new log entries as signed segments to versioned object storage; daily → IntegrityAnchor to the company-held store; daily → full chain verification → security eventDetects alteration, removal, insertion and gaps (AC-5)
FL-11 BackupDatabase write-ahead log streamed continuously to backup storage; daily base backup; object storage versioning and replicationPoint-in-time recovery (R2)
FL-12 Operational logsWeb and worker processes → structured lines to the platform log collector → bounded retentionNo business values, no secrets (ENG-26)
FL-13 Optional notificationWorker → NotificationMessage → e-mail relayOnly with M15 enabled

Devices and tasks

DeviceTasksEvidenceStatus
Desktop or laptop browser, ship and shoreAll functions: monitoring, recording, approvals, planning, reports, administrationQ-37 a ("chỉ trên máy tính")INPUT
Phone browser (no app)Take and attach photographs to an open work order (J2); view "my open work orders"; possibly enter a reading ("các thao tác dùng điện thoại")Q-37 a; Q-33Photo capture INPUT; other phone tasks TA (UX-G1)
TabletSame as desktop, responsive—Not stated; supported by responsive layout

3. Entity relationship model

56 entities in 8 subject areas (36 core, 14 provisional, 5 optional module, 1 derived) and 97 relationships. Generated from the same model file as section 5 of the proposal. Choose an area, then select an entity for its keys, attributes, constraints, lifecycle, audit relevance and evidence. Actor columns (…_by → UserAccount) are listed in the boxes but drawn only where UserAccount appears.

Select an entity in a diagram, or a name in the overview, to open its details. Press Escape to close them.

ERD overview: subject areas and their entities A. Organisation, identity and access Company Vessel Department UserAccount Credential Position PositionAssignment AssignmentVessel Role Permission RolePermission PositionRole UserRoleGrant B. Equipment and maintenance plan PmsGroup EquipmentNode TaskTemplate MaintenanceTask TaskLimit TaskChangeRequest C. Running hours and scheduling RunningHourCounter CounterReading CounterEvent SchedulingPolicy TaskScheduleState DueExtension D. Work orders and approvals WorkOrder ApprovalChain ApprovalStep ApprovalRequest ApprovalDecision RiskAssessment CorrectionRequest E. Optional modules and configuration ModuleSetting ValueListItem Defect MaintenanceEvent ControlledDocument DocumentRevision NotificationMessage F. Materials and stores (provisional module) MaterialItem StoreLocation VesselStockItem StockMovement MaterialRequest MaterialRequestLine WorkOrderMaterialUse G. Files, import and export StoredFile AttachmentLink ImportBatch ImportIssue ExportRecord H. Audit trail and security log LogChain AuditEntry SecurityEvent IntegrityAnchor LogArchiveManifest
CoreProvisionalOptional moduleDerived (recomputable)Entity of another area (click to open)Crow's foot: ┤├ exactly one · o┤ zero or one · o< zero or many · ┤< one or many (symbol next to an entity = how many of it per one of the other)

Provisional relationships and entities

ItemWhy provisionalDecided byEffect if it changes
GROUP 0 mapping (task → equipment)2a or 2b (OD-2, UI-10)Owner (UD-10)Import mapping only; schema unchanged
Job key (vessel, group, job code)Q-11 b "likely unique vessel-wide" conflicts with the files (317 codes repeat across sheets)Owner, then company (FQ-08)A unique index changes
TaskTemplate linkT2 staged (IB-16)OwnerTemplate maintenance added later
CounterEvent, reading entry_formQ-04 b, c unclearCompany (FQ-04)Input format and procedure only
DueExtension effect and limitsFQ-10CompanyPolicy parameters
RiskAssessment gate and contentQ-16 delegated; safety-relevantOwner proposes; company confirms before go-live (UD-06)Gate parameter; form fields
CorrectionRequestDisabled until enabled (Q-04 d)Owner and company (UD-04)None structurally
SchedulingPolicy valuesIB-1 to IB-5Company signs examples (UD-03)New policy version
Area F (materials)Extent unknown; no data (Q-21)Company, then owner (UD-07)Module added or reduced
WorkOrder holding execution dataQ-17 c "for now 1"CompanySplit into two tables is a planned migration (D13)
TaskScheduleState not auditedDerived; P-4 proposed auditing recalculated due pointsOwner (UD-14)If audited, recomputation writes entries (volume)
WorkOrder.measurements (jsonb)Structured checklists and measurement parameters are documented but have no source data (5.12)Owner, then companyA child table replaces the column
Defect.blocks_origin_closeQ-19 c asks for flexibility (R1 or R2)Company (FQ-12)Default value only
Dual control (confirmed_by)Administrative safeguard proposed by this designOwner (UD-25)Columns unused if not adopted
LogChain.epoch, LogArchiveManifestRestore and archive handling (8.7, 8.8)Owner (UD-26)Procedure only

4. Authorisation, ranks, scope and approval authority

Personal accounts; rights follow the position (rank) a person holds on a vessel for a dated period (ADR-05, ID-B). An action is allowed only if all five checks pass; the default is deny (ADR-06). The matrix below is a provisional default, held as configuration and confirmed with the company before go-live (UD-11).

Authorisation: persons, positions, roles, scope and approval authorityUserAccounta named person · MFA foradmins and approvers(ADR-05)PositionAssignmentposition · vessel (shipside) · valid_from /valid_to · scope OWN / ALL /LISTEDPosition (rank)C/E, 2/E, … C/O · shore head· final approver ·department · sideRole (OPERATIONAL)permission bundle carried bya position (PositionRole)Permission codeswo.record · wo.approve ·reading.enter · audit.view …holdsofcarriesgrantsUserRoleGrantsystem roles: webadministrator, importoperator; dated; noself-grantAssignmentVesselvessels a LISTED shoreassignment coversDepartmentENGINE · DECK · SHORE (datascope, NFR-PMS-002)Role (SYSTEM)never attached to a position(TB-3)direct grantLISTED scopedepartmentAccess decision — deny by default (4.3)1 Permission in a role held now (via an active assignment or grant)2 Vessel scope: ship = own vessel; shore = all or LISTED vessels3 Department scope where the permission is department-bound4 Record state allows the action (e.g. no edit of a CLOSED work order)5 Separation of duties: approver ≠ performer or requester; no self-grantOut of scope → 'not found' · forbidden → 'not permitted' + security eventApprovalChainprocess type ·department · vesseloverride · version(ADR-07)ApprovalSteplevel k · requiredposition · SAME_VESSEL/ SHORE_SCOPEApprovalDecisionby a person, under theacting assignment · ≠performerdecided atrequired positionAdministrator boundary (TB-3)Web administrator accounts hold no operational position · cannot approve maintenance ·cannot edit or delete log entries · every action in the security log (ENG-34)
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

How the parts relate

ConceptEntitiesEvidence
Who the person isUserAccount, CredentialNFR-PMS-016; NK-3
What rank they hold, where and whenPositionAssignment, AssignmentVesselQ-32 b; Q-14 b
What a rank may doPositionRole, RolePermission (matrix as configuration)Q-14 a, b delegated; reassessment §10
System powersUserRoleGrant with system rolesNFR-PMS-017; owner decision 4
Who approves each levelApprovalChain, ApprovalStepQ-14 b, Q-17 b

Proposed default permission matrix (provisional, UD-11)

Permission groupShip ranks (P.I.C.)Chief Engineer / MasterShore department headFinal approverWeb administrator
View plan, history and reports of the vessel(s) in scopeOwn vesselOwn vesselScoped vesselsScoped vesselsAll (read)
Record completion; attach evidenceOwn vessel, own departmentOwn vessel———
Enter running hoursEngine ranks, own vesselOwn vessel———
Approve completion—Level 1, own vessel and departmentLevel 2, scopedLast level—
Request extensionOwn vesselOwn vessel———
Approve extension—Level 1Level 2Last level—
Propose task change or new task—Own vesselScoped vessels——
Approve task change——Level 1 (shore)Last level—
Correction of a reading or closed record (when enabled)—RequestApproveApprove—
Users, assignments, roles, vessels, configuration, import————Yes (no approval powers)
View and export audit and security logs————Yes, export only with a company request reference (owner decision 4)

5. Maintenance job lifecycle and approval transitions

A work order holds the execution record for now (Q-17 c). Approval levels run on an ApprovalRequest for the configured chain (ADR-07). There is no deferral; an extension is a separate approved record (Q-15, ADR-08). States marked provisional depend on open decisions.

Maintenance job lifecycle and approval transitionsOPENdue snapshot; P.I.C.assignedIN_PROGRESSonly where a start gateapplies (UD-06)PROVISIONALSUBMITTEDapproval level k of n(ApprovalRequest)CLOSEDimmutable; Next Due fromperformed_onRETURNEDreason recordedCANCELLEDonly before submissionstart (risk assessment approved)submitsubmit: mandatory fields, reading, confirmationapprove level k < napprove last levelreturn with reasonresubmit → new request from level 1cancel with reasoncancel with reasonImport(HISTORICAL_IMPORT)loaded directly as CLOSED(P-19)Correction (proposed; off by default,UD-04)approved CorrectionRequest adds an amendmentoverlay; the closed row is unchanged; Q-17 dvs BR-PMS-007 openPROVISIONALDueExtension (replaces deferral, Q-15; ADR-08)DRAFTPROVISIONALPENDINGPROVISIONALAPPROVEDPROVISIONALLAPSEDPROVISIONALREJECTEDPROVISIONALWITHDRAWNPROVISIONALApproval chain example — configurable (UD-11)Performership rankLevel 1C/E or Master,same vesselLevel 2shoredepartmentheadLast levelfinal approverThe performer never approves; each decision records the acting assignment
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

Work order transitions

FromEventToGuardEffects
—Task enters its first warning stage or becomes overdue (system), or a permitted user opens oneOPENNo other open work order for the task; task ACTIVEDue snapshot stored; P.I.C. position assigned (FR-PMS-009)
OPENStartIN_PROGRESSOnly where a start gate applies; an APPROVED risk assessment if the gate is BEFORE_START (UD-06)—
OPEN, IN_PROGRESS, RETURNEDSubmitSUBMITTEDMandatory fields (OD-6); performed_on ≤ today (BR-PMS-018); the reading for hour-limited tasks; the confirmation step; risk assessment if the gate is BEFORE_SUBMITA reading is created with source = WORK_ORDER where given; an ApprovalRequest is opened on the active chain for the department
SUBMITTEDApprove at step k < nSUBMITTEDM07 guards (position, scope, separation of duties)Request moves to step k+1
SUBMITTEDApprove at the last stepCLOSEDAs aboveThe row becomes immutable; M05 recomputes Last Done and Next Due under the policy in force (with the default basis, from performed_on, not the approval date)
SUBMITTEDReturn at any step, with reasonRETURNEDReason required (FR-PMS-014)The request ends RETURNED; a resubmission opens a new request from step 1
OPEN, RETURNEDCancel, with reason (proposed; no source names a cancelled state)CANCELLEDPermission held by C/E or shore; never after submissionTask's next work order may open
CLOSEDCorrection (proposed; off by default)CLOSEDApproved CorrectionRequestAmendment overlay; the closed row is unchanged. Q-17 d ("Không thay đổi được") has no exception; BR-PMS-007 and [PMS] 4.11 document correction with audit; the conflict stays open (UD-04)

Other approval subjects

SubjectStatesEffect of approval
DueExtensionDRAFT → PENDING → APPROVED or REJECTED or WITHDRAWN; APPROVED → LAPSED when the job closes or the extended point passesThe approved point governs this cycle's status. An extension marker is shown, not a "Deferred" status (OD-1). Under the LAST_COMPLETION basis the next cycle counts from the actual completion
TaskChangeRequestDRAFT → PENDING → APPROVED or REJECTED or WITHDRAWNThe task is updated (revision +1) in the same transaction; M05 recomputes
RiskAssessmentDRAFT → SUBMITTED → APPROVED or RETURNEDOpens the gate of its work order
CorrectionRequestPENDING → APPROVED or REJECTEDA superseding reading or an amendment overlay; M05 recomputes
CounterEventPENDING → APPROVED or REJECTEDA new counter segment begins; validation of later readings uses it

6. Audit-log flow: business audit trail, security log, operational log

Three separate concerns (ADR-11, owner decisions 1–7). The two audit chains are append-only and hash-chained in the database, copied hourly to versioned storage and anchored daily in a store the company holds. No application, administrator or migration role can update or delete an entry; the hosting operator cannot alter one undetected.

Audit-log flow: business audit trail versus security and operational logsBusiness audit trail · owner decisions 1–3, 5, 7Security-monitoring log · owner decision 6Operational diagnostic log · NFR-PMS-034, ENG-26Business commandone transaction (FL-1)Database triggerbefore/after per field;masking (8.6)Log writer functiondefiner rights; locks chainhead; SHA-256audit.audit_entryappend-only · gap-free sequence· hash chainWeb administratorread-only view and search(decision 4)Access and control eventssign-in, permission change,import, export, attachments,log accessSecurity servicesauthentication, adminactions, exportsLog writer functionsame mechanism, own chainaudit.security_eventappend-only · own chainWeb administratorread-only; exports on request(decision 6)Web and worker processesrequest id for correlationStructured log linesno business values, nosecretsPlatform log collectorbounded retention (UD-13);not immutableDelivery lead · operatorfault findingNo UPDATE / DELETE / TRUNCATE for app, admin or migration rolesHourly segmentsnew entries copied to versioned objectstorage (FL-10)Daily anchorchain heads to the company-held store(TB-5, FQ-23)Daily integrity checkchain, gaps, anchors → security event +alertCompany-requested exportmanifest: scope, counts, seq range,hashes (P-18)request ref requiredBusiness history users need stays visible in the business records themselves (P-3); the audit trail is the additional administrator-only record.
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

The three logs

Business audit trailSecurity-monitoring logOperational diagnostic log
PurposeWho changed which business record, when, from what to what (owner decisions 1–3)Access and control events (owner decision 6)Fault finding and service health (NFR-PMS-034; ENG-26)
StoreAuditEntry in the audit schema, own chainSecurityEvent in the audit schema, own chainPlatform log collector, outside the database
Written byDatabase trigger and log writer function, in the business transactionApplication security services and the log writer functionWeb and worker processes
ValuesBefore and after per field, masking per 8.6Event detail; never passwords, tokens or file contentNo business field values and no secrets; identifiers are allowed (account, record, request id), as NFR-PMS-034 needs
ReadersWeb administrator only (owner decision 4); exports on company requestWeb administrator (owner decision 6); exports on requestDelivery lead and the operator, unless the owner extends decision 4 to this log (UD-13)
RetentionPermanent (decision 5)Permanent (decision 5, applied by the owner's NK-6 agreement)Bounded; values open (UD-13)
IntegrityAppend-only; hash chain; anchors (decision 7)SamePlatform protections only

Access and the administrator boundary

ActorCanCannot
Operational usersSee business history of records in scopeOpen the audit or security log (owner decision 4)
Web administratorView and search both logs (read-only); export with a company request reference; see integrity statusEdit, delete or reorder an entry: no function exists, and the application's database role has no UPDATE or DELETE on log tables. Approve maintenance. Disable logging
Application database roleCall the log writer function (INSERT through a definer-rights function)UPDATE, DELETE or TRUNCATE on audit.*
Release and migration roleSchema changes through the reviewed release pipeline; who reviews the pipeline is an owner decision (UD-25)Rewrite log rows through the application; a structural change carries logs unchanged (P-16). It technically could disable triggers: detected, not prevented (8.2)
Hosting operator or database superuserTechnically could alter, remove or insert rows, or disable captureAlter anchored entries undetected. Entries written since the last anchor are protected only by the hourly segments, which sit in hosting-controlled storage; a superuser can recompute an unanchored chain. Shorter anchor intervals and a company-side verifier narrow this window (UD-23)

7. Deployment, persistence, backups and recovery

A portable deployment (containers, standard PostgreSQL, S3-compatible storage, infrastructure as code). H3 is the proposed hosting model and recovery tier R2 the proposed minimum; both are owner decisions with the company's acceptance of cost and values (UD-01). High availability is not assumed (NFR-PMS-033).

Deployment and recovery: hosting, persistence, backups and the recovery pathProduction — company's own cloud account, operated by the delivery side (H3, ADR-15; UD-01)TLS reverse proxyweb application firewallrules if offeredWeb process ×1–2rolling updates; no HAassumed (NFR-PMS-033)Worker ×1anchors, checks, segments,recompute, exportsPostgreSQL (managed)private network · continuous WALarchiving · point-in-time recovery (R2)Object storageprivate · versioned · signedshort-lived URLsSecrets storecredentials outside code(NFR-PMS-035)Log collector · metrics · alertsoperational logs, bounded retentionBackup storage — separate account or locationWAL archive + daily base backupscandidate: 35-day window, monthly copies 12 months(owner proposes)Object replicassecond location; versions keptLog segmentsversioned; object lock optional (I3; UD-21)Company-held anchor store (TB-5)outside the hosting party's reach · holder open (FQ-23)WAL streamdaily anchorDevelopmentsynthetic data onlyVerificationisolated; real copies only under Q-38 conditions, masked(testing policy §12)Productionidentified releases; withdrawable (NFR-PMS-023)Recovery path (9.4, 8.8)1Detect (alert,integrity check)2Maintenance page;paper fallback (Q-35d)3Restore DB to a pointin time4Verify chains againstanchors5Record RESTORE_GAP(security log)6Back-enter from paper:two times7Resume; notify thecompany
Core componentProvisionalOptionalExternal or platformControl or decision point— solid arrow: synchronous call · - - dashed: asynchronous or worker · ··· dotted: optional

Hosting options

H1 Company premisesH2 Delivery side hostsH3 Company's own cloud account, operated by the delivery side
Custody of data and logs (Q-36 c)CompanyDelivery side; exit needs a contract (NFR-PMS-028)Company
Who can reach the database (TB-4)Company ITDelivery staffDelivery operators, under the company's account
Anchor holder independence (R-009)NaturalNeeds a company-held anchorNatural, if the anchor store is in a separate company area
Reach from shipsNeeds an internet-facing endpoint or VPN (BWT_VPN_Connect.rar was listed but is absent; UNKNOWN)Internet-facingInternet-facing
24-hour operation (Q-35 a)Company IT and its linkDelivery side support commitmentDelivery side support under the company's account
Managed PostgreSQL with point-in-time recovery, object storage with versioningMust be built and operatedAvailableAvailable
Lock-inLowHighMedium (portable build)

Backups

AssetMechanismProposed candidate values (for the owner's proposal to the company; not targets)
DatabaseContinuous write-ahead-log archiving with point-in-time recovery, daily base backups, encrypted, stored outside the production account or zoneRecovery window 35 days; monthly copies kept 12 months
FilesObject storage versioning; replication to a second locationVersions kept permanently (no deletion)
Log segmentsVersioned object storage (optionally object-locked)Permanent
Configuration and infrastructureInfrastructure as code in the repository; secrets in the platform secrets store with its own backup—

Integrity checks

CheckFrequencyFailure handling
Audit and security chain verification against anchorsDaily; before every log export; after every restoreSecurity event, alert, runbook
Database constraint and reference verification (orphans, composite-key consistency)Weekly, in a read-only jobOperational alert; investigation
Object storage: every StoredFile has its object with a matching fingerprintWeekly sample, full monthlyOperational alert
Schedule projection rebuilt from inputs and comparedWeekly sampleDefect: the derived data disagrees with the rule
Restore rehearsalBefore go-live; then on a scheduleRestore report (ENG-25)

8. Decisions, assumptions, blockers and risks

Every table here is taken from the proposal. Inputs are owner-confirmed company answers (handoff §0.14); ADRs are recommendations awaiting the owner; assumptions are temporary; unresolved decisions name what they block.

Unresolved decisions

IDDecisionBlocksDecided by (role)Latest momentRecommendation
UD-01Hosting model (H1, H2, H3), recovery tier and RPO and RTO values, end-of-service custodyOrdering production; G4 at the latestOwner proposes; company accepts cost and valuesBefore the production environment is orderedH3; R2 minimum (ADR-15)
UD-02Acceptance of the identity model ID-B, which reads "Quản lý theo chức danh" as rank-based rights rather than shared rank loginsG1 (identity ADR)Owner (model); company confirms the reading (NFR-PMS-016)G1ID-B (ADR-05)
UD-03Scheduling rules: basis, month length, quarter and year, first due, hour mode, warning stages and their source, time zoneProduction code of M05 and M08Company authority signs worked examplesG0 of the scheduling incrementTA-01 defaults
UD-04Corrections: enabled or not; who requests and approvesEnabling the correction functionOwner and companyBefore go-liveBuilt, disabled; senior approval
UD-05Extension rules: effect, limits, critical jobs, lapseExtension featureCompany (FQ-10)G0 of the work-order incrementTHIS_DUE_ONLY; critical extensions require the last level
UD-06Risk-assessment trigger, gate, approver, contentRisk-assessment feature; go-liveOwner proposes (OD-5); company confirmsBefore go-live (safety)BEFORE_START for critical tasks
UD-07Materials extent (levels 1–4) and the source of materials dataM17Company, then owner (FQ-14)Before M17 designLevel 1 first
UD-08Data that must not be logged (NK-2 b); masking ruleFirst production audit entryCompany, then ownerBefore the first production entryClassification of 8.6
UD-09Workbook to load; treatment of typed Last Done values and anomalies; who signs offImport load (G4)Owner position (O-06), then companyG4Decide with FQ-07, FQ-15
UD-10GROUP 0 mapping; job key; equipment code ruleImport mappingOwner proposes; company confirms (FQ-08)Before load design2a; (vessel, group, job code); OD-3
UD-11Approval levels per process and department; office position titles; deck chain through the MasterGo-live configurationCompany (FQ-28)Before go-liveExample chains of 6.3
UD-12Who holds the web administrator role (company, delivery side, both) and who may request exports (NK-4 b)Threat model; G5Owner and companyG1 for the threat modelNamed persons on both sides; company requester list
UD-13Operational log: retention, who may read it, and whether decisions 4, 5 and 7 cover itObservability design; NFR-PMS-034 merged viewOwnerG5Bounded retention; not immutable; delivery lead and operator read it
UD-14Exclusions from the business audit trail: the derived schedule projection, sessions, caches, notification delivery statusAudit designOwnerG1Exclude (sections 7.4, 8.2)
UD-15Supported devices, screen sizes, browsers; accessibility referenceUX-G1Owner (O-13)UX-G1WCAG 2.2 AA as internal reference
UD-16Which parts are bilingual; Vietnamese names for master dataUX-G1; data model detail (name_vi)Company (FQ-19)UX-G1Switchable interface; optional Vietnamese names
UD-17Optional modules: built now and hidden, or built on requestBuild planOwner, then company (FQ-20)Build planningOn request
UD-18Programming language, framework and librariesG2Delivery lead, recorded as an ADRG2Criteria: mature authentication, ORM with migrations, server-rendered pages, PostgreSQL support, team skill
UD-19Time-zone rule for business dates on boardScheduling examplesOwner proposes; company confirms (IB-15)With UD-03Vessel's zone at entry, stored with the record
UD-20Network address and device details in the security logSecurity log contentOwner (privacy)G1Record address; no device fingerprinting
UD-21Erasure route ("none" or a legal-order procedure); inline or referenced personal values in logs; legal and sector assessmentFirst production entry (the storage choice); G5 (the legal note); option I3Owner (ENG-19, ENG-33)Before the first production entryReferenced personal values (8.6); "none" as the route until a legal need appears; no I3 until decided
UD-22Detection versus prevention for the logs: accept that privileged database roles can bypass or alter, with detection (I2), or add write-once storage (I3)G1 (audit ADR)OwnerG1I2 with bypass detection (8.2)
UD-23Anchor holder at the company; anchor interval; a company-side verifier; who may change the anchor destination (FQ-23)First production entryCompany names the holder; owner decides the restBefore the first production entryDaily anchors; destination change needs company acknowledgement
UD-24Audit interpretations: I-1 ("important"), I-2 (which exports), which history is business-visible (P-3), which attachment actions count, failed sign-in volume and aggregationAudit buildOwnerBefore the audit build is finishedAs read in 8.1 to 8.3
UD-25Administrator safeguards: dual control for approver-capable assignments and HIGH grants; at least two administrators; one account per person; who oversees the administrators; who reviews the release pipeline; emergency accessG1 (threat model); G5Owner; company for oversightG1As proposed in 4.2
UD-26Restore policy: who authorises a restore; epochs; roll-forward of lost changes from segments or re-entry from paper (Q-35 c)G5OwnerG5Epochs; roll-forward reviewed case by case
UD-27When production logging starts; how test and training data are kept out (P-22)First production entryOwnerBefore go-liveStart at the first production import
UD-28Delivery channel for log and full-data exports; a company-side check of export manifestsLog exportOwner; companyBefore go-liveDelivery to the named requester; manifest checked by the company

Architecture decision records (all Proposed)

ADRDecisionStatusDecidesRevisit when
ADR-01One central online installation (A1, reading S1)ProposedOwnerships report frequent or long outages (FQ-24), or the company asks to keep working without a link.
ADR-02One company, data scoped by vessel (M2)ProposedOwnera second company is to share one installation.
ADR-03Modular monolith: one application, a web process and a workerProposedDelivery lead, with the owner's acceptancea module needs independent scaling or release, or a separate team owns one.
ADR-04PostgreSQL as the system of record; object storage for filesProposedDelivery lead, with the owner's acceptancea company IT policy mandates another database.
ADR-05Personal accounts; rights follow dated position assignments (ID-B)ProposedOwner (model); the company confirms the reading of Q-32 b (UD-02)the company confirms the literal reading, shared rank logins. That conflicts with NK-3 and goes to the owner.
ADR-06Authorisation: deny by default; position-derived roles; vessel and department scope; workflow rulesProposedOwnerthe company requires rules the matrix cannot express, such as time-of-day or location rules.
ADR-07Configurable sequential approval chains (W2, bounded)ProposedOwnerthe company needs parallel approval or delegation.
ADR-08Extension replaces deferral; status set without "Deferred"ProposedOwner (model); company (rules, FQ-10)the company asks for deferral as a distinct act.
ADR-09One scheduling engine with versioned policies; status evaluated at read timeProposed (mechanism)Owner (mechanism); company authority (rules)the company signs rules that the parameters cannot express, for example usage-based months (M3).
ADR-10Running hours as appended cumulative readings; corrections only as approved linked entriesProposedOwner and company (enabling corrections, UD-04)the company forbids corrections entirely, or asks for a different procedure.
ADR-11Audit realisation I2: database-captured, append-only, hash-chained logs with a company-held anchorProposedOwner. The company names the anchor holder (FQ-23)a regulation requires write-once storage (add I3), or a legal erasure route is required (UD-21).
ADR-12Files in private object storage, fingerprinted, never deletedProposedDelivery lead, with the owner's acceptancea legal requirement to erase personal images appears (UD-21).
ADR-13Optional modules behind installation-level switches; built when scheduledProposedOwner (timing, UD-17)the owner decides to build a module now.
ADR-14Materials as a separate, provisional moduleProposedCompany (extent), then ownerFQ-14 is answered.
ADR-15Portable deployment; H3 recommended; recovery tier R2 as the minimumProposedOwner proposes; the company accepts cost and values (UD-01)company IT policy or cost rules out H3.
ADR-16Bilingual interface and outputsProposedOwner; parts confirmed by the company (UD-16)the company wants job texts translated.
ADR-17Time handling: UTC instants, business dates, two timesProposedOwner; the company confirms the zone rule (UD-19)the company fixes one fleet time zone.
ADR-18Staged import with validation-only runs, complete-or-nothing load and provenanceProposedOwner; the company signs off the data (G4)the company chooses L-B or L-C.

Temporary assumptions

IDAssumptionBasisUsed forReview point
TA-01Scheduling defaults: LAST_COMPLETION, DAYS_30, Q = 3 M (90 days), Y = 365 days, EARLIEST_OF, stages {14, 10, 6, 3} days, first due = start date or entry dateWorkbook practice (A19, A20; GROUP 6 year = 365; GROUPs 0, 5, 9 TODAY() + interval); Q-06 b example; UI-03 to UI-05Prototype example tables onlySigned examples (UD-03)
TA-02GROUP 0 mapped to the same physical equipment (2a)OD-2Import prototypeUD-10
TA-03Task key (vessel, group, job code); job codes unchangedOD-3; 317 codes repeat across sheetsModel and importFQ-08
TA-04Counters: Main Engine and No.1 to No.3 generators. M/E auxiliary and shafting hour jobs on the Main Engine counter. No radar counter unless the company confirms a meterWorkbook counter rows (7.1); M/E-hour comments on 2 of 30 auxiliary and shafting jobs (INFERRED for the rest); radar J = I + 30 daysImport mappingFQ-05
TA-05Default projection rates: about 12 h/day for the Main Engine counter and 16.7 h/day for the generators, as [PIONEER] implies ([M008-FINAL] implies 15.4 h/day on six generator jobs). The 19 GROUP 1 jobs at 40,000 H are time-limited at 5 years, which the TIME limit coversGROUP 1's 14 day constants; GROUP 2 ×0.06; workbook review 2026-10-18Hour-limit projection where readings are missingObserved rates after go-live; FQ-05
TA-06Sizing scenario: up to 300 vessels, ~1,700 tasks each, ~1,000 executions per vessel per yearReassessment §3.3Capacity designNFR-PMS-008 targets
TA-07The web administrator is an in-app role held by named people, possibly on both company and delivery sidesOwner decision 4; P-11Authorisation designUD-12
TA-08Status set Normal, Upcoming (with stage), Overdue; extension shown as a marker; no Deferred, no PriorityOD-1; Q-07 a; Q-12 b; Q-15Model and UICompany confirmation of the vocabulary (UX-G1)
TA-09Status counts only CLOSED executions; submitted work is marked "awaiting approval"BR-PMS-002 ("hợp lệ"); Q-17MonitoringUD-03 examples

Interpretations of unclear answers

IDAnswerReadingsEvidenceRecommendation and whyResidual uncertainty
UI-01Q-27 b "đồng bộ liên tục"S1 one central store; S2 a copy on each vessel kept in stepQ-27 a makes a stable connection the precondition; no request for an on-board server; Q-35 d accepts paper; Q-37 a names computers and phones, not a ship serverS1 (ADR-01). It satisfies "changes are visible at once" without replication, and it is an order of magnitude cheaper to build and supportIf ships report long or frequent outages, revisit (A2 offline capture is kept possible by principles 1–4)
UI-02Q-32 b "quản lý theo chức danh"ID-A shared rank logins; ID-B personal accounts with rights by rank; ID-C rank queues; ID-D rank only for P.I.C.Owner decision 3 and NK-3 make the actor a core audit attribute; Q-17 a requires "ai làm"; the process documents track named people (DOC-13.1)ID-B (ADR-05). Rights, approvals and work lists follow the rank a person holds on a vessel for a period, which is what "managed by rank" needs day to day. Shared logins would make permanent audit entries unattributable (R-003), contradicting the company's own NK-3 agreementThe company may still prefer a shared login per rank; if so, the conflict with NK-3 goes to the owner (UD-02 is not needed unless this happens)
UI-03Q-05 a, Q-06 a "tạm thời tất cả là tính theo chu kỳ" with 491 hour jobsH1 due by readings; H2 convert hours to time; H3 estimated date, as the workbook doesThe workbook stores 491 H intervals but schedules them by estimated dates (GROUP 1: 14 day constants of about 12 h/day; GROUP 2: ROUND(hours×0.06) days; radar: a monthly check). Only the main engine has readings, under about 10% of its execution dates. Q-04 asks crew to enter hours; Q-06 b wants warnings in daysKeep hours in the data; compute the earlier of the hour-limit date projected from readings and any time limit (EARLIEST_OF, ADR-09). Where a counter has no readings the result equals the workbook's estimated date (H3), so the first release reproduces current practice; where readings show faster running, the job falls due earlier, which is the safe direction. Warnings are in days, as Q-06 b asksThe rule is a business rule: production code waits for signed worked examples (G0; UD-03). If the company chooses pure H2, the hour limit is simply not used; no schema change
UI-04Q-02 a "tháng sử dụng"M1 calendar month; M2 30 days; M3 months of in-service timeWorkbook ×30 ('PIC LEGEND'!A19); the company says the workbook is the standard; no source tracks idle timePolicy parameter; default DAYS_30 (M2) to reproduce the workbook, which is never later than calendar months (TA-01). M3 would need usage tracking no source has, so it is not modelledSigned worked examples decide (FQ-02); the parameter makes the change a policy version, not a release
UI-05Q-01 a (basis not chosen)Last completion; previous due date; start dateWorkbook rule: Last Done + cycle (A19); Q-15 d "lịch quy ước trong file"Default LAST_COMPLETION (TA-01). Under this basis an extension affects only the current due point, which removes most of the open extension question (FQ-10 a)Signed examples (FQ-01)
UI-06Q-04 b "giờ bắt đầu và giờ kết thúc"Meter reading at start and end of a period; clock times; meter at start and end of the jobThe workbook records the cumulative main-engine total at each execution date ('GROUP 1'!N6)Store cumulative readings; accept a start/end form as an input format that is converted to cumulative values (entry_form), until FQ-04 is answeredFormat only; no structural risk
UI-07Q-04 d, Q-17 d "không sửa được"No overwrite (correction by new entry possible); no correction everQ-04 d itself mentions a senior authority correcting "theo quy trình"; BR-PMS-007, 017 require audited correction; AUD-02 (stuck-counter risk)Never overwrite; build a correction path as an approved, linked new entry restricted to a senior role, switched off until the owner and company enable it (ADR-10)Enabling and the authority are UD-04
UI-08Q-21 a "quản lý kho … sàn thương mại điện tử"Levels 1–4 of FQ-14No materials data anywhere; [PMS] §5 documents a full chainSeparate module behind a narrow interface to work orders; levels 1–3 modelled provisionally; purchasing not modelled (ADR-14)Extent is UD-07; it does not block the core
UI-09Q-19 a, Q-20 a modules "designed in advance"Built now and hidden; allowed for and built when askedNFR-PMS-011 separability; risk R-010Module switches and extension points now; build each module when it is scheduled (ADR-13)Timing is UD-17; no structural effect
UI-10Q-10 b hierarchy (delegated)GROUP 0 linked to the same physical equipment (2a) or loaded as its own nodes (2b)INFERRED: group = sheet, equipment = level-1 heading, component = level-2 heading; the job code agrees with the headings in 98.4% and 95% of jobs, with exceptions in GROUP 3 and GROUP 8 (reconciliation Q-10, an assessment; DATA-PMS-001 records the mapping as not established)Proposed: tasks carry their group; equipment is a physical tree with a display group. Both 2a and 2b fit the model; recommend 2a with a mapping table (OD-2)Mapping table is part of UD-10. A group change edits the task's key and is an important change (OD-11)

Accepted inputs (owner-confirmed company answers)

IDInput (paraphrased; the Vietnamese text is authoritative)SourceClarityDesign consequence
IN-01Works online; a stable connection is a precondition; edge cases to be considered; "continuous synchronisation"Q-27 a, bE; U (meaning of synchronisation)One central installation (ADR-01); interpretation UI-01
IN-02Paper records are an accepted fallbackQ-35 dENo offline client; back-entry procedure with two times (ADR-17)
IN-03Service 24 hours a day; a mechanism so data is not lost and re-enteredQ-35 a, cE (direction)Point-in-time recovery R2 as minimum (ADR-15); HA not assumed (NFR-PMS-033)
IN-04Few vessels now; design for tens to hundreds; many vessels of different sizes, one companyQ-09 b, Q-31EVessel-scoped single-company model (ADR-02)
IN-05Company: BLUEWAVE TANKERS; the KTS BROWN sheets apply to BLUEWAVE PIONEERQ-09 a, cECompany singleton; both workbook headers describe one vessel
IN-06The two Excel files are the company's current database and the standard for structure and content; Q-10 a answers "Có" to the proposed hierarchy Vessel > PMS Group > System > Equipment > ComponentQ-10 a, Q-13 b, Q-07 b, Q-23 aE (theme); U (what it settles)Workbook practice is the default for content and calculation (UI-04, UI-05); never a silent rule (reconciliation X1). The System level is allowed in the model but unused by the workbook mapping (UI-10)
IN-07If the file has no equipment code, the delivery side sets the conventions for both kinds of code (job and equipment); codes follow the vessel and are "likely" unique vessel-wide; other vessel types have other code groups; history cannot changeQ-11 a–cD; U; EStable surrogate keys. The recommended job key (vessel, group, job code) departs from "likely unique vessel-wide", because 317 job codes repeat across sheets (TA-03; FQ-08)
IN-08No Priority attribute unless the file has one (it has none); Critical placement is ours to inferQ-12 a, bDCritical on equipment and task, inherited (OD-4); no Priority
IN-09Approval at several levels, for example ("chẳng hạn") the chief engineer on board, a department head ashore and a final approver; the creator is a person of high authority; number of levels unknown; design flexiblyQ-14 b, Q-17 bE (chain); D (detail)Configurable sequential approval chains (ADR-07). The named levels are examples; the deck chain through the Master is this design's proposal (UD-11)
IN-10Jobs are not deferred; an extension, if needed, is approved through the rank levelsQ-15 a–eEDueExtension replaces deferral (ADR-08); conflicts with C-11 records kept until revision 5
IN-11Risk assessment: design flexibly, approval "likely by rank", no standard form yetQ-16DConfigurable gate and chain (OD-5; UD-06)
IN-12A completion records at least time and performer; work order and execution are one record for now; a closed record cannot be changedQ-17 a, c, dD; E; EWorkOrder holds execution (D13); closed rows immutable; correction only as a linked entry (ADR-10)
IN-13Nothing is deleted; old data may be "backed up" if there is too muchQ-18E; UNo delete paths; retrievable archive tier (D11)
IN-14Defects and unplanned work are in the design; modules can be shown or hidden per customer; design flexibly: a defect that does not affect the original job may stay open while the original job closes normallyQ-19 a, cE; UModule switches (ADR-13); Defect optional module; blocking is a per-defect setting, so both readings R1 and R2 are supported (blocks_origin_close)
IN-15Event-based maintenance is an optional extension moduleQ-20 aEOptional module; dock jobs keep workbook intervals until enabled (OD-8)
IN-16Materials: "Có" to a question listing used materials, links to existing slips, stock, purchasing and cost; described as inventory management "like an e-commerce platform", updated and linked; "take the Excel DB as the standard"Q-21 a, bE (wanted; the "Có" arguably covers all five levels); U (extent); conflict (no materials data in the files)Separate materials module, provisional (ADR-14; UD-07). Leaving purchasing and cost unmodelled is a delivery-side deferral pending FQ-14, not a company choice
IN-17Form M008 must be produced, for all eleven groupsQ-22 bEM008 is a report over stored data for every group
IN-18The new system is entirely new; Last Done is updated by the equipment cycle starting from the replacement date ("ngày thay") and the maintenance date, not typedQ-23 a, bULast Done is always derived from closed executions in the new system; a replacement is recorded as an execution, and the install date can serve as the first-due basis (in_service_from). Typed Last Done values in the workbook sit uneasily with "không nhập tay" and are handled per UD-09
IN-19SMA is not used and cannot export dataQ-24ENo SMA integration; SMA-derived positions carry less weight (X10)
IN-20Important documents may need approval; storage-only or approval designed flexibly; files should not be too largeQ-25DOptional documents module with per-type approval (OD-10)
IN-21Vessels share some tasks and have their own; important task changes need approvalQ-26E (direction)Template link now, propagation later (T2 staged); TaskChangeRequest
IN-22Bilingual English and Vietnamese, flexibly by partQ-28E; U (which parts)ADR-16
IN-23Sign-in, hosting, backup, audit policy and retention are the delivery side's to decide; data safety comes firstQ-29DADR-05, ADR-11, ADR-15 are delivery-side recommendations, subject to the owner's acceptance and the company's agreement on cost
IN-24External notifications are an optional module; a visible urgency warning before the due date is mandatory; the warning changes as the date nears ("kiểu" 14, 10, 6, 3 days)Q-30, Q-01 b, Q-06 bE; U (values)In-app staged warnings computed at read time; e-mail optional
IN-25About tens of users; design to scale; accounts "Quản lý theo chức danh" (managed by rank; literally read, rank-managed accounts)Q-32E; U (b)Recommended reading ID-B: personal accounts whose rights follow rank assignments. This diverges from the literal reading of shared rank accounts; see UI-02 and UD-02
IN-26Many file types; files not too large; storage must be plannedQ-33DAllow-list and size limits as configuration; object storage (ADR-12)
IN-27No lag; smoothQ-34UPerformance targets measured, not assumed (ENG-29)
IN-28Keep permanently; archive or compress old data; full export only on request; keep old data when a vessel leaves or service endsQ-36EPermanent retention; archive tier; export manifest; custody rule (UD-01)
IN-29Computers only; phones only for photographs and phone-type operations; easy for everyoneQ-37E; U (phone tasks)Desktop-first responsive UI; phone pages for capture (section 2.4)
IN-30Real-data copies allowed in a test environment that does not affect productionQ-38EIsolated verification environment; masking per testing policy §12
IN-31Running hours entered by crew, "per the equipment's cycle (start and end hours)"; not editable after entry for now; a confirmation prompt before saving; a senior authority might correct later through a procedureQ-04 b, dE; UAppend-only readings; confirmation step; correction path built but disabled (ADR-10)
IN-32Which equipment has hour meters: "for now all are by the equipment's cycle"; which counter each hour job uses: "as above"; when an hour job is due: "for now by the equipment's cycle"Q-05 a, b; Q-06 aUInterpretation UI-03; which machines have meters stays open (TA-04)
IN-33Units: day, week, month, quarter, year; a month is a "month of use"Q-02E; UUnits D, W, M, Q, Y, H; month rule UI-04
IN-34Status definitions are ours to setQ-07 aDStatus set OD-1 (TA-08)
IN-35NK-1 to NK-7 a): agreement with the owner's audit decisions 1–7NK-1 to NK-7EADR-11. The b) parts are blank (UD-08, UD-12)
IN-36Both Excel files were provided; differences reflect vessel characteristicsQ-08U; the explanation is not supported by the files (reconciliation Q-08)Workbook to load is UD-09
IN-37The critical list in the file is the active one; changes will be reported during trialQ-13ECritical is data; five unverified GROUP 0 jobs flagged (DF-1)
IN-38Hand over the necessary documentsQ-39UBilingual user and administrator guides (OD-15)

What can start, what needs a prototype, what must wait

WorkCan start after G2 (owner acceptance of ADRs, standards adopted, roles named, repository)Needs a prototype firstMust wait
Platform foundation (M01, M02, M09, M11, M12)YesAudit chain, anchor and restore-gap detection (prove AC-4 to AC-6)First production log entry: masking rule (UD-08), personal-value storage (UD-21), anchor holder (UD-23), logging start (UD-27)
Plan structure (M03, M04 structure)Yes, without loading data—Job key and GROUP 0 mapping before load (UD-10)
Import (M10) validation-onlyYes, on synthetic dataParser against a copy of the real workbook under Q-38's conditionsLoad: G4 (UD-09)
Scheduling engine (M05)NoA pure library to produce worked-example tables for signatureProduction rules: signed examples (UD-03)
Monitoring and warnings (M08)After M05 rulesMonitoring query at the 300-vessel scenarioStage values (FQ-06)
Approvals (M07)Mechanism yes (configurable)—Chain contents (UD-11) before go-live
Work orders (M06)Structure yesPhone photo upload over a slow link (J2)Risk-assessment gate (UD-06), extension rules (UD-05), corrections (UD-04)
Reports and M008 (M08)After M06—Layout details (DF-2)
Optional modules (M13–M16)Switches yes—Scheduling decision (UD-17)
Materials (M17)No—Extent (UD-07)

Risks

IDRisk and triggerLikelihoodImpactResponseOwnerDue
R-002A calculation rule is coded on an assumption and due dates are wrong for safety-related workMediumHighPrevent: production rule code only after signed worked examples (G0); T1 tests; mutation testingCompany authority; delivery leadBefore scheduling increment
R-003Shared rank logins make permanent audit entries unattributableLow (ADR-05 proposed)HighPrevent: accept ADR-05 (personal accounts with rank assignments) before any production entryOwnerG1
R-005The 'stable connection' precondition does not hold on some vesselsMediumMediumContain: paper fallback with back-entry; idempotent retries; FQ-24; A2 kept possibleOwnerG1
R-006No correction path is enabled and a mistyped reading blocks a counter or hides due workMediumHighContain: correction function built but disabled (ADR-10); decide UD-04 before go-liveOwner; company authorityBefore go-live
R-007The wrong workbook is loaded and history is lostMediumHighPrevent: UD-09 before G4; reconciliation counts; validation-only rehearsalOwnerG4
R-008Permanent retention of logs and photographs makes storage grow without boundMediumMediumDetect: size limits at upload; archive tier; capacity scenario TA-06Delivery leadG1
R-009One party holds database access, backups, log administration and the integrity anchorMediumHighPrevent: company-held anchor (FQ-23); H3 hosting; separate admin accountsOwnerG1
R-010'Design flexibly, change later' leads to over-configurable featuresHighMediumContain: each configuration point bounded in an ADR (ADR-06, 07, 09, 13)OwnerG1
R-011The five GROUP 0 jobs awaiting verification are loaded as verified safety jobsMediumMediumDetect: verification_state flag at load; FQ-09OwnerG4
R-012The web administrator is the only reader of the log that records their own actionsMediumMediumContain: every log view and export is a security event; company can request the record; company-held anchorOwnerG1
R-013A missed vessel filter exposes another vessel's dataLowHighPrevent: mandatory scope in repositories, composite keys, row-level security, negative tests per role and vesselDelivery leadG3
R-014The excluded-from-audit derived projection is later judged to need audit, adding volumeLowLowAccept or decide UD-14; inputs are audited and results reproducibleOwnerG1
R-015Materials scope ('like e-commerce') grows into a separate product inside the PMS scheduleHighHighContain: separate provisional module M17 behind a narrow interface; extent decided first (UD-07)Company authority; ownerBefore M17
R-016Photograph upload over a slow ship link fails or duplicates evidenceMediumMediumPrevent: size limits, idempotent resumable upload, prototype over a slow link (J2)Delivery leadBefore work-order increment
R-017A policy-version recomputation changes many due dates at once without users noticingMediumMediumDetect: recomputation report of changed due points before activation; owner approval of the policy versionOwnerEach policy change
R-018Restoring the database loses recent entries, including log entriesLow (R2)HighContain: point-in-time recovery; hourly log segments; RESTORE_GAP record; paper back-entryDelivery lead; ownerG5