Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Agora Laravel Package

tomatophp/laravel-agora

Integrate Agora real-time voice and video into your Laravel app with ready-made helpers for channel and token generation, configuration management, and quick setup so you can add live audio and video features without writing boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a single-responsibility adapter: it mints Agora RTC access tokens and exposes them through a Laravel service class with publishable config. That is a good architectural shape for a Laravel codebase — it slots in as a leaf dependency with no database, no queue, no middleware, and no event surface, so it does not impose opinions on your domain model. The correct TPM-level framing is that this is source you adopt, not a platform you integrate: the entire real logic is a few hundred lines around an HMAC construction. Fit is high if and only if it sits behind an application-owned contract (AgoraTokenIssuer or equivalent) so the vendor name appears in exactly one file. If it leaks into controllers or Filament resources directly, every future change to token policy becomes a cross-cutting refactor.

Integration feasibility. Very high for a spike, moderate for production. The happy path is composer require, publish config, set AGORA_APP_ID / AGORA_APP_CERTIFICATE, write one authenticated endpoint, and call the client SDK's joinChannel. That is an afternoon of work against a real join on Web. The work that is not in the package and dominates the estimate: server-side authorization of who may join which channel in which role, UID derivation strategy, TTL/entitlement policy, client-side renewal handling, audit logging, and a certificate rotation runbook. Budget the spike at two days with exit criteria, not two weeks — and treat "a token generates fine" as no evidence at all. Only a successful join from each shipping client platform counts.

Technical risk. This is the section that decides the recommendation. The package has 10 stars, 0 dependents, and a single maintainer — on a path that signs a credential with your App Certificate. That combination fails most security reviews as a supply-chain risk regardless of code quality. Specific risks:

Risk Severity Mitigation
Single maintainer, no CVE/SLA process on a signing path High Fork under MIT, pin commit, name internal owner
Release metadata claims 2026-10-14 — future-dated Medium Verify Packagist/GitHub tags independently; do not trust the metadata
No shipped tests validating token shape/expiry/role bits High Write deterministic expiry test + privilege-bits test ourselves
AccessToken v1 vs v2 drift; builder may be vendored rather than a Composer dep on Agora's official library High Read src/ end to end; if vendored, we inherit a frozen schema snapshot
env() read at runtime instead of config() Medium Breaks only under config:cache — test in CI with config cached
App Certificate rotation causes 100% join failure that looks like a client bug High Synthetic scheduled join check in staging + written rotation runbook
Scope: tokens only — no Chat/RTM, Recording, Media Push, webhooks, multi-tenant App IDs Medium Explicit non-goal; budget those separately if roadmap needs them

Key questions to close before a go decision. (1) Which AccessToken builder does it wrap, v1 or v2, and is that builder vendored or a Composer dependency? (2) Does config resolve through config() or env()? (3) Does it expose the underlying builder, so we can extend to wildcard channels, fine-grained privilege expiry, or per-tenant App IDs without a fork? (4) What is the real commit/tag cadence on GitHub versus the claimed release date? (5) What is our revocation story — because short TTL plus client renewal is the only revocation mechanism the token model gives us? (6) Who internally owns this file, and what is the escalation path when it breaks at 2am?

Integration Approach

Stack fit. Laravel 10/11+ with PHP 8+, Composer, and whatever auth you already run (Sanctum is the natural fit). The token mint is a stateless local HMAC computation — no I/O, no queue, no cache dependency — so it composes cleanly with existing middleware, policies, and rate limiters. The agora config key and facade alias are generic enough to collide with future Agora-adjacent packages (Chat, RTM, Recording); reserve the namespace deliberately.

Migration path. Two viable paths, and the choice should be made on ownership economics rather than capability, because the capability delta is near zero:

  • Dependency path — install, wrap behind AgoraTokenIssuer, pin the commit in composer.json. Fastest to value; leaves supply-chain risk in place and inherits maintenance you cannot influence.
  • Fork path (recommended default) — copy the ~150 lines of real logic into app/Support/Agora under MIT, keep the interface identical, delete the dependency. Removes the supply-chain question from security review entirely, gives us control over the v1/v2 builder choice and the config() fix, and costs roughly a day.

Either way, the app-owned interface makes the third option — reimplementing against Agora's official PHP library — a one-file swap. That optionality is the whole point of doing the contract on day one.

