Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filebase Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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.

  • Abandonment (high). Archived, last release February 2019. No security patches, no PHP 8.x hardening, no framework compatibility updates. Composer's abandoned-package signal and SBOM/audit tooling will flag it; that needs a documented, accepted exception.
  • Data integrity (high). Full-file rewrites, filesystem locking, no WAL, no multi-file transactions. Crash-during-write and lock-contention scenarios can produce corruption or lost updates absent backups and serialization discipline.
  • Query performance (medium). Filters and ordering are effectively full scans; cost grows linearly with record count and file size.
  • Compatibility (medium). PHP 8 deprecations, typed-property issues, and Laravel container/contract drift are plausible; unverified until spiked.
  • Licensing (low). MIT is permissive and clean for commercial use and forking.

Key questions.

  1. What is the expected record count, write rate, and read/write ratio for the target domain over 24 months?
  2. Is the deployment single-node and single-writer, or are we on multi-instance/container-replicated infrastructure where shared filesystems will break locking assumptions?
  3. What PHP and Laravel versions must we support, and will we accept a maintained fork?
  4. What are the durability and RPO/RTO requirements — is "restore from last backup" tolerable for this dataset?
  5. Who owns the fork and the patching obligation, and what is the exit trigger to migrate to SQLite or a server database?

Integration Approach

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:

  • Outbound (recommended default). Because data is human-readable files, exporting to SQLite or MySQL is straightforward. Enforce this by coding against a repository interface from day one so the swap is a binding change plus a one-off import script.
  • Inbound. Moving an existing relational workload into Filebase is a capability downgrade (no transactions, no indexes, no concurrent writers) and should be rejected unless the workload is provably append-mostly and small.

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.

  1. Spike (1 sprint): run the package on the target PHP/Laravel versions against a representative dataset and concurrent-write scenario; produce a go/no-go memo.
  2. Containment: wrap behind a repository/DAO interface; forbid direct package calls from controllers and jobs.
  3. Pilot: one low-blast-radius domain (feature flags, settings, small reference catalog, import staging) — explicitly not financial, PII, or audit-bearing data.
  4. Harden: backup/restore automation, file-lock and permission runbook, disk-usage alerting, corruption-detection check.
  5. Exit ramp: pre-agreed trigger (dataset size, write contention, or PHP upgrade) to move to SQLite/relational via the interface.

Operational Impact

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator