romansulzhyk/filament-import
A Filament plugin for importing records from CSV and Excel files into Eloquent models, with configurable columns, validation, and chunked processing for reliable admin-side data imports.
Architecture fit
filament-import is a Filament admin-panel plugin: an import action bound to a resource or page that parses an uploaded delimited/Excel file and writes rows into an Eloquent model. That fits internal, operator-driven data loads (reference data, bulk edits, migrations from spreadsheets) inside an existing Filament panel. v1.1.1 deliberately narrows the package's center of gravity to CSV — README and the Boost skill now lead with delimiter/encoding detection and an explicitly non-queued execution path. The architectural implication is that this is a synchronous, request-bound, human-in-the-loop import primitive, not an ingestion pipeline. Treat it as an admin convenience, not an ETL component.
Integration feasibility
The release surface is small and additive: one configuration method (->acceptedFileTypes([...])), a public constant for default spreading, .tsv support, and a content-sniffing fallback for extensionless files. Low code cost. The real work is policy, not implementation — deciding which MIME types each import surface should accept and writing a runbook for operators. A competent Laravel developer can spike this in half a day.
Technical risk
acceptedFileTypes is not a security control. The release is explicit: it governs what the upload accepts, while the reader decides from contents and extension. Anyone treating the accept list as a gate (e.g., "we only allow text/csv, so we're safe") is misreading the design. The actual trust boundary is the reader's sniffing logic..txt acceptance broadens the surface to arbitrary text payloads, which is fine for trusted operators and wrong for anything externally reachable.memory_limit, max_execution_time, and web-server timeouts are hard ceilings, and a timeout mid-import may leave partial writes unless the package wraps in a transaction (unconfirmed).acceptedFileTypes replaced an earlier method/signature or is net-new is not stated. Verify before upgrading.Key questions
->acceptedFileTypes([...]) a rename/replacement of a prior API (breaking) or a net-new method?ExcelImportAction::ACCEPTED_FILE_TYPES, and does it include the common real-world mislabels (text/plain, application/vnd.ms-excel, application/octet-stream)?; / | / \t delimiters?Stack fit
Laravel + Filament + PHP, installed via Composer, configured through a fluent action API. Assumes Eloquent models, Filament policies for authorization, and Filament's file-upload pipeline (and therefore Livewire temp-upload limits) in front of it. Works with local or S3-style disks; nothing in the release changes that. The explicit application/octet-stream example in the docs is a useful tell that the maintainer has hit real environments where CSVs are mislabeled — good sign for practical fit.
Migration path
There is no prior assessment, so this is a greenfield adoption: pin v1.1.1 exactly, do not float. Where an existing importer already exists (hand-rolled CSV parser, maatwebsite/excel usage, manual paste-into-DB workflows), migrate incrementally: inventory upload points → map each to an ExcelImportAction → set acceptedFileTypes explicitly per surface rather than relying on defaults → keep the legacy path behind a flag until parity is validated on real files. Do not big-bang replace a working importer on the strength of a patch release.
Compatibility
Confirm Filament major version (v3 vs v4 plugin APIs differ), Laravel major, and PHP floor before committing. Verify behavior on the storage disk actually used in production (temp paths, S3 pre-signed uploads, content-type rewriting on upload). Check that max_execution_time and post_max_size / upload_max_filesize are set high enough for the largest file ops will realistically submit — the package's no-queue design makes these settings functional requirements, not tuning.
Sequencing
.tsv, .txt, extensionless text, extensionless binary, .xlsx. Record accept/reject and, critically, parse correctness for each.Maintenance
Small dependency. Single-maintainer package in a personal GitHub namespace — real bus-factor risk, so pin the version and treat upgrades as reviews, not routine bumps. v1.1.1 is evidence that patch-level releases can change configuration semantics; read CHANGELOG.md every time. Budget a quarterly look at releases plus an immediate review on any security advisory.
Support Failures surface in the admin UI, so first-line support is the ops team, not engineering. Needs a written runbook covering: what "file type not accepted" means and how to fix it, how to re-save a spreadsheet as UTF-8 CSV, supported delimiters, the practical size ceiling, and what to do when an import half-completes. Expect encoding and delimiter confusion to be the dominant ticket category — that is the direct cost of the CSV-first direction and should be planned for, not discovered.
Scaling
Synchronous, in-request parsing. Throughput is bounded by PHP memory_limit, max_execution_time, and web-server timeouts — not by app servers, so horizontal scaling does not help. Comfortable for hundreds to low thousands of rows; genuinely risky in the tens of thousands. If import volume grows, the options are user-side chunking (poor UX), or a queued importer the package does not currently provide. Flag this ceiling to stakeholders now rather than after the first timeout incident.
Failure modes
.csv.Ramp-up Low for a Laravel developer — one action class, one configuration call, one policy. Moderate for operators, who must learn file hygiene (UTF-8, correct delimiter, correct extension). Realistic estimate: half-day technical spike, one to two days to production-ready including guardrails, fixture tests, and the runbook. Training is a one-page doc plus two or three worked example files, and it pays for itself in reduced encoding tickets.
How can I help you explore Laravel packages today?