Compatibility. Watch Laravel and PHP version constraints in composer.json against the platform version, and confirm the package does not constrain you out of the next Laravel major. If you later add Agora Chat/RTM or Cloud Recording, verify config key and facade alias collisions before installing anything else. Client-side compatibility is the larger surface: the server returns {appId, channel, uid, token}, and Agora treat integer and string UIDs as distinct namespaces — mixing them produces duplicate ghost participants that are genuinely painful to diagnose. Pick string UIDs of internal user IDs and enforce it everywhere.

Sequencing.

  1. Day 1 — spike. Install, publish config, read src/ completely, mint a token, join from Web against a real Agora project. Confirm v1/v2 builder and config() vs env().
  2. Day 1 — contract. Define AgoraTokenIssuer, write the adapter, bind it. Now the package is one file.
  3. Day 2 — endpoint. Authenticated, throttled, audit-logged issuance that derives channel, role, UID, and TTL server-side from authorization — never from the request body. Namespace channels by tenant/room.
  4. Day 2 — hardening. Deterministic expiry test, privilege-bits decode test, php artisan config:cache in CI, and a deliberate 120-second TTL to force the renewal path inside one manual session.
  5. Week 1 — decisions. Channel/role/TTL policy and entitlement tiers as configuration, certificate rotation runbook, synthetic join check on a schedule, and the adopt/fork/replace call.
  6. After — multi-platform join verification, then scope any Chat/Recording/webhook work as separate efforts.

Operational Impact

Maintenance. Treat as unmaintained by default. There is no evidence of a maintenance cadence we can rely on, and the future-dated release metadata undermines confidence in the published signals. Practical consequence: we own the code, we own the tests, we own the watch on Agora's token schema changes, and we own the decision when the wrapper no longer covers our needs. Name an internal owner in the repo before merge — an unowned credential-signing path is the failure mode that bites twelve months later.

Support. No SLA, no CVE process, no responsive escalation. Agora's own support covers the platform (join failures, concurrency, regional coverage) but not this wrapper — so every "is it us or them?" triage starts with our own logs. Budget for that triage in on-call expectations; it is small in volume, high in ambiguity.

Scaling. Effectively a non-issue on the compute side. Minting is a synchronous HMAC with no shared state, so it scales horizontally for free and adds no database load. Real ceilings are elsewhere: your auth and rate limiting on the issuance endpoint (renewal loops will hammer it if a client is buggy), and Agora's own concurrency and per-minute plan limits. That makes capacity planning a vendor commercial question, not an application one — worth surfacing early, since video minutes are the cost driver in the business case, not the token service.

Failure modes (ranked by likelihood × blast radius):

  • Certificate missing, wrong, or rotated — 100% join failure across all users, indistinguishable from a client bug. Mitigate with a scheduled synthetic join in staging that alerts before a user notices, plus a written rotation runbook.
  • Clock skew on the app server — "token not yet valid" / "expired" at join. Run NTP; never backdate tokens to buy time.
  • config:cache + env() — works locally, breaks in production. Test cached config in CI.
  • Token version drift — newer Agora projects reject v1 tokens outright; if the builder is vendored, nobody patches it for you.
  • Client renewal bugs — onTokenPrivilegeWillExpire is the code path nobody exercises until a long session drops. Test with a 120-second TTL.
  • Unvalidated client-supplied channel names — cross-tenant token reuse and channel squatting, undetectable after the fact without logs you probably did not write.
  • Token leakage — never log tokens or put them in exception payloads; log the issuance event (user, channel, role, TTL, request ID) instead.

Ramp-up. Technically trivial — a competent Laravel engineer is productive in hours because the source is short enough to read end to end, and the source is the spec. Organizationally it is the opposite: the package forces product decisions that outlive it — who joins which channel, as publisher or audience, for how long, who can revoke a moderator, and how TTL maps to pricing tiers. Those decisions cost more than the integration and are much more expensive to retrofit. Make them in the spike, in config or a plan model, so product can experiment with session length and seat type without a deploy.

Decision recommendation. Run the two-day spike, but plan on the fork. With 10 stars, 0 dependents, one maintainer, and a credential-signing responsibility, the dependency buys almost nothing that copying 150 MIT-licensed lines does not buy more safely — and the app-owned interface means the choice is reversible either way. The genuine strategic question this assessment does not answer is Agora vs. LiveKit vs. Daily vs. Twilio on cost per minute, latency, SDK quality, and regional coverage. What this package provides is a cheap, concrete prototype to have that conversation with real join data instead of a vendor deck.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log