SDK
Drop-in support for Laravel applications, and a reporting path for iOS and Android that never carries a ChaosDesk credential.
Laravel
composer require three_oh_eight/laravel-chaosdesk
CHAOSDESK_URL=https://chaosdesk.eu/api/v1
CHAOSDESK_SITE_TOKEN=your-ingest-token
Livewire components
Two components cover the whole customer-facing flow. Both are styled with plain Tailwind and carry no Flux dependency, so they render in any application.
<livewire:chaosdesk-support />
<livewire:chaosdesk-tickets />
Publish the views to restyle them:
php artisan vendor:publish --tag=chaosdesk-views
Identifying the user
Implement the contract on your User model and the SDK attaches a stable identity to every ticket. ChaosDesk keys the author on external_id, so the same person stays one author even after an email change.
use ThreeOhEight\ChaosDesk\Contracts\ProvidesSupportContext;
class User extends Authenticatable implements ProvidesSupportContext
{
public function supportExternalId(): string
{
return (string) $this->id;
}
public function supportContext(): array
{
return ['plan' => $this->subscription?->plan_name];
}
}
Screenshots and console errors
The bundled Alpine helper keeps a rolling buffer of console errors and can capture the current screen through the browser Screen Capture API. Capture is always explicit: the user presses a button and the browser asks which surface to share.
// resources/js/app.js
import 'chaosdesk';
iOS and Android
Mobile apps do not talk to ChaosDesk. They collect device context and post it to your own backend, using your own authentication. The SDK exposes the receiving endpoints:
// routes/api.php
use ThreeOhEight\ChaosDesk\Facades\ChaosDesk;
Route::middleware('auth:sanctum')->group(function () {
ChaosDesk::routes();
});
That registers POST /chaosdesk/tickets alongside list, show and reply routes, all behind whatever middleware you wrapped them in. The client packages build a payload matching the context schema and send it there:
// Swift
let report = ChaosDeskReport(
subject: "Fork sag not saving",
message: "It reverts every time.",
screenshot: .currentScreen
)
try await ChaosDesk.shared.submit(report)
// Kotlin
val report = ChaosDeskReport(
subject = "Fork sag not saving",
message = "It reverts every time.",
screenshot = Screenshot.CurrentScreen,
)
chaosDesk.submit(report)
Both collect app version and build, OS version, device model and locale automatically, and neither needs a permission prompt to capture the screen.
Anything else
Any backend that can make an HTTP request can submit a ticket. See the API reference.