neocode / aps-connect
A stateless Laravel client for Registra licence verification and App Station software distribution & auto-updates.
Requires
- php: ^8.3
- illuminate/support: ^12.0||^13.0
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/agent-detector: ^2.0
- laravel/chisel: ^0.1
- laravel/pao: ^1.0
- laravel/pint: ^1.29
- laravel/prompts: ^0.3
- orchestra/testbench: ^10.0||^11.0
- pestphp/pest: ^4.6||^5.0
- pestphp/pest-plugin-laravel: ^4.1||^5.0
- pestphp/pest-plugin-type-coverage: ^4.0||^5.0
- phpstan/extension-installer: ^1.4
This package is auto-updated.
Last update: 2026-08-27 19:28:34 UTC
README
Aps Connect
Installation
You can install the package via Composer:
composer require neocode/aps-connect
The package ships a single publishable resource, its config file:
php artisan vendor:publish --tag="aps-connect-config"
This is optional — the package works out of the box with sane defaults. Publish it only if you need to override the Registra API key resolution (see Configuration below).
Configuration
Aps Connect resolves almost everything from an appstation.conf.json file at your
application's root — written by the aps CLI (aps init), not by hand:
{
"environment": "production",
"api": { "baseUrl": "https://registra.example.com/api" },
"appstation": { "baseUrl": "https://app-station.example.com" }
}
environmentand both base urls are read from this file.api.baseUrlandappstation.baseUrlfall back toconfig('aps-connect.registra_base_url')/config('aps-connect.appstation_base_url')(Registra's / App Station's real production addresses) when the file omits them, but an explicit value in the file always wins — neither is configurable through an environment variable, since that would let a deployer silently redirect licence checks to their own server.- The Registra API key is the one value that also reads from Laravel config/env:
config('aps-connect.api_key')/REGISTRA_API_KEYfor production, orconfig('aps-connect.dev_api_key')/REGISTRA_DEV_API_KEYfor the development environment declared inappstation.conf.json. It is also read from the gitignoredappstation.conf.local.json(written byaps init) when no config/env value is set. This same key authenticates both Registra calls and App Station'sinstances/registercall — there is nothing else to configure for App Station.
Run php artisan aps-connect:doctor at any time to confirm the Registra API key is
accepted and see the resolved App Station configuration.
Usage
use Neocode\ApsConnect\Facades\ApsConnect; // Licensing (Registra) $status = ApsConnect::verifyLicence($licenceKey); $result = ApsConnect::subscribe($licenceKey, ['email' => $email]); $trial = ApsConnect::issueTrial(['email' => $email]); // Distribution / auto-update (App Station), once a customer has an active licence. // Always pass a stable $clientReference (tenant id, device id...): App Station uses // it as the idempotency key, so reusing it returns the existing instance/key // instead of creating a new one on every call. $registration = ApsConnect::registerSoftwareInstance($licenceKey, $clientReference); // Persist $registration->apiKey yourself (the package is stateless), then: $download = ApsConnect::downloadPackage($registration->apiKey, $packageReleaseId); $update = ApsConnect::checkForUpdate($registration->apiKey, $currentVersion);
See the bundled Boost skill at
resources/boost/skills/aps-connect-development/SKILL.md
for the full method list, the exception hierarchy to catch, and more examples.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Thank you for considering contributing to Aps Connect! Please review our contributing guide to get started.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
Aps Connect is open-sourced software licensed under the MIT license.