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

Forge Previewer Laravel Package

ryangjchandler/forge-previewer

Forge Previewer is a Laravel package for creating preview deployments on Laravel Forge. It helps generate temporary sites for branches or pull requests so teams can review changes in a production-like environment before merging.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Forge Previewer is not a library in the traditional sense — it is a webhook-driven orchestration service that sits between a Git provider (GitHub/GitLab) and the Laravel Forge API. Its job is to receive pull-request events, provision a Forge site (or server), trigger a deploy of the PR branch, comment the preview URL back on the PR, and tear everything down when the PR closes. That means adopting it adds a long-running, internet-facing component to our estate: an HTTP endpoint for webhooks, a queue worker for slow provisioning jobs, a scheduler for cleanup, and privileged credentials to our Forge account. It fits cleanly only if we are already a Forge shop running Laravel on Forge-provisioned infrastructure. If our hosting is Vapor, Ploi, Envoyer, Kubernetes, or a container platform with per-PR namespaces, the architectural premise does not apply and the effort is wasted.

Integration feasibility. The package is installable but not plug-and-play. Realistic prerequisites: a Forge API token with account-level write scope, a wildcard DNS record and wildcard TLS strategy for preview hostnames, a decision on provisioning topology (server-per-PR is expensive and slow; site-per-PR on a shared preview server is cheaper but introduces database and resource-isolation questions), and webhook configuration with signature verification on the Git side. Let's Encrypt issuance limits (roughly 50 certificates per registered domain per week) become a hard ceiling on preview churn if each PR gets a new hostname. None of this is insurmountable, but it is a multi-day integration, not an afternoon composer require.

Technical risk — high, and dominated by lifecycle status. The repository is archived and the last release was January 2023. That predates Laravel 10, 11, and 12, and likely pins older illuminate/*, Guzzle, and Forge SDK constraints that will conflict with a current application. There is no security disclosure process, no maintainer to patch a transitive CVE, and no path to upstream fixes when the Forge API or GitHub webhook payloads drift. At 76 stars, community knowledge is thin — expect to debug against source rather than documentation. The credential profile is the sharpest risk: a broadly scoped Forge token held by a service that creates and destroys billable infrastructure. A bug or a replayed webhook can provision real servers, and a cleanup failure silently leaks money. We should treat this as "reference implementation to fork and own," not as a supported dependency.

Key questions for the team.

  • Which SCM, and do we need GitHub, GitLab, or both? Does the package's webhook handling cover our provider's current event schema?
  • What is the minimum Forge token scope that makes this work, and can we isolate it to a dedicated Forge organization?
  • Do we need full server isolation per PR, or is site-per-PR on a shared preview host acceptable for our test data and database needs?
  • What Laravel/PHP versions are we targeting, and how large is the dependency-upgrade delta?
  • Is the business willing to own a fork indefinitely, or would a ~1–2 week in-house build against the maintained Forge SDK be cheaper over a 12-month horizon?
  • Who is on call when a preview environment fails to provision or fails to tear down?

Integration Approach

Stack fit. Adopt only if the target application is PHP 8.x/Laravel on Forge, with Redis or a database queue, a scheduler, and a public HTTPS endpoint we control. The package also needs outbound access to the Forge API and inbound webhook delivery from the Git provider; both must be allowed through our network and WAF posture, and the webhook route must be excluded from any generic auth middleware while still enforcing HMAC signature checks.

Migration path. Given archived status, the recommended path is vendor-and-own rather than depend: fork the repository into our namespace, pin Composer constraints to our platform, upgrade illuminate/* and the Forge/GitHub clients, add tests around the provisioning and teardown state machine, and publish internally. That preserves the domain logic (which is the genuinely reusable part) while removing the dead-upstream risk. The alternative — a clean-room implementation of the same webhook → Forge API → PR-comment → teardown loop — is small enough to be credible and gives us control over idempotency and reconciliation from day one. Run a two-week spike comparing the fork against a from-scratch build before committing.

Compatibility. Expect friction in three places: framework version constraints, the Forge API surface (Forge has been evolving its API, so SDK calls may need remapping), and the Git provider's token and webhook formats, including fine-grained token permissions on GitHub. Validate certificate issuance and DNS wildcard behavior in a non-production Forge organization first, since those are the constraints most likely to invalidate the design.

Sequencing.

  1. Feasibility spike in a dedicated sandbox Forge org with a throwaway repo — prove one full provision/deploy/comment/teardown cycle.
  2. Fork, upgrade dependencies, and stand up CI with unit tests on the state machine.
  3. Harden: webhook signature verification, secret storage via our standard secrets manager, least-privilege Forge token, audit logging of every provision and destroy call.
  4. Add a nightly reconciliation job that finds preview resources with no open PR and destroys them — this is non-negotiable, not a follow-up.
  5. Pilot on a single low-risk repository with a cost ceiling and alerting.
  6. Roll out to additional repos only after the pilot shows clean teardown over at least two weeks.

Operational Impact

Maintenance. Effectively all of it becomes ours. Budget roughly 10–20% of one engineer's time for dependency upgrades, Forge API drift, and Git provider changes, plus the initial fork-and-upgrade effort. Because upstream is archived, there is no channel for security patches; any CVE in a transitive dependency is an internal remediation.

Support and ramp-up. No vendor support exists, and community documentation at 76 stars will not carry an on-call engineer. A Laravel developer can read the codebase quickly — it is small — but production confidence requires Forge domain knowledge (servers, sites, daemons, recipes, certificates), Git webhook operations, DNS, and secrets management. Plan on one to two weeks for a single engineer to reach production-ready fluency, and require a written runbook covering token rotation, manual teardown, and the reconciliation job before launch.

Scaling. Provisioning is the bottleneck and it is slow: server creation takes minutes, site creation and certificate issuance take tens of seconds. Forge imposes concurrency and rate limits, and Let's Encrypt caps issuance per domain per week, so a busy repository with frequent force-pushes will hit ceilings. Server-per-PR scales cost linearly and is hard to justify beyond a handful of concurrent PRs; site-per-PR scales better but concentrates blast radius on a shared host and forces decisions about database isolation and noisy neighbors. Queue throughput and webhook retry storms need explicit backpressure.

Failure modes to design against.

  • Duplicate environments from webhook retries — requires idempotency keys tied to PR number plus commit SHA.
  • Partial failure after site creation but before the PR comment — produces invisible, billable orphans; log every resource ID and reconcile nightly.
  • Missed teardown on merge, close, force-push, or repository deletion — the primary cost-leak vector.
  • Forge token expiry, rotation, or scope reduction breaking provisioning silently.
  • DNS or certificate failures blocking preview URLs without failing the pipeline loudly.
  • Forge API breaking changes with no upstream to absorb them.
  • A compromised webhook endpoint used to trigger unauthorized provisioning — mitigated by signature verification, IP allowlisting where feasible, and a hard cap on concurrent preview environments.

Recommendation. Do not adopt the package as a maintained dependency. Treat it as a design reference: fork it, own it, and pair it with reconciliation and cost guardrails — or build the equivalent in-house — only if the organization is committed to Forge as its hosting platform and accepts ongoing ownership of a privileged infrastructure automation service.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource