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.
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.
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.
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.
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.
How can I help you explore Laravel packages today?