> ## Documentation Index
> Fetch the complete documentation index at: https://docs.planeconnection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance Data Model

> How maintenance data flows between work orders, due items, components, and the safety and operations modules.

The Maintenance module is one of four core modules in PlaneConnection --
alongside Safety (SMS), Operations, and FBO. It manages the full lifecycle of
aircraft maintenance: from discrepancy discovery through work completion,
record-keeping, and regulatory compliance. This page explains how the
maintenance data model works, how it integrates with the other modules, and
which federal regulations each feature area satisfies.

<Info>
  For the technical API reference, see [Maintenance API
  Endpoints](/en/reference/api/maintenance-endpoints). For work order lifecycle details, see [Work
  Order Statuses](/en/reference/work-order-statuses).
</Info>

## The Four-Module Architecture

PlaneConnection is built around four operational modules that share a common
data layer. Each module has its own microfrontend Worker and dedicated routes,
but they read from and write to the same database tables via a shared API.

```mermaid theme={}
graph TD
    subgraph "PlaneConnection Platform"
        SMS["Safety (SMS)"]
        OPS["Operations"]
        MX["Maintenance"]
        FBO["FBO"]
    end

    DB[(D1 Database)]

    SMS <--> DB
    OPS <--> DB
    MX <--> DB
    FBO <--> DB

    SMS -- "Hazards from discrepancies" --> MX
    MX -- "Reliability data → SPIs" --> SMS
    OPS -- "Due items, MEL → dispatch" --> MX
    MX -- "Maintenance costs" --> OPS
    FBO -- "Hangar/ramp services" --> MX
```

The Maintenance module runs as a dedicated microservice behind the
platform's routing layer, which dispatches maintenance requests to the
appropriate service automatically.

## Core Data Flow: Discrepancy to Completion

The most common maintenance workflow begins with a reported discrepancy and
ends with a verified work order and updated due items. Here is how data
flows through the system at each stage.

### 1. Discrepancy Reported

A pilot, mechanic, or dispatcher creates a discrepancy record documenting
an observed defect or squawk. The discrepancy is classified by ATA chapter,
severity, and whether it grounds the aircraft.

**Source tables:** `discrepancies`

**Triggers:** Pilot report (PIREP), mechanic finding during inspection,
dispatch pre-flight check.

### 2. Disposition Decision

The Director of Maintenance (DOM) or responsible person evaluates the
discrepancy and makes a disposition decision:

* **Defer under MEL** -- creates a deferral record with category, interval,
  and operational limitations. Aircraft may continue operating subject to
  MEL conditions.
* **Create work order** -- initiates the repair process. The work order
  references the originating discrepancy via `discrepancy_id`.
* **Resolve immediately** -- for minor items that can be corrected on the
  spot with a logbook entry.

### 3. Work Order Execution

The work order progresses through its lifecycle (Draft, Open, In Progress,
Completed, Verified). During execution:

* **Work order items** track individual tasks (labor) and parts consumed
* **Part transactions** record inventory movements (issue from stock, receive
  from vendor)
* **Work order notes** capture technician observations and photos
* **Billing estimates** compute costs from labor rates and parts markup

**Source tables:** `work_orders`, `work_order_items`, `work_order_notes`,
`part_transactions`, `maintenance_estimates`

### 4. Verification and Return to Service

An authorized inspector (IA certificate holder) verifies the completed work
using a four-point checklist per 14 CFR 43.3:

1. All work items completed as specified
2. All parts documented with part numbers and serial numbers
3. Work complies with applicable airworthiness requirements (14 CFR 43.9)
4. Aircraft approved for return to service

### 5. Due Item Update

When a work order is completed against a recurring maintenance task, the
system updates the associated due item:

* `last_completed_at` is set to the completion date
* `next_due_date`, `next_due_hours`, and `next_due_cycles` are
  recalculated from the interval configuration
* Status transitions from `overdue` or `due_soon` back to `upcoming`

**Source tables:** `maintenance_due_items`

```mermaid theme={}
flowchart LR
    A["Discrepancy\nReported"] --> B{"Disposition"}
    B -- "Defer" --> C["MEL Deferral\n(time-limited)"]
    B -- "Repair" --> D["Work Order\nCreated"]
    B -- "Quick fix" --> E["Logbook\nEntry"]
    C --> D
    D --> F["Work\nExecuted"]
    F --> G["Inspector\nVerification"]
    G --> H["Due Items\nUpdated"]
    H --> I["Aircraft\nReturned to Service"]
```

