Connect to any
provider.
One fluent Laravel library. Google, Microsoft (OneDrive & SharePoint), Meta, LinkedIn, X, Dropbox, FTP, S3 and SFTP — unified FileStorageInterface, recursive listTree(), typed DTOs, streaming uploads, webhooks, and zero boilerplate.
The way Laravel
integrations should work.
Swap providers in seconds
Shared contracts mean Google Drive, OneDrive, SharePoint, Dropbox, FTP, S3 and SFTP are interchangeable. Change one line, your code stays identical.
// Both implement the same contract $storage = BridgeKit::google()->setToken($t)->drive(); // or swap to this — nothing else changes: $storage = BridgeKit::microsoft()->setToken($t)->onedrive(); $file = $storage->uploadFile('report.pdf', $content); // StorageFile { id, name, size, mimeType, ... }
Streaming & performance
Lazy generators, streaming downloads, resumable chunked uploads. Memory-efficient by default.
Streaming downloads
Download files of any size with zero memory overhead using PHP streams.
Resumable uploads
Chunked, fault-tolerant uploads for large files. Pick up where you left off.
Lazy generators
Paginated file listings with PHP generators. Memory-efficient iteration over thousands of files.
Folder tree
listTree() returns a recursive StorageTreeNode — JSON-serialisable, depth-first walk(), and ASCII toAscii() for logs or admin UIs.
Typed responses everywhere
Every service returns a typed PHP 8.3 readonly DTO. No more hunting for array keys or reading raw JSON.
final readonly class StorageFile { public function __construct( public string $id, public string $name, public int $size, public string $mimeType, public string $webUrl, // S3, Drive, Graph… ) {} } final readonly class CalendarEvent { public function __construct( public string $id, public string $title, public DateTime $startAt, public DateTime $endAt, public ?EventStatus $status, ) {} }
Backed enums, no magic strings
Provider, Visibility, EventStatus, and related enums — all typed PHP 8.1+ backed enums.
Backed enums
Provider, Visibility, EventStatus, MailFolder, OAuthGrantType, ServiceType, MediaType, WebhookEvent — zero magic strings for domains BridgeKit models.
Laravel native
Auto-discovery, facade, config publishing. Works like any first-party Laravel package.
"One library instead of 5 vendor SDKs. Same interface, different providers, zero headache."
"Swapping Google Drive for S3 took 2 minutes. Same interface, same DTO shape, different config."
Unified OAuth.
Every provider.
OAuthInterface handles authorization URLs, callbacks, token refresh, and revocation across all providers.
| Provider | Services | Auth flow | Auto-refresh |
|---|---|---|---|
| Drive · Gmail · Calendar · OAuth | OAuth 2.0 Authorization Code | ✓ | |
| Microsoft | OneDrive · SharePoint · Outlook · Calendar · OAuth | OAuth 2.0 (tenant) | ✓ |
| Meta | Posts · Pages · OAuth | OAuth 2.0 via Facebook | ✓ |
| Posts · Profile · OAuth | OAuth 2.0 v2 | ✓ | |
| X | Tweets · Media · OAuth | OAuth 2.0 with PKCE | ✓ |
| Dropbox | File Storage · OAuth | OAuth 2.0 | ✓ |
| FTP/FTPS | File Storage | Host Credentials | — |
| S3 | File Storage (AWS / compatible) | Access Key + Secret | — |
| SFTP | File Storage | Password / Public Key | — |
Up in 60 seconds.
Install via Composer. Auto-discovery handles the service provider and facade.
composer require bridgekit-tools/bridgekit-lib
return [ 'providers' => [ 'google' => [ 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), 'redirect_uri' => env('GOOGLE_REDIRECT_URI'), ], 'microsoft' => [ 'client_id' => env('MS_CLIENT_ID'), 'client_secret' => env('MS_CLIENT_SECRET'), 'tenant' => env('MS_TENANT', 'common'), ], 'meta' => [ 'app_id' => env('META_APP_ID'), 'app_secret' => env('META_APP_SECRET'), ], ] ];
Stop the boilerplate.
Start connecting.
One library. Every provider. Typed everywhere.