atannex / bridge
Expose explicitly registered, validated and authorized Laravel operations to JavaScript and TypeScript clients over a small versioned protocol, with generated TypeScript contracts, pluggable authentication, tenant context and standard errors.
Requires
- php: ^8.3
- illuminate/console: ^12.0|^13.0
- illuminate/contracts: ^12.0|^13.0
- illuminate/http: ^12.0|^13.0
- illuminate/pagination: ^12.0|^13.0
- illuminate/routing: ^12.0|^13.0
- illuminate/support: ^12.0|^13.0
- illuminate/validation: ^12.0|^13.0
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/fortify: ^1.25
- laravel/pint: ^1.18
- laravel/sanctum: ^4.0
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^11.5|^12.0
Suggests
- laravel/fortify: For password login and two-factor authentication; Bridge checks Fortify two-factor codes when issuing mobile tokens (^1.25).
- laravel/sanctum: For SPA session authentication and mobile bearer tokens (^4.0).
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-31 07:41:28 UTC
README
Lets JavaScript and TypeScript apps (web, React Native, Expo) call Laravel actions you register explicitly, over one small versioned HTTP endpoint. Every call is validated and authorized on the server, deny by default, and returns only the fields you declare. A generated TypeScript contract gives the client full types through the @atannex/bridge SDK. Works with Sanctum cookie sessions or mobile bearer tokens, Fortify two-factor, tenants, file uploads and signed downloads. The wire format is described in PROTOCOL.md.
Install
composer require atannex/bridge php artisan bridge:install