## Component Lifecycle

PlaneConnection tracks serialized components through their full lifecycle.
Each component record in the `component_time_tracking` table carries:

| Tracking Field                | Description                                                        |
| ----------------------------- | ------------------------------------------------------------------ |
| **TSN (Time Since New)**      | Total hours and cycles since the component was manufactured.       |
| **TSO (Time Since Overhaul)** | Hours and cycles since the component's last overhaul.              |
| **Life Limit**                | Maximum hours or cycles before mandatory replacement.              |
| **Install Date**              | When the component was installed on its current aircraft.          |
| **Position**                  | Physical location on the aircraft (e.g., "LH Engine, Position 1"). |

### Component Lifecycle Flow

```mermaid theme={}
stateDiagram-v2
    [*] --> New : Received from manufacturer
    New --> Installed : Installed on aircraft
    Installed --> Tracking : TSN/TSO accumulating
    Tracking --> Removed : Removed for overhaul/repair
    Tracking --> LifeLimit : Life limit reached
    Removed --> Overhaul : Sent to repair station
    Overhaul --> Serviceable : TSO reset to zero
    Serviceable --> Installed : Reinstalled on aircraft
    LifeLimit --> Retired : Scrapped (life-limited)
    Retired --> [*]
```

Parts are tracked in the `parts` table with fields for certification type
(`pma`, `oem`, `tso`), rotable status (`is_rotable`), condition (`new`,
`serviceable`, `repairable`, `scrap`), and shelf life expiration. The
`part_transactions` table provides a complete audit trail of every issue
and receipt.

## Integration with Safety Module

The Maintenance module feeds safety data into the Safety Management System
in two primary ways:

### Discrepancies to Hazards

When a maintenance discrepancy reveals a potential safety hazard (e.g., a
recurring structural crack, a systemic avionics failure), it can be linked
to the SMS hazard register. The hazard record references the originating
discrepancy, preserving the causal chain from observation to risk assessment.

### Reliability Data to Safety Performance Indicators

The reliability program (14 CFR 135.421(e)) tracks five event types:

| Event Type          | Description                            | Safety Relevance          |
| ------------------- | -------------------------------------- | ------------------------- |
| `pirep`             | Pilot-reported discrepancy             | Direct operational impact |
| `marep`             | Mechanic-reported finding              | Preventive detection      |
| `component_failure` | In-service component failure           | Reliability trend         |
| `delay`             | Maintenance-caused flight delay        | Operational disruption    |
| `cancellation`      | Maintenance-caused flight cancellation | Service impact            |

These events are aggregated monthly by ATA chapter and aircraft type. The
trends feed into Safety Performance Indicators (SPIs) monitored under
14 CFR Part 5 Subpart D. When event rates exceed alert thresholds, the
system generates safety notifications for the Safety Manager's review.

The recurring squawk analysis identifies chronic maintenance issues by
grouping discrepancies by ATA chapter and severity. Chronic squawks may
indicate systemic problems that require Management of Change (MOC)
processes under the SMS.

## Integration with Operations Module

### Due Items and Dispatch

The Operations module reads maintenance due items to determine aircraft
dispatch availability. Before any trip is dispatched:

* **Due item status** is checked: overdue items may prevent dispatch
  depending on the item type (MEL deferral vs. time-limited inspection)
* **MEL deferral status** determines whether the aircraft can fly with
  deferred items and what operational limitations apply
* **Component life limits** are verified to ensure no life-limited parts
  will exceed their limits during the planned flight

### MEL Deferrals and Dispatch Restrictions

Active MEL deferrals flow from Maintenance to Operations as dispatch
restrictions. The dispatch board shows:

* Active deferral count per aircraft
* Category and time remaining for each deferral
* Operational limitations that must be briefed to the flight crew
* Whether any deferrals have expired (grounding the aircraft)

### Maintenance Costs in Operating Economics

Work order costs (labor, parts, outside services) are aggregated into the
aircraft's operating cost profile within the Operations module. This
enables:

