PHPackages                             mattfalahe/mining-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mattfalahe/mining-manager

ActiveSeat-plugin[Utility &amp; Helpers](/categories/utility)

mattfalahe/mining-manager
=========================

Comprehensive mining management plugin for SeAT - Track mining activities, manage moon extractions, calculate taxes, and generate detailed reports

2.0.2(3w ago)12.1k↑65.1%GPL-2.0-or-laterPHPPHP ^8.1

Since Apr 11Pushed 3w agoCompare

[ Source](https://github.com/MattFalahe/Mining-Manager)[ Packagist](https://packagist.org/packages/mattfalahe/mining-manager)[ Docs](https://github.com/MattFalahe/Mining-Manager)[ RSS](/packages/mattfalahe-mining-manager/feed)WikiDiscussions main Synced yesterday

READMEChangelog (7)Dependencies (18)Versions (19)Used By (0)

Mining Manager for SeAT
=======================

[](#mining-manager-for-seat)

[![Latest Version](https://camo.githubusercontent.com/e8372fd2065a5ca53fe72dbb6356d8cc6f0239aa503a64fb610548fcd7727c9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61747466616c6168652f6d696e696e672d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mattfalahe/mining-manager)[![License](https://camo.githubusercontent.com/37c9aa11511cabae70647d9c92694be2a286bd25c284de636a228b0ecff380ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![SeAT](https://camo.githubusercontent.com/e8c0f12080cad134d9c2b4c6e85627cb440853a57a7ec4a5ad270446a988f0ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f536541542d352e782d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/eveseat/seat)

A comprehensive mining management plugin for SeAT 5.x. Track mining operations, manage moon extractions, calculate taxes, and generate detailed reports for your corporation.

**v2.0.2 highlights** — **The Ecosystem Era: Field Repairs**. Real production bugs the v2.0.1 Polish Pass left behind, surfaced when live traffic hit them. Critical fix: **moon\_chunk\_unstable capital-safety warning silently never fired** — `MoonExtractionService::determineStatus()` treated `natural_decay_time` (the auto-fracture mark, ~3h after chunk arrival) as the chunk's expiry; rows got stamped `status='expired'` ~3h after arrival even though they had 50 more hours of mineable life, and the cron filtered them out. Math now mirrors `MoonExtraction::scopeExpiredByTime()` (prefers `fractured_at + 50h`, falls back to `natural_decay_time + 50h` as a conservative estimate). Companion: **`NotificationService::send()` no longer silently skips** — the dispatcher now returns a specific reason ("No enabled channel found...", "Webhook table probe threw...", etc.) so the Diagnostic Notification Testing tab tells you exactly what's wrong instead of `reason: unknown`. New permanent backstop: **`mining-manager:validate-lifecycle-integrity` daily cron** (03:00 UTC, `--quiet-ok`) walks `moon_extractions` and warns when the persisted `status` diverges from the model's helper-computed value; `--fix` flag applies corrections. UX fix: **Mark-as-Paid modal no longer freezes on click** — Bootstrap-meets-AdminLTE CSS stacking context issue; modals now `appendTo('body')` before show. Fairness fix: **tax payments from a player's alt are now accepted** — `WalletTransferService::processTransaction()` was strict per-character match; now accepts payments from any character sharing a SeAT `user_id` (via `refresh_tokens`) with the taxed character, with audit log noting which alt actually paid. New setting `payment.accept_alt_characters` (default `true`, UI toggle at Settings → General) for operators who want strict-only mode. Every item additive, no schema changes, no new ESI scopes.

**v2.0.1 highlights** — The polish pass on top of v2.0.0's ecosystem turn. Director workflows accelerated: inline **Discord role picker** on every per-type role-id input (one-click pick from your installed Discord role source), **Notification Routing Map** (read-only Settings tab showing what fires where and who gets pinged), **Metenox Cargo readout** (director-only sidebar page surfacing what's in every Metenox Moon Drill's `MoonMaterialBay` with ISK valuation, per-drill bay fill %, and solar-system names instead of raw IDs; SeAT admins get a corp-scope picker for install-wide spot-checks while keeping the same Moon Owner Corp default directors see), plus a new **Metenox Cargo Bay Full notification** that fires when a drill crosses the configurable fill threshold (default 85%) — yield-stopping warning so directors can schedule pulls before the bay caps out. MM joins the EventBus producer side via three new `mining.extraction_*` topics (consumable by SeAT Broadcast for FC Opportunities). **Manager Core pricing centralization** — when MC is your price provider, the market + price-type lookup is now centralized in MC's Pricing Preferences page (single source of truth) with live cache invalidation via the new `pricing.preference_changed` EventBus topic; MM's Settings tab becomes a read-only status readout + a "Configure pricing in Manager Core →" deep-link button. Jita fallback now actually works on the MC path (was effectively dead code before). **Per-plugin provider override** — MC's Pricing Preferences page now lets the operator route Mining Manager through a specific provider (e.g. Janice for Jita tax accuracy) while other plugins reading the same market continue through the default provider — independent per-plugin routing without duplicate market rows. Per-surface quality lifts: **live local-time conversion** (every EVE timestamp gets a hover tooltip + opt-in inline pill in your browser's timezone, plus 1-second-tick countdowns on active extractions and upcoming events), **EVE/Local toggle** on event create/edit forms (DST-safe), **jackpot rendering hardened** against custom SeAT themes, **diagnostic page aligned** to the suite-wide standard (Health Checks default tab with intro boxes on every Tier 1 surface). Every item additive, no breaking changes, no new ESI scopes. The pricing centralization story requires Manager Core v1.0.0 (MC's first stable release); MM keeps working without Manager Core installed at all (pricing falls back to direct Fuzzwork / Janice fetches, same as v2.0.0).

**v2.0.0 highlights** — Mining Manager works perfectly fine on its own (every existing v1.0.x install upgrades cleanly without changing a thing). When **Manager Core** is also installed, MM consumes centralised market pricing via the documented PluginBridge contract. When **Structure Manager** is also installed, MM subscribes to SM's structure-threat events and dispatches *Extraction At Risk* (fuel critical, shield/armor/hull reinforced) and *Extraction Lost* (refinery destroyed) notifications with attacker info and a one-click Structure Board deeplink. Both cross-plugin integrations are optional — toggles auto-disable when either plugin is absent.

Features
--------

[](#features)

- **Mining Ledger** -- Automated processing of character and corporation mining data with daily summary aggregation
- **Moon Mining** -- Extraction tracking, ore composition, value estimation, jackpot detection (automatic + manual reporting), chunk arrival alerts. Past Extractions table with sortable/filterable DataTables view, structure column, status filter (expired/fractured/cancelled), and search — scoped to Moon Owner Corporation only
- **Metenox Cargo Readout** *(v2.0.1, director-only)* -- New sidebar page showing what's currently in every Metenox Moon Drill's `MoonMaterialBay` owned by your **Moon Owner Corporation** (matches the Past Extractions table scope and the related notification). Per-drill cards with ore composition, quantity, m³ volume, percent-of-cargo bars, ISK valuation (Manager Core pricing primary, Jita/Fuzzwork fallback), structure state, **solar-system name** (joined from `solar_systems.name` with id-only fallback), and last-polled timestamp (yellow if stale &gt; 2h). Per-drill **bay fill indicator** with color-graded progress bar (500,000 m³ Metenox MoonMaterialBay capacity, verified against SDE attribute 5693 and EVE Ref). **Admin scope picker** -- operators with `mining-manager.admin` get a dropdown above the chips listing every corp with at least one Metenox + an "All corps" aggregate option, defaulting to the same Moon Owner Corp view directors see (one-click "Back to Moon Owner" shortcut whenever off the default). Notifications still scope to Moon Owner Corp only, so admin's expanded read visibility doesn't generate extra alert traffic. **Cargo Bay Full notification** fires when a drill crosses the configurable fill threshold (default 85%, configurable 50-99%) — yield-stopping warning, dedup-latched against repeats while still over threshold, resets when cargo is pulled. Cron `mining-manager:scan-metenox-cargo-fill` every 5 min. Cross-plugin contract: PluginBridge capability `mining.metenox.cargoSnapshot($structureId)` lets Structure Manager render the bay on its structure detail page.
- **Tax System** -- Daily summary-based tax calculation with per-ore rates (moon R4-R64, regular ore, ice, gas, abyssal, triglavian), multi-corporation support, guest mining rates, event modifiers (per-row attribution), configurable minimum tax amount with exempt/enforce behavior, wallet payment verification, and manual payment entry. Supports **monthly** and **biweekly** tax periods with a safe queued-switch mechanism (effective day 3 of next month to prevent row collisions). Weekly period type removed in v2.0.0 — historical weekly rows still render correctly.
- **Mining Events** -- Create events with tax modifiers (tax-free to double-tax). Dedicated `event_mining_records` table materialises the exact mining activity qualifying for each event, with all four scope filters (corporation, location, time, ore category) applied at populate time. Per-row tax attribution: the modifier applies only to mining that actually overlaps the event window, not the whole day. Historical pricing preserved via proportional allocation from the mining ledger. Event form surfaces a live tax-compatibility panel so organisers know which event types are meaningful given current tax settings. *(v2.0.1)* Event create/edit forms gained an **EVE/UTC vs My local time** input toggle with live confirmation box; server still always stores UTC. Miners see their event discount ("saved X ISK") on My Mining and My Taxes; directors see an Event Tax column + 12-month chart.
- **Local time + live countdowns** *(v2.0.1)* -- Every server-rendered EVE timestamp gets a hover tooltip with full local time formatted in your browser's timezone (same mechanism Discord / Google Calendar / GitHub use; DST handled automatically). High-priority surfaces (active extractions, upcoming events, calendar, my-events) opt into an inline " · HH:MM local" pill for at-a-glance reading. `Carbon::diffForHumans()` text replaced with 1-second-tick countdowns color-graded from green (&gt;1d) to red+bold (&lt;1h) on the relevant pages. Browser-TZ readout in Help &amp; Documentation lets operators sanity-check what their browser reports.
- **Reports** -- Daily/weekly/monthly reports with PDF/CSV/JSON export and scheduled Discord/Slack delivery
- **Theft Detection** -- Detect and monitor unauthorized mining with severity classification and incident tracking
- **Dashboard** -- Corporation-wide analytics with 12-month charts, leaderboards, and statistics
- **Notifications** -- 19 notification types via Discord webhooks, Slack, EVE Mail, or custom JSON endpoints, with per-webhook event toggles. Cross-plugin alerts for fuel/shield/armor/hull/destroyed events when Manager Core + Structure Manager are installed. *(v2.0.1)* Inline **Discord role picker** on every per-type role-id input (one-click pick from your installed Discord role source — SeAT Broadcast / SeAT Connector / legacy warlof tables). **Notification Routing Map** read-only Settings tab shows what fires where and who gets pinged at a glance, with "enabled but firing nowhere" warnings.
- **EventBus Publishing** *(v2.0.1)* -- Three new `mining.extraction_*` events published via Manager Core's Topics facade (`ready` / `unstable` / `expired`) once per extraction per lifecycle stage. Rich payload with deeplink URL. New cron `mining-manager:scan-extraction-events` at `*/5 * * * *`. Standalone-safe via `class_exists` guard on `\ManagerCore\Topics`. Consumable by SeAT Broadcast's FC Opportunities board.
- **Diagnostics** -- 16-tab diagnostic suite. *(v2.0.1)* Default tab is now **Health Checks** (renamed from "System Status", reordered to match the suite-wide standard from `feedback_plugin_diagnostic_standard.md`). Tier 1 tabs each open with a "What this tab does / When to use / Heads up" intro box. Tabs: Health Checks, Master Test (one-click read-only smoke chain, ~26 checks, sub-30s), System Validation, Settings Health, Data Integrity, Tax Trace, Notification Testing, plus plugin-specific traces and a DEV-only Test Data tab.

Requirements
------------

[](#requirements)

- SeAT 5.x
- PHP 8.1+
- MariaDB / MySQL

Installation
------------

[](#installation)

```
composer require mattfalahe/mining-manager
php artisan migrate
php artisan db:seed --class=MiningManager\\Database\\Seeders\\ScheduleSeeder
```

After installation:

1. Open SeAT and navigate to **Mining Manager &gt; Settings &gt; General**
2. Set your **Moon Owner Corporation**
3. Configure tax rates in **Settings &gt; Tax Rates**
4. Run the setup wizard to populate your data:

```
php artisan mining-manager:initialize
```

The wizard verifies your settings, populates current month data (prices, mining entries, summaries, extractions), and optionally backfills historical data for reports and analytics.

Configuration
-------------

[](#configuration)

### Key Settings

[](#key-settings)

SettingLocationDescriptionMoon Owner CorporationSettings &gt; GeneralWhich corporation owns the moon structures -- determines observer data scopeTax RatesSettings &gt; Tax RatesPer-corporation rates for moon ore (R4-R64), regular ore, ice, gas, abyssal, triglavian. Period type (monthly / biweekly) and the queued-switch safeguard configured here too.Guest Miner Tax RatesSettings &gt; GeneralGlobal rates for non-member miners on your moons (0% = no tax)Tax SelectorSettings &gt; Tax RatesChoose what ore types to tax (all moon ore / only corp moon ore / none + regular types)Price ProviderSettings &gt; PricingMarket data source (SeAT, Fuzzwork, Janice, or Manager Core)### Corporation Tax Model

[](#corporation-tax-model)

Miner TypeData SourceTax Rate AppliedMember of configured corpMoon observer + character ledgerThat corp's tax ratesGuest miner (not in any configured corp)Moon observer onlyGuest tax rates (from General Settings)Non-member mining elsewhereNot processedNot taxed### Moon Arrival Notification Architecture

[](#moon-arrival-notification-architecture)

Moon arrival notifications use two decoupled systems:

```
┌──────────────────────────────────────────────────────────────────┐
│  STATE SYSTEM (ESI-driven)                                       │
│  - update-extractions every 2h                                   │
│  - Pulls ESI and writes chunk_arrival_time, natural_decay_time,  │
│    fractured_at, status                                          │
│  - Answers: "what does EVE say is happening?"                    │
└──────────────────────────────────────────────────────────────────┘

┌──────────────────────────────────────────────────────────────────┐
│  NOTIFICATION SYSTEM (time-driven)                               │
│  - check-extraction-arrivals every 1 min                         │
│  - Reads stored chunk_arrival_time, compares to now()            │
│  - Answers: "has arrival time passed + unnotified?"              │
│  - Idempotent via notification_sent flag                         │
└──────────────────────────────────────────────────────────────────┘

```

**Mental model: ESI tells us WHAT is happening. The clock tells us WHEN to notify.**

This decoupling means arrivals notify within ~60 seconds of the actual chunk arrival time regardless of ESI refresh timing or outages. The chunk\_arrival\_time is known the moment an extraction is first imported (days or weeks before arrival); the notification watchdog just compares it to the current time.

**Cancellation handling:** If a director cancels an extraction in-game before chunk arrival, EVE sends a `MoonminingExtractionCancelled` character notification. The state system detects this during its next ESI poll and marks the extraction as `cancelled`. The notification watchdog then skips it — no false "Moon Chunk Ready" alert fires at the originally scheduled arrival time.

Permissions
-----------

[](#permissions)

4-tier permission model -- higher tiers inherit all lower tier access.

PermissionTierDescription`mining-manager.view`BaseHelp page access`mining-manager.member`MemberView own mining data, join events, view moon schedules, report jackpots, reprocessing calculator`mining-manager.director`DirectorView all corp data, manage operations, analytics, reports, theft detection`mining-manager.admin`AdminFull control: settings, tax management, delete actions, API, diagnosticsArtisan Commands
----------------

[](#artisan-commands)

33 commands available, 22 run on automated schedules via SeAT's scheduler.

### Operational Commands

[](#operational-commands)

CommandScheduleDescription`mining-manager:process-ledger`Every 30min (:15, :45)Process corporation observer mining data`mining-manager:import-character-mining`Every 30min (:20, :50)Import character mining from SeAT ESI cache`mining-manager:update-extractions`Every 2hRefresh moon extraction data from ESI (state system: what EVE says is happening)`mining-manager:check-extraction-arrivals`Every minuteFire moon\_arrival notifications based on stored chunk\_arrival\_time (notification system: when to notify). Idempotent via notification\_sent flag`mining-manager:update-events`Every minuteAuto-transition event status (planned→active→completed) with notifications, update participant data`mining-manager:cache-prices`Every 4h (:30)Cache market prices from configured provider`mining-manager:update-ledger-prices`Daily 1:00 AMLock in daily session prices for mining entries`mining-manager:update-daily-summaries`Daily 1:30 AMSafety net for non-observer mining data`mining-manager:calculate-taxes`Daily 2:15 AMUpdate running month-to-date tax totals`mining-manager:generate-invoices`Daily 2:30 AMGenerate tax invoices for completed periods with automatic tax code assignment`mining-manager:verify-payments`Every 6h (:05)Match wallet transfers against tax codes`mining-manager:send-reminders`Daily 10:00 AMSend tax payment reminders (if enabled in settings)`mining-manager:generate-reports`Day 9 of month 4:05 AM + hourly (scheduled)Generate monthly report (7 days after finalize-month for collection % to mature) and process user-defined scheduled reports. Dedup guard skips if same period+type exists (use `--force` to override)`mining-manager:recalculate-extraction-values`Twice daily (6AM/6PM)Update moon extraction values with current prices`mining-manager:archive-extractions`Daily 5:05 AMArchive completed extractions older than 7 days`mining-manager:detect-jackpots`Daily 6:05 AMDetect jackpot extractions + verify manual reports`mining-manager:detect-theft`1st and 15th 1:00 AMFull scan for unauthorized moon mining`mining-manager:monitor-active-thefts`Every 6h (:10)Monitor characters already on theft list`mining-manager:finalize-month`2nd of month 2:00 AMPre-calculate summaries for closed month`mining-manager:calculate-monthly-stats`2nd of month 3:00 AM + every 30min (current month)Dashboard statistics### Utility Commands

[](#utility-commands)

CommandDescription`mining-manager:initialize`Guided first-time setup wizard -- verifies settings, populates current month, optional historical backfill`mining-manager:backfill-ore-types`One-time backfill of ore type flags on existing data`mining-manager:backfill-extraction-notifications`Backfill fractured\_at from historical ESI notifications`mining-manager:backfill-extraction-history`Reconstruct moon\_extraction\_history from `MoonminingExtractionStarted` notifications. Recovers past cycles for structures that pre-date plugin install. Progress bars for both dedup and processing passes. Use `--dry-run` to preview, `--structure=ID` to scope to one structure. Automatically invoked during `mining-manager:initialize` (Phase 3 historical backfill)`mining-manager:generate-tax-codes`Generate tax codes for any unpaid taxes missing active codes (auto-generated on invoice creation, this is the manual fallback)`mining-manager:generate-test-data`Generate test data for development/testing`mining-manager:backup-data`Export Mining Manager data for backup or migration`mining-manager:restore-data`Import Mining Manager data from a backup`mining-manager:diagnose-prices`Diagnose price cache health and market data`mining-manager:diagnose-affiliation`Debug character corporation affiliations`mining-manager:diagnose-character`Debug character mining data and imports`mining-manager:diagnose-extractions`Debug moon extraction data and notifications`mining-manager:diagnose-type-ids`Debug ore type ID classificationWebhook Notifications
---------------------

[](#webhook-notifications)

16 notification types across 5 categories. Each webhook can independently toggle which events it receives.

Supported channels: Discord webhooks, Slack, and ESI in-game mail (for tax reminders/invoices/overdue notices).

CategoryEventsDescriptionTaxgenerated, announcement, reminder, invoice, overduePayment lifecycle notificationsMoonarrival, jackpot, chunk-unstableChunk ready, jackpot detection, capital safety warnings (~2h before chunk goes unstable)Eventscreated, started, completedMining event lifecycleTheftdetected, critical, active, resolvedSecurity alertsReportsgeneratedScheduled report deliveryAll dispatch goes through a single `NotificationService` (consolidated from the previous two-dispatcher design) with 5xx/429 retry, per-type master toggles, per-channel filters, and per-webhook subscription gating. Webhooks are routable to the Tax Program Corporation (moon/theft/tax) or global (events/reports).

### Diagnostic Testing

[](#diagnostic-testing)

**Mining Manager → Diagnostic → Notification Testing** provides three test modes for verifying webhook configuration:

ModeScopePurpose**Preview Test**One webhook (selected or custom URL)Check embed layout + single-webhook wiring — renders without writing to audit log**Fire Live Notification**Full pipeline, one type, all subscribed webhooksEnd-to-end verification for one specific surface. Respects corp scoping + all gates. Writes audit log.**Fire ALL (Chain)**Full pipeline, all 16 types sequentiallyPost-deploy smoke test — every subscribed webhook receives every type in ~24 secondsSettings → Webhooks → **Test** button sends a minimal "✅ Webhook Active" ping for wiring verification.

Support
-------

[](#support)

- **Issues**: [GitHub Issues](https://github.com/MattFalahe/Mining-Manager/issues)
- **Wiki**: [Documentation &amp; Screenshots](https://github.com/MattFalahe/Mining-Manager/wiki)
- **In-App Help**: Full documentation available at Settings &gt; Help within the plugin

License
-------

[](#license)

GNU General Public License v2.0 -- see [LICENSE](LICENSE) for details.

---

*EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide.*

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance96

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

7

Last Release

24d ago

Major Versions

1.0.3 → 2.0.02026-05-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0a1dd29a419ebc176eeb45fbf4ab22e388fa624f99c4ecc94976b73cb50d6ca?d=identicon)[MattFalahe](/maintainers/MattFalahe)

---

Top Contributors

[![MattFalahe](https://avatars.githubusercontent.com/u/47831385?v=4)](https://github.com/MattFalahe "MattFalahe (5 commits)")

---

Tags

pluginmoonmanagementminingtaxeveeveonlineseatcorporation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mattfalahe-mining-manager/health.svg)

```
[![Health](https://phpackages.com/badges/mattfalahe-mining-manager/health.svg)](https://phpackages.com/packages/mattfalahe-mining-manager)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[eveseat/seat

Simple Eve Api Tool

45819.5k](/packages/eveseat-seat)[firefly-iii/data-importer

Firefly III Data Import Tool.

8035.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
