Component lifecycle record
The component lifecycle record is the full audit restitution required by M.A.305 EASA Part-145 / EMAR-FR M: everything that must be presented to the authority (DGAC, DSAÉ) on demand for a given component — its identification, installation history, reception meter snapshots, attached documents, and the SHA-256 hashchain audit trail that protects them.
The API exposes two parallel formats from the same aggregation service:
- PDF — human-readable, long-term archive
- JSON — machine-readable, BI integration / XML export
The web UI renders that JSON in a dedicated tab on the stock item detail page, so users can review the record on screen without downloading anything (see § Online consultation below).
Aggregated content (V2 — aligned with EMAR/FR Form 1)
The V2 PDF mirrors the visual style of the EMAR/FR Form 1 Ed. 3.2 published by DSAé:
- Centered bilingual header FR (bold) / EN (italic)
- 8 numbered boxes on the front page (authority, framework, tracking number, instance, PN/NCAGE, SN/Lot, description, manufacturer)
- Footer with edition + generation + pagination
- Bilingual « Reader responsibilities » verso
| Section | Source |
|---|---|
| Boxes 1-8 identification | StockItem + PartNumber + Manufacturer + Instance.regulatoryFramework |
| Current configuration | Active installation (if installed) OR current storage (if in stock) |
| R2 technical identification | Condition, manufactureDate, modLevel, softwareVersion, easaForm1Document |
| Installation history | Installation (install/uninstall on aircraft or container, with EmploymentPoint when in Wave D) |
| R2 meter snapshots | StockItemMeterSnapshot (TSN/TSO/CSN captured by the airworthiness technician) |
| Applicable maintenance plans | StockItemPlanAssignment (PEAs assigned to the component) |
| AD compliance (honest placeholder) | V1 gap — Envergure does not yet model ADs |
| Dimensional information (honest placeholder) | V1 gap — no measurement field on StockItem |
| Attached documents | DocumentAttachment polymorphic on resourceType=stock_item |
| Audit events | AuditEvent filtered on this StockItem (verifiable SHA-256 hashchain) |
| Tracking number | ENV-LFC-<short sha256> deterministic (component.id + generatedAt) |
| Chain tip hash | Last event of the instance — enables a posteriori verification |
API endpoints
| Method | Path | Effect |
|---|---|---|
| GET | GET/stock-items/:id/lifecycle.json |
Machine restitution (XML/JSON auditor, BI, integrations). X-Admin-Secret auth. |
| GET | GET/stock-items/:id/lifecycle.pdf |
Human-readable PDF/A restitution. Content-Disposition: attachment with PN + SN-based filename. |
Both endpoints are protected by AdminSecretGuard (V1 — will switch to RBAC
Keycloak when that module ships).
curl example
# JSON
curl -H "X-Instance-Id: $INSTANCE_ID" \
-H "X-Admin-Secret: $ADMIN_SECRET" \
http://localhost:3000/stock-items/$STOCK_ITEM_ID/lifecycle.json
# PDF (download)
curl -o lifecycle.pdf \
-H "X-Instance-Id: $INSTANCE_ID" \
-H "X-Admin-Secret: $ADMIN_SECRET" \
http://localhost:3000/stock-items/$STOCK_ITEM_ID/lifecycle.pdf
Online consultation (« Lifecycle » tab)
The stock item detail page — /admin/stock-items/:id — exposes a
Lifecycle tab for any serialized component. It consumes
GET /stock-items/:id/lifecycle.json directly and renders the same data as
the PDF, organised into readable sections:
- metadata banner (generation date, tracking number, regulatory framework, chain tip hash)
- component identification (PN, SN, NCAGE, lot, condition, dates, attached EASA Form 1 document)
- current location (installed on aircraft/container or in stock)
- install / uninstall history (reverse chronological, active installation highlighted)
- meter snapshots (TSN/TSO/CSN captured at R2)
- attached documents (size, MIME type, attached by)
- applicable maintenance plans (assigned PEAs)
- audit events (5 most recent by default, expandable)
A Regenerate button triggers a fresh aggregation on the backend (the
tracking number changes since it depends on the generatedAt timestamp). The
Lifecycle button in the action bar remains available alongside it to
download the archival PDF.
PDF/A compliance
The V1 produces a standard PDF (embedded Helvetica fonts,
title/author/subject/producer metadata). Strict PDF/A-3 compliance (XMP
xmpMM:DocumentID, OutputIntent, ICC profiles) will be added in V2 once a
pilot DGAC or DSAÉ auditor has validated the expected rendering.
Regulatory framework
Covers the D5 — flag regulatoryFramework exploited at runtime structural
decision from Envergure regulatory decisions.
The rendering includes a regime banner in the header to trace which instance
issued the lifecycle record (Part-145 civil, EMAR-FR defence, mixed).