Search by

temetvince / seat-capitals

temetvince

Capital ship tracking for SeAT

Package info

github.com/temetvince/seat-capitals

pkg:composer/temetvince/seat-capitals

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-09-25 16:27 UTC

This package is auto-updated.

Last update: 2026-09-25 16:34:18 UTC


README

Capital ship management for SeAT, the EVE Online corporation manager. This is a SeAT 5 plugin: a Composer package that Laravel discovers automatically once it is installed into a SeAT instance.

It does three things:

  • Applications. A member asks to build a capital hull for one of their characters and explains why.
  • Review. Reviewers approve or deny pending applications, with an optional note to the applicant.
  • Report. A table of every capital hull owned by the characters in scope, with the solar system each hull sits in, filterable by system and extendable to the owners' alts.

Every hull in the report comes from the character assets SeAT already syncs from ESI. Whether a hull went through an application makes no difference to the report.

Installation

  1. Add the package to the SeAT instance:

    composer require temetvince/seat-capitals
  2. Run the migrations and refresh the caches:

    php artisan migrate
    php artisan config:cache
    php artisan route:cache
  3. Grant permissions to roles (see below). The Capitals group appears in the sidebar for every user holding at least one of them.

  4. Optionally subscribe a notification group to the two Capitals alerts, and set the home systems under Capitals > Settings.

Permissions

Permission Where in the role editor Grants
capitals.apply Capitals tab Submit, follow and withdraw applications for the user's own characters.
capitals.review Capitals tab See every application, approve or deny pending ones, and edit the plugin settings.
character.capitals Character tab Open the report. Its character, corporation and alliance filters decide whose hulls appear.
capitals.report_all Capitals tab Unlock the "Everyone in SeAT" option on the report, which ignores the role filters.

The report permission lives in SeAT's character scope on purpose. Set the role's filter to your corporation and the report shows exactly the hulls of characters in that corporation. Without a filter the report shows every character SeAT knows. Admin users always see everything.

Screens

Screen Route Permission What it shows
My applications /capitals/applications capitals.apply The application form and the user's own applications with their status and any reviewer note.
Review applications /capitals/review capitals.review Every application. Pending rows carry approve and deny buttons that open a note dialog.
Capital report /capitals/report character.capitals Every capital hull in scope with its owner, the owner's main and current corporation, hull, class, ship name, assembled or packaged state, and system.
Settings /capitals/settings capitals.review The home systems that pre-fill the report filter.

Report filters

  • Systems. A multi-select backed by SeAT's system lookup. It starts with the configured home systems selected. Clear it to see hulls everywhere.
  • Characters. Whose hulls to list. "In my scope, plus their alts" is the default: the characters the viewer's role filters allow, widened to every character registered under the same SeAT account, so a corp member's out-of-corp alts get listed. "In my scope" drops the alts. "Everyone in SeAT" ignores the role filters and covers every character SeAT knows, which is how a pilot who left the corporation but still has a token stays visible; it appears only for viewers holding capitals.report_all. The Main and Corporation columns show whose account a hull belongs to and where that character is now, so departed members and out-of-corp alts are easy to spot.

How a hull's system is found

ESI reports a location id and a location type per asset. The report resolves them in this order and takes the first hit: the asset's own system when it is in space, the station or structure it is docked in, the same two rules applied to the item that contains it, then the map id SeAT's location job derived from coordinates. A hull whose location cannot be resolved shows an unknown system and is excluded by any system filter.

Application lifecycle

From To Who Rule
– Pending applicant The character must be linked to the applicant, the hull must be a capital, and no pending application may exist for the same character and hull.
Pending Withdrawn applicant Only the applicant.
Pending Approved or Denied reviewer Records the reviewer, the note and the time, and writes a line to SeAT's security log.

Every other transition is refused. Rows are never deleted, so the history stays auditable.

Notifications

Two alerts are registered with eveseat/notifications. Subscribe a notification group to them and each of its Discord, Slack or mail integrations receives the message.

Alert Fires when
Capitals: new build application An application is submitted. Links to the review page.
Capitals: application approved or denied A reviewer decides. Links to the applications page.

Notification text is English, as with SeAT's own notifications, because webhook and mail messages have no viewer locale.

Configuration

Publish the config file to change which SDE groups count as capital hulls:

php artisan vendor:publish --tag=seat-capitals

config/seat-capitals.php then holds capital_groups, a map of invGroups.groupID to a label. The default lists titans, dreadnoughts, lancer dreadnoughts, carriers, supercarriers, force auxiliaries, capital industrial ships, freighters and jump freighters. A group not listed can neither be applied for nor appears in the report.

Home systems are stored as a SeAT global setting, edited from the Settings screen.

Development

The plugin is developed against the upstream SeAT source for reference and tested in isolation with Orchestra Testbench on in-memory SQLite. It needs PHP 8.1 or newer and Composer.

Task Command
Install dependencies composer install
Run the tests composer test
Check code style composer lint
Fix code style composer format
Static analysis composer analyse
Everything, as CI would composer check

Upstream's migrations target MySQL, so the tests create SQLite stand-ins for the upstream tables the plugin reads (tests/database/migrations). The plugin's own table comes from its real migration.

To try the plugin inside a running SeAT, add this directory to that instance's composer.json as a path repository, then require it:

{
  "repositories": [
    { "type": "path", "url": "../plugins/seat-capitals" }
  ]
}
composer require temetvince/seat-capitals:@dev

SeAT's settings page reports the plugin version as missing for a path install. That is expected: the version comes from Composer's installed-package metadata, which a path repository does not carry.

File map

Path Role
src/CapitalsServiceProvider.php Registers permissions, sidebar, config, alerts, views, translations, migrations, routes and the model observer.
src/Acl/ReportPolicy.php Gate for character.capitals; answers the bare check and defers character checks to SeAT's policy.
src/Config/ Permissions per scope, sidebar group, capital groups, notification alerts.
src/Models/ CapitalApplication and its ApplicationStatus enum; CapitalHull, the typed read model behind the report.
src/Services/ApplicationWorkflow.php The only writer of applications; owns every status transition.
src/Services/CapitalCatalog.php Which SDE groups are capitals; lists hulls for the form.
src/Services/CapitalFleetQuery.php The report query, including solar system resolution.
src/Services/AltResolver.php Widens a character set to same-account characters.
src/Settings/HomeSystems.php The home systems global setting.
src/Http/Controllers/ Thin controllers per screen.
src/Http/DataTables/ The applications and report tables and their scopes.
src/Http/Validation/ Form request shape checks.
src/Notifications/ Discord, Slack and mail notifications for both alerts.
src/Observers/CapitalApplicationObserver.php Raises the alerts when applications are created or decided.
src/resources/views/ Blade views in the seat-capitals:: namespace.
src/resources/lang/en/ English translations in the seat-capitals:: namespace.
src/database/migrations/ The seat_capitals_applications table.
tests/Unit/ Plain PHPUnit tests for framework-free classes.
tests/Feature/ Testbench tests for the workflow, report query, alt resolution, settings and provider.

License

Released into the public domain under the Unlicense.