atoms / client
Framework-agnostic monolith-side SDK for Atoms: RPC stub proxies, callback kernel, manifest loader.
Requires
- php: ^8.3
- atoms/core: ^0.9
- psr/container: ^1.1 || ^2.0
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^2.0 || ^3.0
Requires (Dev)
None
Suggests
- ext-redis: Connect RedisNonceStore through PhpRedis or RedisCluster
- predis/predis: Connect RedisNonceStore without the Redis PHP extension
Provides
None
Conflicts
None
Replaces
None
README
The framework-independent, monolith-side client for Atoms. It provides typed Atom proxies, the signed callback kernel, manifest loading, retries, and the shared host-adapter contracts used by the Laravel and Symfony integrations.
composer require atoms/client:^0.9
Applications normally install a framework adapter. Use this package directly when integrating another framework or a plain PHP application; the normative adapter contract and examples are in the Atoms documentation.
Callback nonce storage
Pass a shared NonceStore to CallbackKernelFactory::create() before accepting
callbacks. The factory rejects authenticated callbacks with ATOMS-E111 until
a store is configured. RedisNonceStore::fromClient() accepts PhpRedis,
RedisCluster, or Predis clients. Laravel and Symfony applications can configure
shared storage through their adapters.
InMemoryNonceStore is available for explicit local development and tests.
It loses records when its instance ends and can evict nonces before their
signed timestamps expire. See Callbacks
for backend setup and retention requirements.
Development and support
This package is developed in the Atoms monorepo. Its standalone repository is a read-only distribution mirror; report issues and send pull requests to the monorepo. Licensed under the MIT License.