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

Metabase Bundle Laravel Package

malefici/metabase-bundle

A Laravel/PHP bundle for integrating Metabase analytics into your application. It provides configuration and helpers to connect your app with Metabase, making it easier to embed dashboards and questions and surface analytics within Laravel projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Despite the "Laravel/PHP" framing in the package metadata, malefici/metabase-bundle is a Symfony bundle, not a Laravel package. There is no service provider, no config/*.php publish target, and no facade. Architectural fit for a Laravel codebase is therefore indirect at best: you would consume the underlying service class manually or port it.
  • The functional scope appears narrow and well-understood: generating signed (static) embed URLs for Metabase dashboards/questions — i.e., a JWT signed with a secret shared with the Metabase instance, wrapped into an iframe-embeddable URL, with optional locked parameters for row-level filtering.
  • That is a genuinely useful primitive for a product surface (customer-facing analytics, tenant-scoped dashboards), and it sits cleanly at the edge of the app: request → signed URL → iframe render. It does not touch domain models, persistence, or request lifecycle in an invasive way, so it is architecturally low-coupling.

Integration feasibility

  • Estimated integration effort if adopted as-is in a Symfony app: 0.5–1.5 dev-days (install, configure site URL + embedding secret, wire one controller/Twig template, validate in staging against a real Metabase instance).
  • In a Laravel app: 1–3 dev-days, because you are effectively reimplementing the ~50–150 lines of glue (JWT payload construction, URL assembly, expiry handling, parameter locking) rather than installing the bundle. At that size, "adopt" and "build" converge.
  • The blocking prerequisite is infrastructure, not code: a reachable Metabase instance, an embedding secret provisioned and rotated, HTTPS everywhere, and CSP frame-ancestors allowlisting on both sides. That work is identical whether you use this bundle or write your own, and it dominates the timeline.

Technical risk

  • Maturity risk: high. 0 stars, 0 dependents, single maintainer, score 0.1, last release March 2024. There is no evidence of production usage by anyone. Treat it as unvetted sample code, not a dependency.
  • Security sensitivity: high, but bounded. The package's core concern is a shared secret used to mint tokens that grant dashboard access. A defect here (over-broad params, missing exp, secret logged or leaked in an exception trace, unsigned fallback) is an authorization-bypass class bug. Conversely, the surface is small enough to read every line in an hour — this is auditable in a way a large dependency is not.
  • Abandonment risk: high but cheap. Because the blast radius is a few classes, an abandoned bundle is a fork-and-vendor event, not a migration project. Exit cost is near zero.
  • Supply-chain risk: moderate. Review composer.json transitive dependencies (likely a JWT library). Prefer pinning to an audited, widely-used JWT implementation (firebase/php-jwt / lcobucci/jwt) that you control directly rather than relying on this package's constraint.
  • Licensing/product risk (separate from the package): Metabase signed/static embedding is available in the open-source edition, but interactive embedding (full-app, SSO-based) requires Pro/Enterprise. If the product requirement drifts from "show a dashboard" to "embed the whole analytics experience," this package stops being the relevant lever and a commercial conversation starts.

Key questions

  1. Does the bundle cover only signed/static embedding, or also interactive/SSO embedding? This determines whether it is sufficient for the actual product requirement.
  2. Which Metabase resource types does it support — dashboard, question/card, both? Does it support locked parameters (the mechanism for multi-tenant row-level filtering)?
  3. How is the embedding secret sourced (env var, Symfony secrets vault, parameter bag)? Is it ever serialized into logs, exception messages, or HTTP responses?
  4. Is exp always set on the JWT, and is it configurable/short? Are tokens minted server-side only, never in client-rendered templates with the secret in scope?
  5. What are the Symfony version constraints, and does the code pass static analysis / have tests at all?
  6. Who is the maintainer, and is there any responsiveness signal (issues, commits) outside the single 2024-03 release?

Integration Approach

Stack fit

  • Symfony 5.4/6.x/7.x: plausible fit if constraints allow; the bundle model (DI extension + configuration tree) is the natural shape for this concern.
  • Laravel 10/11: poor fit as a dependency. Recommended approach is port, don't install — lift the URL/JWT construction logic into a small MetabaseEmbedService bound in a service provider, with config in config/services.php and the secret in .env/a secrets manager. This is a half-day of work and gives you ownership of the security-critical path.
  • Either way, the output is a signed URL string consumed by a Blade/Twig template in an <iframe>. Keep the minting server-side and scope the URL to a single dashboard + tenant parameter set per request.

Migration path

  • Since there is no incumbent to migrate from, the realistic path is: spike → reference implementation → internal package. Run the bundle in a throwaway branch against a staging Metabase, capture the exact JWT payload and URL shape it produces, then decide whether to keep the dependency, fork it under your org namespace, or reimplement.
  • Recommended default: reimplement or fork. The code is small, the security surface is meaningful, and the upstream has no community to inherit fixes from. A vendored ~100-line service with a test suite is a strictly better asset than a 0-star dependency.
  • If you do adopt it, wrap it behind your own interface (e.g., DashboardEmbedder) so the bundle is swappable without touching call sites.

Compatibility

  • Verify PHP version constraint against your runtime matrix; verify Symfony constraint against your framework version (a 2024-03 release likely predates Symfony 7 support).
  • Verify the JWT algorithm and secret encoding match what your Metabase version expects — Metabase's embedding secret is a UUID string used as an HMAC-SHA256 key; encoding mismatches are the most common failure here and produce opaque 403s.
  • Confirm behavior across Metabase versions: embedding settings UI and payload shape have been stable, but "static embedding" was renamed and reorganized in recent releases. Pin the Metabase version you validate against and note it in the runbook.

Sequencing

  1. Week 0 — Requirements: confirm static vs interactive embedding, and confirm the edition/licensing implication. This is a gate; do not proceed on code until answered.
  2. Week 0 — Security review: read the full source, review composer.json, run a dependency audit. Half a day, one reviewer.
  3. Week 1 — Spike: staging Metabase + secret + one dashboard + locked tenant parameter, end-to-end in an iframe. Validate CSP and expiry behavior.
  4. Week 1 — Decide: adopt / fork / reimplement. Default expectation: reimplement behind an interface.
  5. Week 2 — Harden: add tests for payload shape, expiry, parameter scoping, and secret non-leakage; document rotation procedure.
  6. Week 2+ — Productize: tenant parameter mapping, dashboard registry/config, error states in the UI when the embed fails.

Operational Impact

Maintenance

  • Upstream maintenance is effectively zero — one release, no dependents, no visible activity. Plan for you to own this code from day one. Budget ~1–2 dev-days per year for dependency bumps and Metabase version drift, plus ad-hoc time on any embedding API change.
  • Secret rotation is the recurring operational task. Metabase supports rotating the embedding secret; your app must pick up the new value without a hardcoded fallback. Document and rehearse this — a botched rotation is a full customer-facing analytics outage.
  • Owning a fork is the low-friction option: fork under the org namespace, add CI, and stop pretending it is a third-party dependency.

Support

  • No vendor, no SLA, no issue tracker activity. Internal support burden falls on the team that integrates it. Since the failure signature is "dashboard shows an error inside an iframe," first-line support cannot diagnose it — you need an internal runbook mapping symptoms (blank frame / 403 / expired token / CSP block / wrong secret) to causes.
  • Add server-side logging of embed-minting failures with the dashboard ID and tenant ID, never the token or secret.

Scaling

  • Scaling characteristics are benign: minting a JWT is CPU-trivial and stateless. There is no database, cache, or session dependency in the signing path, so it scales horizontally with your app tier for free.
  • The real scaling constraint is Metabase itself (query load, caching, database connections), not this package. If embedded dashboards become a heavily used product surface, capacity planning belongs to the Metabase deployment and its backing warehouse, and that should be flagged early to whoever owns that infrastructure.
  • Iframe rendering adds a per-page-load request to Metabase from the end user's browser — factor that into Metabase's ingress and auth-scope design.

Failure modes

  • Secret mismatch or rotation drift → 403/blank iframe, opaque to users. Highest-likelihood failure; mitigate with a staging check in CI or a health endpoint.
  • Token expiry too long → a leaked embed URL grants prolonged access to a tenant's data. Keep exp short (minutes) and mint per page load.
  • Parameter locking omitted or spoofable → cross-tenant data exposure. This is the one failure mode with real business consequence; enforce tenant parameters server-side and never derive them from client input without authorization checks.
  • CSP / X-Frame-Options misconfiguration on either app or Metabase → silent blank frame, commonly misdiagnosed as an auth bug.
  • Metabase unreachable / instance down → degraded but contained, provided the host page fails gracefully (placeholder + retry, not a broken layout).
  • Secret leaked via logs or error pages → full embed-forgery capability for anyone who obtains it. Treat as a security incident with a defined rotation runbook.

Ramp-up

  • A mid-level engineer can be productive with this in under a day — the domain (JWT + iframe + a config value) is standard. The non-obvious parts are Metabase-specific: the exact secret format, locked-parameter semantics, and embedding edition limits.
  • Onboarding cost is dominated by the Metabase side, not the package. Assign one engineer as the embedding owner and have them document the end-to-end flow (app → signed URL → iframe → Metabase → warehouse) once; that artifact is worth more than the dependency.
  • Bottom line for a go/no-go: the package itself is not the decision. The decision is whether embedding Metabase dashboards is a product requirement worth the operational ownership of the embedding secret and the Metabase deployment. If yes, build or fork a ~100-line, tested, owned service — the 0-star bundle is a useful reference implementation and a poor long-term dependency.
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.
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
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels