mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
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>
51 lines
1.6 KiB
Ruby
51 lines
1.6 KiB
Ruby
Rails.application.routes.draw do
|
|
resource :session
|
|
resources :passwords, param: :token
|
|
resource :setup, only: %i[new create], controller: "setup"
|
|
resource :profile, only: %i[edit update]
|
|
|
|
resources :aircraft do
|
|
member do
|
|
patch :hours, action: :update_hours
|
|
end
|
|
|
|
resources :components do
|
|
member { post :reset_service }
|
|
end
|
|
resources :squawks, except: :show do
|
|
member do
|
|
patch :resolve
|
|
patch :reopen
|
|
end
|
|
end
|
|
resources :notes, except: :show
|
|
resources :flight_logs, only: %i[index new create show destroy]
|
|
resources :consumable_records, path: "consumables", except: :show
|
|
resources :logbook_entries
|
|
resources :documents
|
|
resources :document_collections, except: %i[index show]
|
|
resources :inspections, only: :index
|
|
resources :inspection_types, except: %i[index show]
|
|
resources :inspection_records, except: %i[index show]
|
|
resources :airworthiness_directives, path: "ads", except: :show do
|
|
collection { post :attach }
|
|
end
|
|
resources :ad_compliances, except: %i[index show]
|
|
resources :major_records
|
|
resources :aircraft_roles, path: "access", only: %i[index create update destroy]
|
|
resources :share_tokens, only: %i[create destroy]
|
|
resources :events, only: :index
|
|
end
|
|
|
|
# Public read-only share links (no login).
|
|
get "shared/:token", to: "shared#show", as: :shared
|
|
|
|
namespace :admin do
|
|
resources :users, except: :show
|
|
resources :component_types, except: :show
|
|
end
|
|
|
|
get "up" => "rails/health#show", as: :rails_health_check
|
|
root "aircraft#index"
|
|
end
|