AAdvantage Miles Reward System

This community has given me so much in the last 2 decades, and I’ve personally never had the chance to give anything back. Well, it’s time to change that.
Attached is a module we have developed for our beloved Virtual Airline, and we have repackaged it for installation into a vanilla phpVMS v7 (tested).
We use it daily, and it is extremely popular among our crews. We hope it will be useful for you as well :flexed_biceps::heart_hands:
 

Description
 

An easy, automated way to reward pilots, create incentives, promote destinations, unlock special flights (or Rank-Free flights), and even reward real-world items (gift cards, sponsors’ perks, etc.)?
AAdvantage Miles is a lightweight, production-tested module that adds miles/points to your VA with automatic earning rules, leaderboards, and an optional in-VA Shop with “special” Flight Passes for sale.
 

Why it’s good for your VA (and keeps pilots hooked):

  • Fly → Earn → Unlock: clear progression loop that turns every flight into visible progress.
  • Zero micromanagement: automated awards align with your rules (time flown, landing quality, airports), so good behavior is reinforced without admin work.
  • Daily habit builder: login miles, create streaks, and reasons to come back, even on non-flying days.
  • Friendly competition: leaderboards spark rivalry and social proof, boosting activity across the week.
  • Real rewards, not fluff: the Shop converts effort into perks (simulated or not); Flight Passes add scarcity and excitement (including Ranks-Free access when you want it).
  • Event-ready: drop special routes/passes for weekends or special rewards to spike engagement on demand.
  • Trust & transparency: per-pilot ledger shows exactly how miles were earned/spent.

Result: more flights, better flying, happier pilots - on autopilot.

 

_ What it does _

  • Per-pilot miles ledger
  • Full earn/spend history

_ Auto-awards _

  • Daily login miles (idempotent)
  • PIREP rules: miles/minute, smooth-landing bonus, bad-landing penalty, score bonus (with cap)
  • Airport-specific bonuses (per rule: departure/arrival / both)

Frontend pages

  • My Miles, Leaderboard, Shop, My Purchases

 

_ Admin tools _

  • Settings (toggle/tune all rules)
  • Manage Pilot Miles (search, review history, add/subtract with note)
  • Shop Admin (categories/products, stock, per-user limits, purchase ledger)
  • Flight Passes (optional)
  • Create Pass products targeting a specific flight (Flight ID)
  • Optional aircraft pre-bind for SimBrief / aircraft lock
  • Direct-bid endpoint for pass owners
  • Auto-marks Pass “used” when the related PIREP is filed
  • Default expiry: 30 days
  • New: Bid strictness options
  • Off → Pass bids bypass rank/type checks (only the core “at departure airport” rule applies). Ideal for “selling” access to flights to lower ranks
  • On → Pass bids must satisfy your VA’s current rank/type restrictions (module validates pilot eligibility and subfleet/flight compatibility)

 

_ Compatibility _

  • phpVMS v7 (Laravel 8+)
  • DB: JSON columns required (MySQL 5.7+ / MariaDB 10.2+)
  • Views namespaced as AAMiles:: and override-friendly

 

_ Quick install _

  • Copy folder to: modules/AAdvantageMiles
  • Admin → Addons → Modules → Enable
  • PHPVMS Update → visit your.domain/update (runs migrations)
  • Admin → Maintenance → Clear All Caches
  • Configure under Admin → AAdvantage Miles

That’s it — pilots start earning based on your settings.

**A comprehensive README file is included**
Download Link: AAdvantage Miles Addon Module
___

ShopManageMiles.png.55f112f3bcfa30c06b8fd2e5f052a262.png

ShopAdmin.png.1ca5fb0b3b429ee5a3ad0af95ca98b6f.png

ShopEditProduct.png.e6a9db609b072ccdaaeb29fd7e97a098.png

PurchasedPage.png.42f0613bdc1f0d07e8dc268512a48503.png

AdminSetting.png.4abf6adb9b17204e334d772440bf8eec.png

CompanyMiles.png.711b02c398d3f6482b572267625f7839.png

Dashboard.png.19786ad733fdbc9c999f1f96854840a1.png

FlightBid.png.f696d25daa69798de38e167bc2610ab0.png

FlightPurchase.png.3fd591a98f42e576c58bd97aaba93954.png

MilesShop.png.e766b963ab458983c028437cca90e9b0.png

Great news…

 

First of all congratulations and thank you for your efforts, considering community and sharing your work.

 

Will try to test it on some non vanilla installs

 

1 Like

Congratulations! 👍