How it-peoplelogy/laravel-xero-bridge works
Laravel Xero Bridge lets an application connect tenants to Xero, maintain OAuth credentials, and use wrapped Accounting API resources or raw requests; the application retains bookkeeping decisions. Webhooks and an optional, separate MyInvois TIN validator are additional product capabilities. The graph follows documented and indexed caller relationships; several resource internals and unsampled modules are not shown, so their downstream calls are omitted rather than inferred.
Main entry points: XeroHttpClient.php Xero HTTP client · XeroBridgeManager.php Bridge manager · MyInvoisClient.php MyInvois client · TokenManager.php Token manager
Components 26
Laravel integration
- XeroBridge facade
src/Facades/XeroBridge.php - Bridge manager
src/XeroBridgeManager.php - Management console
src/Http/Controllers/XeroConsoleController.php
Connection lifecycle
- Connect endpoint
src/Http/Controllers/XeroConnectController.php - OAuth callback
src/Http/Controllers/XeroCallbackController.php - Identity client
src/OAuth/IdentityClient.php - Token manager
src/OAuth/TokenManager.php - Connection repository
src/Repositories/EloquentConnectionRepository.php - Connection records
src/Models/XeroConnection.php
Xero Accounting
- Invoice resource
src/Resources/Invoices.php - Contact resource
src/Resources/Contacts.php - Payment resource
src/Resources/Payments.php - Settings resource
src/Resources/Settings.php - Xero HTTP client
src/Client/XeroHttpClient.php
Webhook processing
- Webhook endpoint
src/Http/Controllers/XeroWebhookController.php - Webhook processor
src/Jobs/ProcessXeroWebhook.php - Event recorder
src/Webhooks/WebhookEventRecorder.php - Webhook event records
src/Models/XeroWebhookEvent.php
Diagnostics
- API call recorder
src/Capture/ApiCallRecorder.php - API call records
src/Models/XeroApiCall.php
MyInvois validation
- MyInvois client
src/MyInvois/MyInvoisClient.php - Validation audit
src/MyInvois/MyInvoisAudit.php - MyInvois configuration
src/MyInvois/MyInvoisConfig.php
Other components
- Host application
- Xero services
- MyInvois service
Connections 32
- Host application → XeroBridge facade: calls
README.md - XeroBridge facade → Bridge manager: resolves
src/Facades/XeroBridge.php - Bridge manager → Invoice resource: creates resource
src/XeroBridgeManager.php - Bridge manager → Contact resource: creates resource
src/XeroBridgeManager.php - Bridge manager → Payment resource: creates resource
src/XeroBridgeManager.php - Bridge manager → Settings resource: creates resource
src/XeroBridgeManager.php - Bridge manager → Token manager: uses
src/XeroBridgeManager.php - Host application → Connect endpoint: starts consent
src/Http/Controllers/XeroConnectController.php - Connect endpoint → Identity client: builds authorization
src/Http/Controllers/XeroConnectController.php - Host application → OAuth callback: returns from consent
src/Http/Controllers/XeroCallbackController.php - OAuth callback → Identity client: exchanges code
src/Http/Controllers/XeroCallbackController.php - OAuth callback → Connection repository: stores connection
src/Http/Controllers/XeroCallbackController.php - Token manager → Identity client: refreshes tokens
src/OAuth/TokenManager.php - Token manager → Connection repository: persists tokens
src/OAuth/TokenManager.php - Connection repository → Connection records: persists
src/Repositories/EloquentConnectionRepository.php - Invoice resource → Xero HTTP client: uses client
- Contact resource → Xero HTTP client: uses client
- Payment resource → Xero HTTP client: uses client
- Settings resource → Xero HTTP client: uses client
- Xero HTTP client → Xero services: sends requests
README.md - Xero HTTP client → Token manager: gets valid token
src/Client/XeroHttpClient.php - Xero HTTP client → API call recorder: records calls
src/Client/XeroHttpClient.php - API call recorder → API call records: stores records
src/Capture/ApiCallRecorder.php - Host application → Webhook endpoint: receives callback
- Webhook endpoint → Webhook processor: dispatches
src/Http/Controllers/XeroWebhookController.php - Webhook processor → Event recorder: records event
src/Jobs/ProcessXeroWebhook.php - Event recorder → Webhook event records: persists
src/Webhooks/WebhookEventRecorder.php - Host application → Management console: opens console
README.md - Management console → MyInvois client: validates TIN
src/Http/Controllers/XeroConsoleController.php - MyInvois client → MyInvois service: checks taxpayer
README.md - MyInvois client → Validation audit: records verdict
src/MyInvois/MyInvoisClient.php - MyInvois client → MyInvois configuration: reads settings
src/MyInvois/MyInvoisClient.php