diff --git a/README.md b/README.md index 503e9ab..5f90182 100644 --- a/README.md +++ b/README.md @@ -138,9 +138,9 @@ To back up or move a single aircraft with all its files, use **More → Download | Fleet dashboard | Every aircraft you can access, with airworthiness status and its top issues. | | Airworthiness | Grounded / limited (e.g. "VFR only" for an overdue 91.411 check) / due soon / current, from AD compliance, grounding squawks, inspections, replacement-critical and expiring parts, and expiring documents (an expired registration grounds). Warnings start 10 hours or 30 days ahead. The pilot in command still decides airworthiness (91.7). Logic: `app/services/airworthiness.rb`, `app/services/compliance.rb`. | | Hours | Absolute tach/hobbs updates or per-flight logs. Both apply the delta to every in-service component. Downward corrections are clamped at 0. Each aircraft picks tach or Hobbs as its maintenance clock (time in service). | -| Flight import | Owners can import historical flights from `.xlsx` or `.csv` (Date, From, To, Tach, Hobbs, Oil Added, Fuel Added). Each flight's time is derived from the previous row's reading. A preview flags typos such as a tach going backwards, and rows already imported are skipped. History only: component hours aren't changed unless you choose to advance the aircraft's meters. | +| Flight import | Import historical flights from `.xlsx` or `.csv` (Date, From, To, Tach, Hobbs, Oil Added, Fuel Added). Each flight's time is derived from the previous row's reading. A preview flags typos such as a tach going backwards, and rows already imported are skipped. History only: component hours aren't changed unless you choose to advance the aircraft's meters. | | Airworthiness enforcement | Optional per aircraft. It blocks flight logs and hours updates while the aircraft is grounded (not for limitations). | -| Components | Tree of parent and child parts, TBO and replacement limits, and service/replace reset. Owners can create new component types inline. | +| Components | Tree of parent and child parts, TBO and replacement limits, and service/replace reset. New component types can be created inline. | | Squawks | Four priorities. "Ground Aircraft" grounds the aircraft. Inoperative items can be deferred under 91.213(d) after confirming each condition; resolving can record the fix as a logbook entry. Attachments, reopen. | | Notes | Per-aircraft notes in Markdown, with a preview; shown on share links. | | ADs and bulletins | Shared across aircraft and applicable to the airframe or to specific components. Hour- and month-based recurrence (due at end of month), conditional and non-mandatory types, per-aircraft "not applicable" determinations, and compliance history with method of compliance and the revision complied with. | @@ -148,7 +148,7 @@ To back up or move a single aircraft with all its files, use **More → Download | AD import | Import ADs from an FAA DRS export (`.xlsx` recommended: its AD numbers link to each AD's DRS page, which the import keeps; `.csv` works without links). ADs are matched by number, so nothing is duplicated. The preview suggests Track, Not applicable or Skip for each AD, and flags superseded or non-current ADs, model mismatches, appliance or STC-only ADs, and repetitive actions. | | Inspections | Shared inspection types with hour, month, and day recurrence, plus history. Each says what overdue means (grounded, no IFR, no transponder, advisory); an annual can also count as the 100-hour, and the 100-hour's 10-hour overrun is credited (91.409(b)). One click adds the standard Part 91 set. | | Logbook | Maintenance entries with search and a link to a scanned document page. Records the signer's certificate kind and number and an inspection's result, and flags what 43.9 / 43.11 needs that's missing. Entries transcribed by Claude stay "unverified" until someone checks them against the scan. Entry templates (built-in pilot preventive maintenance per 43.3(g) and Part 43 Appendix A(c); admins add and edit their own under Admin → Logbook templates). Engine and propeller entries link the component and record its total time and time since overhaul (SMOH/SFOH/SNEW) at the entry, worked out from the entry's airframe total time; sub-components (an oil filter on the engine…) can be included with their own times. Print entries as a PDF on Avery 5163/8163 or 5164/8164 labels or half-letter/letter pages (boxed) to sign and put in the paper logbook. | -| Documents | Collections, multi-file documents with a page viewer, per-document share visibility, bulk upload, and expiration dates (registration, insurance…). Their text is read for search: PDF text layers directly, scans by Tesseract OCR (in the image) or optionally Claude. | +| Documents | Collections, multi-file documents with a page viewer (PDFs drawn page by page with PDF.js on phones, fetching only the pages viewed), per-document share visibility, bulk upload, and expiration dates (registration, insurance…). Their text is read for search: PDF text layers directly, scans by Tesseract OCR (in the image) or optionally Claude. | | Electronic signatures | Logbook entries can be signed electronically along the lines of AC 120-78B chapter 2: the signer reviews the entry, picks their certificate, re-enters their password (or signs in again with SSO) and confirms a "Certified by" statement. The signature records who, which certificate, the statement, the time and a SHA-256 fingerprint of the entry, sealed by the server; the signer gets an email. Signed entries are locked: a correction is a new signed entry that supersedes the original. Owners can invite an outside mechanic to sign one entry with their own account. Disabled accounts can't sign; their past signatures stay. | | Records integrity | Every change to maintenance records is kept (who, when, field by field) in a hash chain per aircraft (Activity → Record history). Nightly: a verified SQLite backup in `storage/backups` (how many are kept: Admin → Settings), then a check of the history chains and every signature; admins are emailed on a problem (Admin → About). Software versions are recorded. A records package (Access & Sharing) bundles every entry as a PDF with signatures, a signature register, the history, the status report and the `.sam.zip` for the FAA or a buyer, with a README (and a ready-to-run `viewer/docker-compose.yml`) so the recipient can browse the data in their own local copy of the app. Scans of paper logbooks can be marked as legacy records, with an "electronic records since" date per aircraft. | | Off-site backup | Nightly copy of the verified database snapshot (newest 30 kept) and every new uploaded file to Google Drive, using your own Google OAuth client and the `drive.file` scope (the app sees only its own files). Restore test from the admin page; failures emailed to admins; `bin/rails offsite:restore_files` brings files back after a restore. | @@ -157,26 +157,31 @@ To back up or move a single aircraft with all its files, use **More → Download | Weight & balance | History of empty weight and CG (linked to the alteration that changed them) and a loading calculator: takeoff and landing weight and CG against max gross and the CG envelope. The envelope can be entered as CG (inches) or as moment (lb-in/1000, as in POH moment charts and Garmin Pilot). | | Status report | A printable maintenance status (91.417(a)(2)): total times, life-limited parts, time since overhaul, inspections, ADs with method and revision, major alterations, open discrepancies. Also on maintenance share links. | | Calendar feed | A private iCalendar link (Profile) with everything coming due on your aircraft as all-day events; hour-based items get a date projected from the past year's flying. | -| Reminders | A Monday email to owners when something is overdue or coming due, and to anyone whose certificate (e.g. an IA) is about to expire; admins also get the records audit due date (needs SMTP; users can turn it off). | +| Reminders | A Monday email to those whose role gets reminders (Owners and Mechanics by default) when something is overdue or coming due, plus push alerts when something becomes overdue, and to anyone whose certificate (e.g. an IA) is about to expire; admins also get the records audit due date (needs SMTP; users can turn it off). | | Oil and fuel | Records, trend charts, and averages (last 20 intervals, IQR outlier filtering, manual exclusion). | -| Activity log | Every write is recorded as an `AircraftEvent`. | -| Access | Admin, owner, and pilot roles, plus share links (Current Status or Maintenance Detail, optional expiry, at most 10 per aircraft). Admins can disable accounts; a disabled account can't sign in or sign entries, and its past signatures stay. | +| Activity log | Every write is recorded as an `AircraftEvent`; the Activity tab loads them as you scroll. | +| Access | Configurable roles per aircraft (see [Roles](#roles)), plus share links (Current Status or Maintenance Detail, optional expiry, at most 10 per aircraft). Admins can disable accounts; a disabled account can't sign in or sign entries, and its past signatures stay. | | Sign-in security | Passwords of at least 12 characters, checked against known breaches (Have I Been Pwned, k-anonymity). 10 failed sign-ins in a row lock an account for 15 minutes from any address, and the user is emailed; admins can unlock. Optional authenticator-app (TOTP) codes with recovery codes for password and emailed-link sign-in and for signing entries; admins can reset them. Rate limits per address on every sign-in form. | +| Phones and offline | Installable (PWA). Flights and squawks logged without signal, or with one too weak to answer within 10 seconds, are kept on the device and sent later, never twice. The Fleet, Overview, W&B, Log Flight and Report Squawk pages are saved ahead of time; any other page falls back to an offline page. The top bar turns red when the server can't be reached, and a ring shows saving and sending progress. | +| REST API | Personal and integration tokens with scopes, read endpoints, squawks, draft logbook entries for signing in the app, and signed webhooks ([docs](docs/guide/api.md)). Follows the person's role. | | Help | The [user guide](docs/guide/README.md), shown in the app under **Help**. | ### Roles -| Action | Admin | Owner | Pilot | -|---|:-:|:-:|:-:| -| View everything on the aircraft | ✓ | ✓ | ✓ | -| Update hours, log flights, add squawks/notes/oil/fuel | ✓ | ✓ | ✓ | -| Defer squawks (91.213(d)) | ✓ | ✓ | ✓ | -| Sign logbook entries with their own certificate | ✓ | ✓ | ✓ | -| Edit or delete squawks and notes, resolve squawks | ✓ | ✓ | | -| Components, logbook, ADs, inspections, documents, major records | ✓ | ✓ | | -| Edit or delete aircraft, manage people and share links | ✓ | ✓ | | -| Create aircraft (creator becomes owner) | ✓ | ✓ | ✓ | -| Users, component types, airports, templates, settings, off-site backup, procedures and audits | ✓ | | | +Each person has a role on each aircraft, and a role is a set of permissions (`app/models/permission.rb`) that administrators change under **Admin → Roles**, where they can also add their own. The built-in roles as they come: + +| Action | Viewer | Pilot | Mechanic | Owner | +|---|:-:|:-:|:-:|:-:| +| View everything on the aircraft | ✓ | ✓ | ✓ | ✓ | +| Log flights, correct own flights | | ✓ | | ✓ | +| Update hours, report and defer squawks (91.213(d)), add notes/oil/fuel | | ✓ | ✓ | ✓ | +| Sign logbook entries with their own certificate | | ✓ | ✓ | ✓ | +| Logbook, components, ADs, inspections, documents, major records, W&B; edit squawks, notes, oil/fuel | | | ✓ | ✓ | +| Reminders and overdue alerts | | | ✓ | ✓ | +| Correct or delete any flight, imports, exports, restore from history | | | | ✓ | +| Edit or delete the aircraft, manage people and share links | | | | ✓ | + +Owner always has every permission. Only an Owner can give the Owner role, nobody changes their own, and every aircraft keeps an Owner. Administrators can do everything on every aircraft and manage users, roles, component types, airports, templates, settings, off-site backup, procedures and audits. Anyone can create an aircraft and becomes its Owner. Controllers declare the permission each action needs (`requires_permission`); a write with none declared is refused. Users who aren't on an aircraft get a 404 for it, identical to a missing record. diff --git a/docs/guide/administration.md b/docs/guide/administration.md index b651717..1f28916 100644 --- a/docs/guide/administration.md +++ b/docs/guide/administration.md @@ -6,7 +6,7 @@ Admins see the **Admin** menu (on a phone, under ☰). Admins can see and edit e **Users** lists every account. -- **+ New User**: name, email and a starting password. Tick **Administrator** to make them an admin. Then add them to aircraft from each aircraft's **More → Access & sharing** (or they add their own aircraft). +- **+ New User**: name, email and a starting password. Tick **Administrator** to make them an admin. Then give them a role on aircraft: **Edit** → **Aircraft access** lists their role on every aircraft, to add, change or remove (an aircraft's Owner can also do it from **More → Access & sharing**, and anyone can add their own aircraft). - **Edit** to change details or reset a password when email isn't set up. - **Locked** marks an account locked for 15 minutes after 10 failed sign-ins in a row (the user is emailed). **Unlock** clears it straight away, once you know it was really them. - **2FA** marks someone using an authenticator app. **Reset 2FA** turns it off for a user who lost their phone and recovery codes. Confirm it's really them first (call them); they can then set it up again. @@ -59,7 +59,7 @@ If single sign-on is broken and `PASSWORD_LOGIN=false` is set, remove that setti ## About -**About** shows the running version (year.month.release, e.g. 2026.11.0) and build (the exact source commit), with a link to **What's new** (the release notes, also under Help), and the features and storage. It has tools: +**About** shows the running version (year.month.release, e.g. 2026.11.0) and build (the exact source commit), **What's new in** this version, with a link to all releases (also under Help → What's new, where older releases are folded to one line each), and the features and storage. It has tools: - **Send test email** and **Send me this week's reminder** check that email works. - **Records integrity**: the last nightly backup, off-site copy and records check. **Back up and check now** runs the backup and check straight away. diff --git a/docs/guide/documents.md b/docs/guide/documents.md index 0c282fe..477034b 100644 --- a/docs/guide/documents.md +++ b/docs/guide/documents.md @@ -3,6 +3,7 @@ The **Documents** tab keeps scans and files: registration, airworthiness certificate, insurance, logbook scans, receipts, 337s, reports. - **+ Upload Document**: a name, type, collection, description, and one or more files (images, PDFs or text). Each file is a page in the viewer. +- **PDFs** open in the computer's own PDF viewer. On a phone or tablet, which can't show PDFs inside a page, the app draws every page of the PDF itself as you scroll to it, downloading only the parts it needs, so a long manual opens quickly. Pinch to zoom; the file's name above the viewer downloads it. - **More → Upload several files**: many files at once. Each becomes its own document named after the file; files with the same name are combined, in order, as pages of one document. - **More → New collection** groups documents (for example *Engine logbook* or *Annual 2026*). Collections start collapsed, showing how many documents they hold; click one to open it. diff --git a/docs/guide/flights.md b/docs/guide/flights.md index 7484381..8a14bd7 100644 --- a/docs/guide/flights.md +++ b/docs/guide/flights.md @@ -17,6 +17,8 @@ On a phone or tablet with the app installed (see [Getting started](getting-start Track and engine data files attached offline are kept and sent too. +A signal so weak that nothing comes back counts as none. **Log Flight** says *Sending…* while it waits; if the server doesn't answer within 10 seconds (a minute with files attached), the flight is saved on the device as above and the top bar turns red. If it reached the server after all, the copy sent later is recognized and not logged twice. Nothing is sent while the top bar is red; it goes as soon as the server answers again. + ## Correct a flight Open the flight and choose **Edit**. Owners can correct any flight; pilots, the flights they logged (the **Correct any flight** and **Correct own flights** permissions). The date, airports, route, notes, oil and fuel (its oil and fuel records follow), and the track and engine data files can always be changed. diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 36a611a..3ef9789 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -45,11 +45,13 @@ Administrators can do everything on every aircraft, and manage users, roles, set The app works on phones. The tabs collapse into a **Section** menu, and wide tables scroll sideways. +The top bar shows the connection at a glance. It turns **red** when the server can't be reached (no signal, or one too weak to get an answer) and back on its own when it can. A small **ring** next to the menu fills while pages are being saved for offline use or what you logged offline is being sent, with the percentage in its middle; while flights or squawks are waiting to send, it's **amber** with how many. + Install it like an app from **Profile → This device** (or in Safari: **Share → Add to Home Screen**). Installed, it: - opens from the home screen, with **Log Flight** and **Report Squawk** shortcuts on a long press of its icon; - logs flights and reports squawks without signal and sends them when the connection is back (see [Flights](flights.md) and [Squawks](squawks.md)); the number waiting shows on the icon; -- opens without signal: while you're online it saves the **Fleet** page and, for each of your aircraft (up to 10), the **Overview**, **W&B**, **Log Flight** and **Report Squawk** pages and its photo, refreshed at most hourly. So at the plane you can check airworthiness and loading, and log or report as usual. A copy shown offline says when it was saved; +- opens without signal: while you're online it saves the **Fleet** page and, for each of your aircraft (up to 10), the **Overview**, **W&B**, **Log Flight** and **Report Squawk** pages and its photo, refreshed at most hourly. So at the plane you can check airworthiness and loading, and log or report as usual. A copy shown offline says when it was saved. Any other page shows the offline page, which links to the saved ones, instead of loading forever: after 10 seconds without an answer, and within a few seconds once the app knows it's offline; - can show notifications (**Profile → This device**). When a new version is installed on the server, a notice offers **Reload**. Signing out clears the forms and pages the device kept; flights or squawks not yet sent stay and are sent the next time you sign in on that device. They're only ever sent under the account that saved them. diff --git a/docs/guide/sharing.md b/docs/guide/sharing.md index 41f28f7..f742c60 100644 --- a/docs/guide/sharing.md +++ b/docs/guide/sharing.md @@ -27,4 +27,4 @@ Give it a label and optionally an expiry. Documents only appear if their visibil ## Activity -The **Activity** tab lists everything done on the aircraft and by whom. **Record history** shows every change to the maintenance records field by field (see [Electronic records and signing](records.md)). +The **Activity** tab lists everything done on the aircraft and by whom, newest first, loading more as you scroll (filter it by category). **Record history** shows every change to the maintenance records field by field (see [Electronic records and signing](records.md)). diff --git a/docs/guide/squawks.md b/docs/guide/squawks.md index 88bed3b..e3d95c3 100644 --- a/docs/guide/squawks.md +++ b/docs/guide/squawks.md @@ -6,9 +6,9 @@ A squawk is a problem found with the aircraft. Anyone on the aircraft can report **Report Squawk** asks for the issue, a priority, optionally the component, attachments (photos, PDFs) and notes. -Without signal (in the installed app: open it, tap the aircraft and **Report Squawk** as usual), the squawk and its photos are saved on the device and sent when the connection is back, like [flights](flights.md#with-no-signal). Sending twice never reports it twice. +Without signal (in the installed app: open it, tap the aircraft and **Report Squawk** as usual), the squawk and its photos are saved on the device and sent when the connection is back, like [flights](flights.md#with-no-signal). A signal too weak to get an answer counts as none: after 10 seconds (a minute with photos) it's saved on the device instead of waiting. Sending twice never reports it twice. -A **Ground Aircraft** squawk notifies the aircraft's other owners and pilots who turned on notifications. +A **Ground Aircraft** squawk notifies everyone else on the aircraft who turned on notifications. | Priority | Meaning | |---|---|