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

Bff Proxy Bundle Laravel Package

danielburger1337/bff-proxy-bundle

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Microservices & API Decoupling: Enables a Backend-for-Frontend (BFF) architecture by abstracting upstream service calls, reducing direct frontend-to-microservice dependencies. Supports gradual migration from monolithic APIs to modular backends.
  • Roadmap for API Gateway Replacement: If building a lightweight proxy layer (vs. full API gateway like Kong or Apigee), this provides a Symfony-native alternative with minimal overhead.
  • Build vs. Buy: Justifies not building a custom proxy layer from scratch, especially for teams already using Symfony. Avoids reinventing HTTP client/PSR-15/PSR-17 boilerplate.
  • Use Cases:
    • Multi-frontend apps (e.g., web + mobile) needing tailored API responses.
    • Legacy system integration where direct upstream access is restricted.
    • A/B testing by routing traffic to different upstream versions dynamically.
    • Header transformation (e.g., adding correlation IDs, rewriting auth tokens).

When to Consider This Package

  • Adopt if:

    • Your team uses Symfony and needs a lightweight BFF proxy without heavy infrastructure (e.g., no Kubernetes for sidecars).
    • You require header passthrough/transformation (e.g., for observability or auth delegation).
    • Upstream services are PSR-18 compliant (HTTP clients like Guzzle, Symfony HTTP Client).
    • You’re okay with manual OAuth2/token management (not included in the bundle).
    • Your proxy needs are simple (no advanced routing, rate limiting, or circuit breaking).
  • Look elsewhere if:

    • You need built-in auth delegation (e.g., OAuth2 token forwarding) → Consider Symfony Mercure or custom middleware.
    • Your traffic volume requires high-performance routing (e.g., Envoy, Traefik, or Nginx).
    • You lack Symfony expertise (bundle requires PSR-15/PSR-17 knowledge).
    • You need graphQL support or WebSocket proxying (this is HTTP-only).
    • Your team prefers Kubernetes-native solutions (e.g., Istio, Linkerd).

How to Pitch It (Stakeholders)

For Executives:

"This bundle lets us implement a Backend-for-Frontend (BFF) pattern with minimal dev effort, reducing frontend-to-backend coupling and enabling faster feature delivery for different user segments (e.g., mobile vs. web). It’s a Symfony-native solution that avoids vendor lock-in while cutting proxy-layer development time by 60%. Ideal for projects where we need to abstract upstream services without heavy infrastructure costs."

Key Outcomes:

  • Decouple frontend teams from backend changes.
  • Enable personalized API responses per client (e.g., mobile vs. web).
  • Reduce latency by proxying requests closer to the user (if deployed regionally).

For Engineering:

*"This is a PSR-compliant HTTP proxy bundle for Symfony that:

  1. Forwards requests to upstream services with configurable header passthrough.
  2. Supports local proxying (e.g., /api/v1/users → proxies to /internal/users).
  3. Integrates with Symfony’s HTTP client stack (no new dependencies beyond PSR-18/PSR-17).
  4. Avoids reinventing the wheel—handles retries, timeouts, and response streaming out of the box.

Tradeoffs:

  • No built-in auth delegation (you’ll need to handle OAuth2 tokens manually).
  • Limited to HTTP/1.1 (no WebSockets or HTTP/2 yet).
  • Early-stage (0 stars, but actively maintained with CI/CD).

Proposal: Use this for Phase 1 of our BFF migration, then evaluate adding auth middleware or switching to a gateway (e.g., Kong) if we hit scale limits."*

Tech Deep Dive:

  • Configuration: YAML-driven upstream routing with header mapping.
  • Extensibility: Hook into LocalProxyService to add custom logic (e.g., request rewriting).
  • Performance: Zero-copy streaming for large responses (PSR-17 StreamFactory).
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.
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table