tmarois/filebase
tmarois/filebase is a lightweight flat-file database for Laravel and PHP. It stores records in JSON files and provides a simple, Eloquent-like API for creating, querying, and managing data without configuring a traditional database—ideal for small apps, prototypes, and local tools.
Architecture fit. Filebase is a filesystem-backed, JSON-style flat-file store with a query-builder-flavored API. It is architecturally appropriate for small, bounded, read-mostly, single-node datasets: prototype/MVP backends, internal admin tools, CLI utilities, config or settings stores, cached reference data, and embedded/edge deployments where standing up MySQL or Postgres is disproportionate. It is a poor fit for anything requiring multi-tenant isolation, transactional guarantees, high write concurrency, horizontal scaling, or datasets beyond the low-megabyte range. From a TPM standpoint, the decision is not "is this a database" but "is zero-ops portability worth trading away durability and scale headroom on this specific domain."
Integration feasibility. Technically low-friction: Composer install, PSR-4 autoload, and a Laravel service provider/facade in the 2019-era release. A developer can have a working CRUD slice in under a day. The friction is not installation but era mismatch — the package predates PHP 8, Laravel 6+, and modern static analysis, so integration on a current stack requires an explicit compatibility spike rather than an assumption of "it's just PHP."
Technical risk.
Key questions.
Stack fit. Best evaluated as a persistence detail behind an interface, not as an application-wide data layer. On Laravel 5.x/PHP 7.x it is near drop-in. On Laravel 9–11/PHP 8.1+, treat it as a fork-and-patch dependency rather than a stock package. SQLite is the natural benchmark comparator: same zero-ops profile, better durability and concurrency, and it is first-class in Laravel. If SQLite satisfies the requirement, Filebase's only advantage is file-level readability and per-record portability.
Migration path. Two directions matter:
Compatibility. Verify in a spike before committing: PHP 8.x deprecation/type errors, Laravel service-provider and facade registration, filesystem permissions and ownership under the runtime user, path handling on Windows dev machines vs Linux containers, opcache/realpath behavior after file writes, and date/model serialization round-trips. Also confirm behavior on network filesystems — it should be treated as unsupported.
Sequencing.
Maintenance. Effectively zero upstream maintenance and therefore a permanent internal obligation. Budget for a fork with a named owner, a pinned version, an annual compatibility review, and a recorded risk acceptance in the dependency policy. Expect procurement/security review to challenge an archived dependency; prepare the justification in advance.
Support. No vendor, no SLA, no CVE feed. Support is internal-only and knowledge-concentrated — mitigate with a short design/ops note and at least two engineers able to operate it. Incident diagnosis is filesystem-level (permissions, locks, disk, corrupted JSON) rather than SQL-level, which changes on-call playbooks.
Scaling. Vertical and single-node only. Write throughput is bounded by file locking and full-file rewrites; read cost scales with total file size. Practical guidance: keep datasets in the low megabytes, avoid unbounded append logs, archive or rotate cold records, and load-test with the real growth curve rather than a toy fixture.
Failure modes. Partial writes and corruption on crash; lock contention and timeouts under concurrent writers; permission and ownership errors after deploys or container rebuilds; disk-full truncation; silent lost updates on replica/shared-volume deployments; backup gaps because teams assume "it's just files" and skip snapshotting. Each needs an explicit mitigation — atomic write discipline where supported, single-writer topology, scheduled backups with a tested restore, disk alerts.
Ramp-up. Developer ramp-up is genuinely low (a day to productive, simple API, readable data files), which is a real delivery-speed advantage in the right context. Operational ramp-up is the opposite: the team must learn locking and filesystem semantics to run it safely. Pair the pilot with a 1–2 page runbook (backup, restore drill, corruption recovery, exit procedure) and a short enablement session so the low learning curve does not mask the operational sharp edges.
How can I help you explore Laravel packages today?