neocode/aps-connect

A stateless Laravel client for Registra licence verification and App Station software distribution & auto-updates.

Maintainers

Package info

github.com/neocodesupport/aps-connect

pkg:composer/neocode/aps-connect

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

dev-master 2026-08-27 19:28 UTC

This package is auto-updated.

Last update: 2026-08-27 19:28:34 UTC


README

Aps Connect

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

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" }
}
  • environment and both base urls are read from this file. api.baseUrl and appstation.baseUrl fall back to config('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_KEY for production, or config('aps-connect.dev_api_key') / REGISTRA_DEV_API_KEY for the development environment declared in appstation.conf.json. It is also read from the gitignored appstation.conf.local.json (written by aps init) when no config/env value is set. This same key authenticates both Registra calls and App Station's instances/register call — 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.