andreagroferreira/laravel-sync-tracker
Track and audit Eloquent model syncs with external systems (CRMs/ERPs/APIs). Store external IDs per source, sync status, timestamps, and metadata, and quickly find local models by external IDs—configurable for multiple integrations.
ModelObservers, Events) and supports asynchronous reconciliation between systems (e.g., databases, APIs, or microservices).last_sync_at, status, retries), which fits architectures requiring auditability or conflict resolution (e.g., multi-region syncs, third-party integrations).id) and supports soft-deletes (if using Eloquent).redis-memory-usage.SyncStrategy or layer application logic.User) or batch-level (e.g., "all orders")? Package favors per-record.LogEntry) to validate tracking accuracy.Syncable trait to Eloquent models.Syncing events in business logic (e.g., OrderService::syncToThirdParty()).SyncStrategy for retries/conflicts.sync_duration_seconds) via Prometheus.predis or phpredis driver.ModelObserver for raw queries).queue driver.SYNC_TRACKER_REDIS_CONNECTION in .env.php artisan sync:tracker:install (if provided) or manually publish config.SyncEvent::fake())..env and model traits). Updates may require migration scripts for schema changes.predis/predis:^1.1) to avoid breaking changes.composer.json to prevent compatibility drift.redis-cli XRANGE sync_tracker_stream *.php artisan queue:work --sleep=3 --tries=3 for manual retries.sync:lock to prevent duplicate syncs.observers or listeners are registered.TRUNCATE sync_tracker_entries).supervisor or Kubernetes HPA.sync_tracker_ttl for ephemeral syncs.| Failure | Impact | Mitigation |
|---|---|---|
| Redis outage | Lost sync state | Fallback to DB + alerts (e.g., redis-cli ping). |
| Queue backlog | Delayed syncs | Auto-scaling workers + DLQ. |
| Event emission failure | Inconsistent tracking | Idempotent events + retry logic. |
| Schema drift | Broken syncs | Database migrations + CI checks. |
| Concurrent writes | Data corruption | Optimistic locking (sync:lock). |
Syncable trait and event system.SELECT COUNT(*) FROM sync_tracker_entries WHERE status = 'completed').How can I help you explore Laravel packages today?