a2zwebltd/laravel-feature-voting
Add feature request voting to any Laravel app. Users submit ideas, upvote the ones they want, and track status as you build. Ships with models, migrations, routes, and a service layer so you can drop it into an existing project quickly.
Architecture fit — The package follows conventional Laravel package anatomy: a service provider, tagged publishable migrations (feature-voting-moderation-migration), publishable views, a config/env gate (FEATURE_VOTING_MODERATION), domain events, and mailables. Nothing here is exotic; it should drop into a standard Laravel app without adapter work. Two design choices materially affect fit: (1) moderation is opt-in via flag, so the upgrade is behaviorally inert on deploy; (2) translatable strings live in the host app's lang/*.json rather than shipping as package translations, which makes the host responsible for the full translation surface, including trans_choice plural forms.
Integration feasibility — High. The migration is independently publishable and the feature is dark-launched by default, so the risky work (schema change) is decoupled from the visible work (moderation UI + emails). Prerequisites the team must confirm: a working queue and mail transport, a reliable locale source on the recipient model, and a process for diffing host-customized views against package updates.
Technical risk — Moderate, concentrated in three areas:
publish() plus the FeatureRequestPublished event become integration points for host listeners. No backward-compatibility or deprecation policy is stated for the event payload or method signature.trans_choice. Locales with more than two plural categories (e.g. Slavic, Arabic) are the classic failure case, and the fallback when a key is missing is unspecified.Key questions for the maintainer
FEATURE_VOTING_MODERATION read from config or env directly? Can it be toggled without a config cache rebuild?FeatureRequestPublished dispatch synchronously or after commit, and is the payload considered stable API?lang/*.json keys get merged into host files, or must hosts author them, and what is the collision behavior on duplicate keys?Stack fit — Best fit is a Laravel 10/11 monolith or modular app already using Blade, Queue, and Mail, with at least one non-English locale. Apps without an existing locale strategy will get partial value: strings will translate, but mail locale routing depends on locale data they don't yet store.
Migration path — Treat this as a three-phase rollout rather than a version bump:
1.2.*), deploy with FEATURE_VOTING_MODERATION=false, run the published migration in staging, verify schema and backfill.lang/*.json keys into existing host files and resolve duplicates deliberately.Compatibility — Confirm minimum PHP/Laravel versions and whether the namespaced component layouts collide with any existing theme overrides. The shared lang/*.json namespace is the sharpest compatibility edge: a host key that happens to match a package key will be silently shadowed in one direction or the other.
Sequencing — Dependency update → migration review and staging run → view/lang publish and diff → deploy with flag off → event listener registration (if consuming FeatureRequestPublished) → moderation enabled in staging → translation and plural-form QA → pilot cohort → general availability. If non-English locales are in scope, start the translation work in parallel with phase 2, because it is the long-lead item, not the code.
Maintenance — The host now owns two upgrade artifacts: published views and a translation file. Add a standing runbook step to diff published views on every package release, and budget recurring effort for translation upkeep as new strings appear. This is a small but permanent tax, not a one-time cost.
Support — Moderation introduces a human workflow the package cannot own: someone must triage the pending queue, and there needs to be an agreed SLA, or submissions will appear to vanish. The submitter email also creates a new ticket category ("I published but got no email") that blends queue failures, mail misconfiguration, and locale fallbacks — support staff will need a diagnostic checklist.
Scaling — Mail volume now scales linearly with publish events, so queue throughput and provider rate limits become relevant at moderation-heavy volumes. The approval queue will run status-filtered queries, so index the moderation status column. If FeatureRequestPublished listeners run synchronously, they add latency to the publish request path — prefer queued listeners.
Failure modes — Ranked by likelihood:
trans_choice keys in non-trivial plural locales → grammatically wrong but non-crashing output, the hardest class to detect in QA.Ramp-up — A Laravel-fluent team should reach a tested pilot in roughly 1–2 engineering days plus 1 day of QA; the translation and plural-form review is additive and is the schedule driver for multilingual deployments. Teams without a Laravel specialist should add a day for the view-publish reconciliation alone, since that step is where most of the incident risk sits.
How can I help you explore Laravel packages today?