Skip to content

v1.0.0 — Initial extraction

Choose a tag to compare

@lopadova lopadova released this 12 May 05:15

v1.0.0 — Initial release

First standalone release of the AskMyDocs connector framework. Extracted from the AskMyDocs v4.5 inline app/Connectors/* namespace into a reusable Laravel package. Any consumer can now ship a per-source connector as a separate composer package, drop it into any AskMyDocs install, and have it auto-discovered + scheduled + tenant-isolated for free.

What's inside

  • ConnectorInterface — 10-method contract every connector implements.
  • BaseConnector — OAuth state-token CSRF, refresh helper, tenant-scoped installation lookup.
  • ConnectorRegistry — R23 boot-time FQCN validation + composer.lock auto-discovery via extra.askmydocs.connectors.
  • OAuthCredentialVault — AES-encrypted at rest, R30 tenant-scoped, R21 atomic setExtraKey via DB::transaction + lockForUpdate.
  • ConnectorSyncJob — queued, $tries=3, exponential $backoff=[60,300,900], tenant-restore safety.
  • SyncScheduler — minute-grain cadence walker, chunkById(100), ACTIVE-only filter.
  • Exceptions — ConnectorAuthException (no retry), ConnectorApiException (retry), ConnectorPaginationLimitException, RegistryConfigurationException.
  • Models — ConnectorInstallation + ConnectorCredential with BelongsToTenant trait, cascade-on-delete.
  • Support — TenantContext + BelongsToTenant trait lifted from AskMyDocs (pure code, no host coupling).
  • Migrations — connector_installations (composite UNIQUE on (tenant_id, connector_name)) + connector_credentials (one-to-one with installation, encrypted tokens + opaque extra_json).

Testing

  • 45 tests passing, 93 assertions.
  • PHP 8.3 / 8.4 / 8.5 × Laravel 12 / 13 matrix (6 jobs) + static-analysis (Pint --test).
  • SQLite in-memory via Orchestra Testbench.

Install

composer require padosoft/askmydocs-connector-base
php artisan migrate

Write your first connector

See the Quick start — 50 lines from blank Laravel package to working connector.


🤖 Initial extraction commit: a9027c7