* **Per-aircraft cost tracking** -- total maintenance spend by tail number
* **Cost-per-flight-hour** -- maintenance cost divided by flight hours
* **Budget vs. actual** -- comparing planned maintenance budgets to actual
  expenditure
* **Trip profitability** -- allocating maintenance costs to charter trips
  for revenue analysis

When QuickBooks integration is configured, verified work order costs are
automatically synced to the accounting system.

## Record Integrity

All maintenance records are protected by PlaneConnection's multi-layer
tamper-evidence system. When a maintenance record is created or modified,
it is cryptographically fingerprinted, chained to previous records, and
anchored to independent external time-stamp authorities. This makes it
possible for auditors and regulators to verify that records have not been
altered after the fact.

This integrity protection applies to work orders, inspections, AD/SB
compliance records, discrepancies, MEL deferrals, FAA Form 337 filings,
and part installation/removal records. For details, see
[Record Integrity Architecture](/en/explanation/record-integrity-architecture).

### Maintenance Logbook Integrity

Maintenance logbook entries carry a `signature_hash` field that
cryptographically binds the mechanic's identity (name, certificate number,
certificate type) to the work description. This implements the digital
equivalent of the mechanic's signature required by 14 CFR 43.9(a).

## Regulatory Mapping

The following table maps maintenance features in PlaneConnection to the
federal regulations they help satisfy:

| Feature                | Regulation             | Requirement                                              |
| ---------------------- | ---------------------- | -------------------------------------------------------- |
| Work order tracking    | 14 CFR 43.9            | Content, form, and disposition of maintenance records    |
| Inspector verification | 14 CFR 43.3, 43.7      | Persons authorized to perform and approve maintenance    |
| RII catalog            | 14 CFR 135.427         | Required inspection items and inspector authorization    |
| Maintenance logbook    | 14 CFR 43.9(a)         | Mechanic signature, certificate number, certificate type |
| AD compliance tracking | 14 CFR Part 39         | Airworthiness Directives (mandatory compliance)          |
| Due item forecasting   | 14 CFR 91.409          | Inspection requirements and scheduling                   |
| MEL deferrals          | 14 CFR 91.213, 135.179 | Operations with inoperative equipment                    |
| FAA Form 337           | 14 CFR 43.9(a)         | Major repair and alteration records                      |
| Record retention       | 14 CFR 91.417          | Maintenance record retention requirements                |
| Part certification     | 14 CFR 21.303          | FAA-PMA parts, 8130-3 release certificates               |
| Life-limited parts     | 14 CFR 43.10           | Disposition of life-limited aircraft parts               |
| Reliability program    | 14 CFR 135.421(e)      | Reliability program for continuing airworthiness         |
| Technician attestation | 14 CFR 43.3, 43.12     | Certificate verification and record authenticity         |
| Tamper-evident records | 14 CFR 5.97            | SMS documentation and recordkeeping                      |
| Component tracking     | 14 CFR 91.417(a)(2)    | Total time, life-limited status, overhaul status         |

## Data Model

The maintenance data model covers work orders, due items, logbook entries,
discrepancies, parts inventory, component tracking, technician attestations,
reliability events, compliance documents, and billing. All data is
workspace-isolated to enforce strict separation between operators.

## Related

<CardGroup cols={2}>
  <Card title="Work Order Statuses" icon="list-check" href="/en/reference/work-order-statuses">
    Complete lifecycle reference for work order status transitions.
  </Card>

  <Card title="MEL Deferral Reference" icon="clipboard-list" href="/en/reference/mel-reference">
    MEL categories, intervals, and the deferral lifecycle.
  </Card>

  <Card title="Compliance Documents" icon="file-shield" href="/en/reference/compliance-documents-reference">
    AD/SB tracking, RII catalog, and Form 337 requirements.
  </Card>

  <Card title="Record Integrity Anchors" icon="shield-halved" href="/en/reference/record-integrity-anchors">
    The 5-layer tamper-evidence system protecting maintenance records.
  </Card>

  <Card title="Flight Operations Data Model" icon="plane-departure" href="/en/explanation/flight-ops-data-model">
    How operations data feeds into maintenance and safety.
  </Card>

  <Card title="Safety Performance Monitoring" icon="chart-mixed" href="/en/explanation/safety-performance">
    How maintenance reliability data drives safety performance indicators.
  </Card>
</CardGroup>
