hazzazbinfaiz / switchboard-node
Remote maintenance-mode pulse and command endpoints for Laravel applications.
v1.0.0
2026-09-05 08:11 UTC
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/routing: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- phpunit/phpunit: ^9.0|^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Remote maintenance-mode control for Laravel apps (Laravel 8–13, PHP 7.4+).
Routes
GET /switchboard/pulse?timestamp=...&signature=...— always reachable, even during maintenance mode. Returns{"status":"up","version":"1.0.0"}or{"status":"down","version":"1.0.0"}, whereversionis this package's version (SwitchboardNode::VERSION), useful for a controller node talking to multiple package versions.POST /switchboard/command— puts the app up or down.
Pulse query
GET /switchboard/pulse?timestamp=1735689600&signature=hex hmac-sha256
signature:hash_hmac('sha256', 'pulse' . timestamp, appKeyBytes).timestampmust be withinconfig('switchboard.timestamp_timeout')seconds (default 5) of server time, or a 400 is returned. A bad/missing signature also returns 400.
Command payload
{
"command": "down",
"redirect": null,
"encrypted_secret": "base64(iv . cipher(secret))",
"cipher": null,
"timestamp": 1735689600,
"signature": "hex hmac-sha256"
}
encrypted_secret: base64 of the cipher's IV followed by the ciphertext of the maintenance secret, encrypted with the app's rawAPP_KEYbytes.cipher: optional; when missing,null, or blank, defaults toAES-256-CBC. Otherwise the given OpenSSL cipher name is used to decryptencrypted_secret.signature:hash_hmac('sha256', command . timestamp, appKeyBytes).timestampmust be withinconfig('switchboard.timestamp_timeout')seconds (default 5) of server time.
Config
Publish with:
php artisan vendor:publish --tag=switchboard-config