Add base_price/per_nm/multiplier to the fare form, the subfleet fares
relation manager (toggleable, shown when auto pricing is on and hidden
otherwise, with the static price column inverted), and the low_cost toggle
to the airline form. Round-trip the new columns through the fare
importers/exporters.
Add FareService::getAutoPrice() — (base + distance_nm * per_nm) * multiplier
* low_cost_factor, clamped to >= 0 — and apply it in saveToPirep() when
fares.auto_price is enabled. Distance is the great-circle nm between the
PIREP airports (new GeoService::airportDistance()), falling back to the
PIREP's stored distance, so it works for scheduled and free flights.
Seed fares.auto_price (opt-in toggle, default off) and
fares.low_cost_multiplier, with an idempotent data migration for existing
installs. Render float-typed settings as numeric inputs on the Settings page.
Add base_price, per_nm and multiplier to fares (overridable per subfleet
via the subfleet_fare pivot) and a low_cost flag to airlines, with model
fillable/casts and factory defaults.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Migrated frontend tooling commands from npm/npx to Bun/Bunx for
version bumping, setup, and development.
* Updated build/test scripts to run Vite directly and adjusted asset
build invocation to use Bun tooling.
* Bumped Vite from 8.0.10 to 8.0.16.
* Updated the release workflow to set up Bun and use Bun for installs
and front-end builds.
* **Documentation**
* Revised Sail command examples to use `bun run dev` instead of `npm run
dev`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- run release workflow asset build through bun (setup-bun + bun install/build)
- update Sail README example to bun run dev
- remove stale package-lock.json now that bun.lock is authoritative
Just the groundwork
- If not installed, runs a scan of the filesystem, creates
`bootstrap/cache/addons.php`, with all addons enabled == true
- If phpvms is installed:
- bootstrap cache holds the paths, continues to load
- still does a filesystem scan (we maybe can disable this later -> once
the "install from zip" or "install from registry is enabled"
- If it detects a new addon -> write to cache, but disabled
- When an addon is enabled/disabled -> write to the database and then
update the cache
- If the cache file is deleted -> it will do a database lookup and
re-build it - **HOWEVER this needs testing** if DB access is available
at that time
- They need to be in the bootstrap cache -> addons need to have their
status available at `register()` time - otherwise, filament hooks won't
run for the admin panel, and other service provider registrations might
not run properly
Additionally:
- Moved a lot of bootstrap standard stuff into the addon's service
provider contract - so the new modules/addons can be pretty thing
- Support the "old" style addon root == namespace, or the newer `/app`
== namespace (see the sample addon in tests)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* New addon management system with boot-cache, discovery, DB sync,
Filament resource support, and public asset linking
* Addons admin page for enable/disable/delete
* Console commands to prime addon cache and rebuild asset links
* **Bug Fixes**
* Simplified and more reliable module/addon activation flow
* **Chores**
* Removed legacy modules dependency and migrated helpers/controllers and
Sample module
* **Documentation**
* Added addon implementation guide and workflow docs
* **Tests**
* Extensive feature/unit tests covering addon lifecycle, loading, and
tooling
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Removed legacy sidebar rendering for module links in favor of native Filament sidebar items.
- Backfilled `addons.name` column using data from `module.json` or fallback derivation logic.
- Enhanced compatibility for Octane by ensuring idempotent handling of legacy admin links.
- Introduced `addon_vite` helper for rendering Vite tags from addon manifests.
- Updated `AddonAssetLinker` to ensure consistent handling of lower-cased paths for addon symlinks.
- Added extensive unit and feature tests for addon navigation, asset linking, and legacy handling.
- Updated configuration and boot cache logic to support test isolation and improved flexibility.
- Introduced `AddonSource` interface and concrete `UrlSource` and `ZipSource` implementations for handling addon payloads.
- Added `AddonValidator` for extracting and validating addon manifests and autoload paths.
- Implemented `install` and `update` methods in `AddonRegistry` to support lifecycle management.
- Integrated Octane worker reloading functionality via `OctaneReloader`.
- Added unit and feature tests for installation, update handling, validation, and new behavior.
- Added `AddonAssetLinker` to manage public asset symlinks for addons.
- Introduced the `addons:relink` Artisan command to rebuild asset links for enabled addons.
- Updated `AddonRegistry` to support asset linking/unlinking functionality.
- Adjusted configuration to set `addons.paths.assets` to `public/ext`.
- Added unit and feature tests for `AddonAssetLinker` and the new command.
- Removed `Module` and `ModuleRepository` compatibility shims.
- Replaced NWIDART `Module` facade usages with the new `AddonRegistry`.
- Updated frontend controllers to use `AddonRegistry` for module handling.
- Added new feature tests to cover `AddonRegistry` lifecycle and rebuild cases.
- Updated bootstrapping logic and service bindings to drop NWIDART dependencies.
# Conflicts:
# app/Models/Flight.php
# app/Support/Utils.php
- Introduced `fromManifest` method to create `Addon` instances from manifest data.
- Added PHPDoc annotations for improved type documentation and clarity.
- Removed the obsolete `AddonRegistry` class and associated tests.
- Simplified addon boot cache logic by consolidating responsibilities into `BootCache`.
- Updated service bindings to align with the new architecture.
- Refactored tests for Filament, ModuleShim, and addon discovery to reflect the changes.
- Updated class names across models, services, and related files to improve clarity.
- Adjusted type hints, annotations, and method signatures to reflect the renames.
- Improved code consistency and alignment with updated naming conventions.
- Removed outdated AddonsTableTest and related assertions.
- Unified service namespaces: migrated support classes to `Support` and service classes to `Services`.
- Added `name` column to the `addons` table and updated related models, migrations, and seeders.
- Replaced `AddonBootService` references with `AddonRuntimeService` throughout tests and codebase.
- Updated Rector configuration and Mago schema, improving import handling and schema validation.
- Simplified addon discovery logic, enhancing boot cache performance.
- Removed unused methods and adjusted runtime behavior for stricter validation and consistency.
- Renamed `addons.base_path` to `addons.paths.base` in configuration files.
- Added `schema_version` handling to `ManifestParser` to improve compatibility.
- Updated documentation with detailed addon implementation and boot process.
- Removed deprecated and unused configuration entries from `composer.json`.
Signed-off-by: Nabeel Shahzad <99736+nabeelio@users.noreply.github.com>
- Renamed `PrimeService` to `AddonRuntimeService` for clarity and alignment with functionality.
- Introduced a new `discoverNewAddons()` method for identifying and handling unregistered addons.
- Updated test cases, services, and commands to use the new service class.
- Improved addon discovery logic and boot cache handling.
- Replaced `registry_id` uniqueness constraint with nullable definition to allow legacy addons.
Signed-off-by: Nabeel Shahzad <99736+nabeelio@users.noreply.github.com>
Replace the bespoke HashIdTrait with a Laravel-standard HasNanoIds trait
built on HasUniqueStringIds, mirroring HasUuids/HasUlids. Generation and
validation go through new Str::nanoid()/Str::isNanoid() macros (wrapping
hidehalo/nanoid), with the alphabet/length co-located on
App\Contracts\Model.
- Apply HasNanoIds to Pirep, Flight, Acars, File; drop manual $keyType
and the now-redundant #[WithoutIncrementing] attribute
- Deprecate Utils::generateNewId() as a shim over Str::nanoid() and
migrate callers (FlightImporter, Maintenance, RouteForgeService,
FileService, VMSAcars)
- Remove HashIdTrait
- Factories generate nanoid ids so test data matches production
- Fix FlightService::getAccessibleFlightIds() casting nanoid flight ids
to int (0), which broke flight search under rank/typerating
restrictions, and drop matching (int) casts from the affected test
assertions
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Migrated primary key generation from HashId to NanoId across models
(Acars, File, Flight, Pirep), changing the ID format and generation
mechanism.
* **New Features**
* Added Nano ID validation and generation utilities for string-based
primary keys.
* **Tests**
* Added comprehensive test coverage for Nano ID functionality, including
generation, validation, and model binding behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
- Removed legacy sidebar rendering for module links in favor of native Filament sidebar items.
- Backfilled `addons.name` column using data from `module.json` or fallback derivation logic.
- Enhanced compatibility for Octane by ensuring idempotent handling of legacy admin links.
- Introduced `addon_vite` helper for rendering Vite tags from addon manifests.
- Updated `AddonAssetLinker` to ensure consistent handling of lower-cased paths for addon symlinks.
- Added extensive unit and feature tests for addon navigation, asset linking, and legacy handling.
- Updated configuration and boot cache logic to support test isolation and improved flexibility.
- Introduced `AddonSource` interface and concrete `UrlSource` and `ZipSource` implementations for handling addon payloads.
- Added `AddonValidator` for extracting and validating addon manifests and autoload paths.
- Implemented `install` and `update` methods in `AddonRegistry` to support lifecycle management.
- Integrated Octane worker reloading functionality via `OctaneReloader`.
- Added unit and feature tests for installation, update handling, validation, and new behavior.
- Added `AddonAssetLinker` to manage public asset symlinks for addons.
- Introduced the `addons:relink` Artisan command to rebuild asset links for enabled addons.
- Updated `AddonRegistry` to support asset linking/unlinking functionality.
- Adjusted configuration to set `addons.paths.assets` to `public/ext`.
- Added unit and feature tests for `AddonAssetLinker` and the new command.
- Removed `Module` and `ModuleRepository` compatibility shims.
- Replaced NWIDART `Module` facade usages with the new `AddonRegistry`.
- Updated frontend controllers to use `AddonRegistry` for module handling.
- Added new feature tests to cover `AddonRegistry` lifecycle and rebuild cases.
- Updated bootstrapping logic and service bindings to drop NWIDART dependencies.
- Introduced `fromManifest` method to create `Addon` instances from manifest data.
- Added PHPDoc annotations for improved type documentation and clarity.
- Removed the obsolete `AddonRegistry` class and associated tests.
- Simplified addon boot cache logic by consolidating responsibilities into `BootCache`.
- Updated service bindings to align with the new architecture.
- Refactored tests for Filament, ModuleShim, and addon discovery to reflect the changes.
- Updated class names across models, services, and related files to improve clarity.
- Adjusted type hints, annotations, and method signatures to reflect the renames.
- Improved code consistency and alignment with updated naming conventions.