PHPackages                             seatplus/eveapi - 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. [API Development](/categories/api)
4. /
5. seatplus/eveapi

ActiveLibrary[API Development](/categories/api)

seatplus/eveapi
===============

API for receiving information from esi

4.1.5(2w ago)06.0k1[7 issues](https://github.com/seatplus/eveapi/issues)3MITPHPPHP ^8.3CI failing

Since Apr 25Pushed 2w ago1 watchersCompare

[ Source](https://github.com/seatplus/eveapi)[ Packagist](https://packagist.org/packages/seatplus/eveapi)[ RSS](/packages/seatplus-eveapi/feed)WikiDiscussions 4.x Synced today

READMEChangelog (10)Dependencies (63)Versions (127)Used By (3)

seatplus/eveapi
===============

[](#seatpluseveapi)

[![Latest Version on Packagist](https://camo.githubusercontent.com/2fa65e46c439abfb80e01d361e7c036e90426f4151603a32f5441893f83a1647/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73656174706c75732f6576656170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seatplus/eveapi)[![Tests](https://github.com/seatplus/eveapi/actions/workflows/tests.yml/badge.svg?branch=4.x)](https://github.com/seatplus/eveapi/actions/workflows/tests.yml)[![Formats & Static Analysis](https://github.com/seatplus/eveapi/actions/workflows/formats.yml/badge.svg?branch=4.x)](https://github.com/seatplus/eveapi/actions/workflows/formats.yml)[![Total Downloads](https://camo.githubusercontent.com/ce649786755e2dd0fdd50b0cd40b58d2bcf92822e503fad64e0062ee2f7ecb3b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73656174706c75732f6576656170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seatplus/eveapi)[![License](https://camo.githubusercontent.com/d74e92735964bbb1baea0f6383b4c8ce2871a7ed834077e2aee2469d113851b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73656174706c75732f6576656170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seatplus/eveapi)[![PHP](https://camo.githubusercontent.com/babd7e3129d8a7d64a7e41edc6f736ffeb653cf968dfc0a5ccf472ab01bad5d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f73656174706c75732f6576656170692f7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/seatplus/eveapi)

The EVE Online data-fetching layer for the seatplus platform. Provides queued ESI jobs, Eloquent models for EVE entities, Laravel Horizon integration, SDE import, and reactive character scheduling.

---

Architecture
------------

[](#architecture)

`eveapi` is the second tier of the four-package seatplus monorepo. It has a strict one-way dependency hierarchy:

```
esi-client   (standalone Guzzle HTTP client, RFC 7234 caching)
     ↓
eveapi       ← YOU ARE HERE
     ↓
auth         (EVE OAuth, role system, SSO compliance)
     ↓
web          (Vue 3 + Inertia.js frontend — optional)

```

Lower packages never import from higher packages.

### ESI Data Flow

[](#esi-data-flow)

```
Queued ESI Job (EsiJob subclass)
       │
       ▼ handle() — injected by container
EsiJob — refreshes token, sets rate-limit context
       │ EsiClient (RecordingEsiClient in production)
       ▼
OPERATION_CLASS::execute($esi, ...) — esi-schema static call
       │ EsiResult (typed DTO, isCachedLoad flag)
       ▼
executeJob() — DB upsert inside a DB::transaction

```

Recording happens transparently: `RecordingEsiClient` wraps every `invoke()` call and stores `X-Ratelimit-Remaining` + `X-ESI-Error-Limit-Remain` in Redis for the proactive rate-limit guard.

For full architecture decisions see [ARCHITECTURE.md](ARCHITECTURE.md).

---

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

[](#requirements)

DependencyVersionPHP^8.3Laravel^13.0PostgreSQL17+ (tests), any for productionRedis7+ (required for Horizon and rate-limit tracking)seatplus/esi-client^4.1seatplus/esi-schema^1.3 (transitive)---

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

[](#installation)

```
composer require seatplus/eveapi
```

Publish and run the migrations:

```
php artisan migrate
```

---

Features
--------

[](#features)

### ESI Queue Jobs

[](#esi-queue-jobs)

All ESI leaf jobs extend `EsiJob` (`ShouldQueue` + `ShouldBeUnique`, 10 tries, exponential backoff). Each job declares the esi-schema resource class it calls via `OPERATION_CLASS`, and implements `tags()` and `executeJob()`. For authenticated endpoints, override `getRefreshToken()`.

**Public endpoint example:**

```
final class CharacterInfoJob extends EsiJob
{
    protected const string OPERATION_CLASS = GetCharactersCharacterId::class;

    public function __construct(public int $character_id) {}

    public function tags(): array
    {
        return ['character', 'info', "character_id:{$this->character_id}"];
    }

    public function executeJob(EsiClient $esi): void
    {
        $response = self::OPERATION_CLASS::execute($esi, $this->character_id);

        if ($response->isCachedLoad) {
            return;
        }

        CharacterInfo::updateOrCreate(
            ['character_id' => $this->character_id],
            ['name' => $response->name, ...],
        );
    }
}
```

**Authenticated endpoint** — additionally override `getRefreshToken()`:

```
public function getRefreshToken(): RefreshToken
{
    return RefreshToken::findOrFail($this->character_id);
}
```

**Paginated endpoint** — loop manually using `$response->pages`:

```
$page = 1;
do {
    $response = self::OPERATION_CLASS::execute($esi, $this->character_id, $page);
    if ($response->isCachedLoad) { return; }
    // ... collect $response->data ...
    $page++;
} while ($page pages);
```

### Eloquent Models for EVE Data

[](#eloquent-models-for-eve-data)

EntityModelsCharacter`CharacterInfo`, `CharacterAffiliation`, `CharacterRole`, `CorporationHistory`Corporation`CorporationInfo`, `CorporationMemberTracking`, `CorporationDivision`Alliance`AllianceInfo`Assets`Asset`Mail`Mail`, `MailRecipients`Skills`Skill`, `SkillQueue`Other`RefreshToken`, `SsoScopes`, `Schedules`, `BatchUpdate`, `BatchStatistic`### Reactive Character Scheduling

[](#reactive-character-scheduling)

`CharacterBatchJob` self-reschedules character data refreshes based on ESI `Cache-Control` / `Expires` headers. When a character's refresh window opens, the job re-queues itself automatically — no cron polling required.

### ESI Rate-Limit Tracking

[](#esi-rate-limit-tracking)

Per-`(group, characterId)` bucket tracking prevents hitting ESI error limits. Jobs back off transparently when a bucket is close to the limit.

### SDE Import

[](#sde-import)

Imports the EVE Static Data Export (universe types, groups, categories, regions, constellations, and solar systems) directly from CCP's FTP:

```
php artisan seatplus:sde-import

# Or from a local zip (skips download):
php artisan seatplus:sde-import --source=/path/to/sde.zip
```

The SDE import is also scheduled to run automatically every week.

### EVE-Compliant User-Agent

[](#eve-compliant-user-agent)

On boot, `EveapiServiceProvider` sets the EVE-compliant `User-Agent` header (sourced from `seatplus/esi-client`'s `EsiConfiguration`) on all outbound Guzzle requests.

---

Artisan Commands
----------------

[](#artisan-commands)

CommandDescription`seatplus:sde-import`Download and import the EVE SDE`seatplus:check:endpoints`Verify configured ESI endpoints are reachable`seatplus:cache:clear [--force]`Clear the ESI HTTP response cache---

Testing
-------

[](#testing)

Tests require a running PostgreSQL instance (`seatplus`/`secret` @ `127.0.0.1:5432`) and Redis (`127.0.0.1:6379`).

```
cd packages/eveapi

composer run test              # Full suite: lint + types + type-coverage + unit tests
composer run test:unit         # Pest unit tests only
composer run test:lint         # Pint formatting check
composer run lint              # Auto-fix formatting
composer run test:types        # PHPStan / Larastan static analysis
composer run test:type-coverage # 100% type coverage (enforced)
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for recent changes.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

MIT. Please see [LICENSE](LICENSE.md) for details.

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 98.4% 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 ~20 days

Recently: every ~4 days

Total

113

Last Release

18d ago

Major Versions

0.9.21 → 1.0.02022-03-04

1.x-dev → 2.0.02022-10-04

2.x-dev → 3.0.02023-03-21

3.1.2 → 4.0.02025-01-05

3.1.3 → 4.1.02026-05-27

PHP version history (4 changes)0.1.0PHP ^7.4

0.5.0PHP ^8.0

1.0.0PHP ^8.1

4.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6583519?v=4)[Herpaderp Aldent](/maintainers/herpaderpaldent)[@herpaderpaldent](https://github.com/herpaderpaldent)

---

Top Contributors

[![herpaderpaldent](https://avatars.githubusercontent.com/u/6583519?v=4)](https://github.com/herpaderpaldent "herpaderpaldent (1167 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (12 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/seatplus-eveapi/health.svg)

```
[![Health](https://phpackages.com/badges/seatplus-eveapi/health.svg)](https://phpackages.com/packages/seatplus-eveapi)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M134](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M63](/packages/knuckleswtf-scribe)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)[weapnl/laravel-junction

Easily create a REST API with extended functionality, such as eager loading, searching, filtering, and more.

2214.2k](/packages/weapnl-laravel-junction)

PHPackages © 2026

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