Initial commit: Rails port of Simple Aircraft Manager

Rails 8.1 + SQLite rewrite of marbindrakon/simple-aircraft-manager,
designed to self-host as a single container (Solid Queue/Cache/Cable,
Active Storage on disk, Hotwire + importmap, Tailwind).

- Airworthiness engine ported from health/services.py (ADs, grounding
  squawks, inspection recurrency, component replacement)
- Hours updates and flight logs cascading to in-service components,
  optional airworthiness enforcement
- Components, squawks, ADs, inspections, logbook, documents, major
  records, oil/fuel consumption stats and charts, activity log
- Admin/owner/pilot RBAC and public share links (status/maintenance)
- Docker Compose and Kamal deployment, env-driven production config
- Service and integration tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-04 17:59:08 -05:00
commit 38df19c331
264 files changed
+8365

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
<% content_for :title, "Log Flight" %>
<%= render "shared/aircraft_header", aircraft: @aircraft %>
<%= form_with model: [@aircraft, @flight_log], class: "card card-body space-y-5 max-w-3xl" do |f| %>
<%= f.errors_summary %>
<div class="grid gap-4 sm:grid-cols-3">
<%= f.field :date, as: :date, required: true %>
<%= f.field :departure_location, label: "From", placeholder: "KPVD" %>
<%= f.field :destination_location, label: "To", placeholder: "KBID" %>
</div>
<fieldset class="grid gap-4 sm:grid-cols-3">
<legend class="mb-2 text-sm font-semibold">Tach (required)</legend>
<%= f.field :tach_out, as: :number, step: 0.1, label: "Tach out" %>
<%= f.field :tach_in, as: :number, step: 0.1, label: "Tach in" %>
<%= f.field :tach_time, as: :number, step: 0.1, label: "…or duration", hint: "Calculated from out/in if blank." %>
</fieldset>
<fieldset class="grid gap-4 sm:grid-cols-3">
<legend class="mb-2 text-sm font-semibold">Hobbs (optional)</legend>
<%= f.field :hobbs_out, as: :number, step: 0.1, label: "Hobbs out" %>
<%= f.field :hobbs_in, as: :number, step: 0.1, label: "Hobbs in" %>
<%= f.field :hobbs_time, as: :number, step: 0.1, label: "…or duration" %>
</fieldset>
<fieldset class="grid gap-4 sm:grid-cols-3">
<legend class="mb-2 text-sm font-semibold">Oil & fuel added</legend>
<%= f.field :oil_added, as: :number, step: 0.25, label: "Oil added (qt)" %>
<%= f.field :oil_level_after, as: :number, step: 0.25, label: "Oil level after (qt)" %>
<%= f.field :oil_added_type, label: "Oil type", placeholder: "Aeroshell W100" %>
<%= f.field :fuel_added, as: :number, step: 0.1, label: "Fuel added (gal)" %>
<%= f.field :fuel_level_after, as: :number, step: 0.1, label: "Fuel level after (gal)" %>
<%= f.field :fuel_added_type, label: "Fuel type", placeholder: "100LL" %>
</fieldset>
<%= f.field :route, as: :textarea, rows: 2 %>
<%= f.field :notes, as: :textarea, rows: 2 %>
<%= f.field :track_log, as: :file, label: "Track log (GPX/KML/CSV)" %>
<p class="hint">Saving adds the tach time to the aircraft and all in-service components, and records any oil/fuel added.</p>
<div class="flex gap-2"><%= f.submit "Log Flight" %><%= link_to "Cancel", aircraft_flight_logs_path(@aircraft), class: "btn-secondary" %></div>
<% end %>