sharpapi/nova-ai-translator
Add AI-powered translation to Laravel Nova. This package integrates SharpAPI to translate resource content and multilingual fields directly from Nova, making localization workflows faster and simpler for Laravel applications.
Architecture fit
The package is a thin integration layer: a Laravel Nova 4 Action that takes selected Eloquent models, serializes translatable attributes, and posts them to SharpAPI.com's translation endpoint before writing results back to the model. Architecturally this is the lowest-risk shape a third-party package can take — no service provider bootstrapping beyond Nova action registration, no schema changes, no queue worker of its own, no middleware, no event listeners on core lifecycle. It sits at the presentation/action layer of the admin panel and calls out over HTTP.
That said, it is a convenience wrapper, not a platform component. The underlying capability is roughly: loop over $models, collect $model->getAttributes() filtered by a configured field list, POST to https://sharpapi.com/api/v1/..., parse response, $model->update([...]), fire Nova's action response. A mid-level Laravel engineer reproduces this in a day. The package's value is therefore packaging and maintenance transfer, not capability.
v1.1.2 clarifies the runtime shape: the action iterates records sequentially inside a single action invocation, with per-record skip logic and a batch summary in the response. That confirms the wrapper is a loop, not a job dispatcher — which matters for everything downstream.
Integration feasibility Feasible but conditional on four hard gates:
name_en/name_fr columns) or a JSON-column approach (name->en).update() on the model inside an action means no draft/review state. If your editorial workflow requires human review before publish, this package fights you.Technical risk High, and mostly not technical — it's supplier and adoption risk:
sharpapi) and the API (SharpAPI.com) are the same commercial entity. That's coherent as a business model but means the package's maintenance is tied to a marketing funnel, not to user demand.return inside a loop, shipped and presumably used — is a strong signal that multi-record paths were not covered by automated tests. The fix is welcome; the fact it existed at v1.1.x is the signal.Key questions
Action::queued() / ShouldQueue, or is it synchronous? v1.1.2's batch-summary messaging implies synchronous in-request iteration. If so, bulk translation is bounded by PHP max_execution_time and provider rate limits.product.translations)?Stack fit Good fit only for a narrow profile: Laravel 9/10/11 + PHP 8.1+ + Nova 4 + an admin-editable content model with a small, well-defined translatable field set (product names, category labels, CMS pages, marketing copy). Poor fit for developer-facing APIs, high-volume batch translation, or anything requiring translation memory / glossary control.
The package is additive by design — installing it cannot break existing routes or schema. That makes the integration cheap and the decision the expensive part.
Migration path There is nothing to migrate. This is greenfield adoption into the Nova admin panel:
Category)..env → config/services.php, never committed.Compatibility
| Dimension | Constraint | Verification needed |
|---|---|---|
| Nova | 4.x only | Composer nova constraint in composer.json |
| Laravel | 9+ (Nova 4 requirement) | Whether package tests against 10/11 |
| PHP | 8.0+ | Static analysis / typed properties |
| Locale storage | Column-suffix vs JSON | Read the action source |
| Queue | Sync loop confirmed by v1.1.2 messaging | Whether ShouldQueue is offered at all |
| Package version | Pin ≥ 1.1.2 | Do not adopt 1.1.0–1.1.1; batch skip defect |
Vendor-pin the package to an exact version, and pin no lower than 1.1.2. With 0 dependents there is no ecosystem pressure to keep it compatible with Laravel majors, so expect it to lag.
Sequencing
Default recommendation for a TPM without a specific, near-term translation requirement: do not adopt; run the spike and harvest the pattern. v1.1.2 is a genuine quality improvement and moves the package from "unproven" toward "actively maintained," but one patch release does not create a user base. Treat it as a reference implementation that is now slightly better reference material.
Maintenance Low code surface, but maintenance burden is concentrated and unavoidable: Nova major upgrades (Nova 5 will land), Laravel major upgrades, and SharpAPI API version changes. A package with 4 stars has no crowd to absorb that work — you are the maintenance plan. v1.1.2 is mild evidence the maintainer is responsive to real usage reports, but responsiveness to bug reports from a small user base is not the same as a maintained release cadence. Budget a small dependency-review line item each quarter, and keep a fork-ready posture (it's MIT, so forking is a legitimate exit).
Support Single upstream maintainer with a commercial incentive. Response quality is unknown and untested by a user base. Internally, support load lands on whoever owns the Nova admin — every failed translation becomes a support ticket ("the translate button errored"). v1.1.2 improves the message quality story (batch summary reports skip counts, the "already contain content" notice is now conditional rather than blanket), which reduces a specific class of confusing editor report. Plan an error message that still distinguishes provider down from bad API key from invalid locale.
Scaling This is the weak point, and v1.1.2 doesn't change it — it sharpens it. Translation runs as a synchronous HTTP loop inside a single admin action call, per record. Bulk-translating 2,000 SKUs through this action is not viable: request timeout, provider rate limits, and PHP max execution time all bind simultaneously, and now the loop length is explicit rather than incidental. The one real scaling improvement in this release is economic, not architectural: already-translated records are skipped individually rather than aborting the batch, so re-runs over a mostly-complete dataset cost less and complete more. That makes incremental top-up translation viable in a way it previously wasn't — but full-corpus backfill remains the wrong tool. If bulk translation is on the roadmap, you want a queued job with batching and retry, which means writing your own layer regardless.
Cost also scales linearly and invisibly: there is no spend dashboard in the package. Someone must reconcile SharpAPI invoices against actual usage, and should sanity-check that skipped records are in fact not billed.
Failure modes
title to headline) silently stops translating that field with no error.Ramp-up Very low for engineers (~1 hour to install and wire up), low for editors (single action in the Nova resource dropdown; v1.1.2's clearer skip messaging marginally lowers editor confusion). The real ramp-up cost is institutional: security/compliance sign-off on the data egress, finance sign-off on metered API spend, and editorial sign-off on a workflow that has no human review step. Those three approvals, not the code, are the critical path.
Net TPM read: the package is a small, honest, correctly-scoped wrapper around a paid API, and v1.1.2 is a real correctness fix worth taking — it removes a silent-partial-batch failure mode and makes incremental re-runs economic. It does not change the underlying verdict. Opportunity score of 35.8 and 4 stars still point the same direction: viable as a pattern to copy or a spike to validate, not as a dependency to adopt on the strength of its own merit. Approve the 2-day spike — with the mixed-batch test as a required step and a version floor of 1.1.2 — gate adoption on a real translation requirement, and pre-commit to an in-house fallback.
How can I help you explore Laravel packages today?