finity-labs/lin-codex
A Laravel/PHP package from Finity Labs that provides a structured codex for organizing, storing, and referencing definitions or documentation within your application, with a simple, configurable API for lookups and management.
Architecture fit
Positioning conflict — resolve before this enters a roadmap
fin-codex:install in the README and codex:install in the changelog, and a summary that describes a different package. Any of these individually is tolerable; together they are a signal about release discipline that a TPM should price in.Integration feasibility
composer require, publish config, publish migrations, migrate, one Blade directive in the layout. A competent Laravel developer reaches an end-to-end working drawer in under a day using five Markdown files.Technical risk
spatie/laravel-settings 3.7.0/3.7.1 the ShouldBeEncrypted attribute was unknown, so an AI API key saved via the settings page landed in settings.payload in plaintext. Fixed in 0.4.4 with a migration plus a method-level encryption declaration. The fix is sound and idempotent, but it establishes the failure class: silent secret exposure with no runtime error. Any inherited install must be audited, not assumed clean.ServiceProvider::optimizes()), illuminate/contracts ≥ 11.28 on the 11.x line, spatie/laravel-settings ≥ 3.7.2. These are transitive resolutions, not install blockers — the failure mode is degraded security posture, not a stack trace. Pin explicitly.LIKE behavior differs by driver and collation; non-ASCII case-insensitivity on SQLite is not a guarantee.Key questions to answer before committing
mount() accept as context, and is it stable enough to be a product convention?Stack fit
| Prerequisite | Requirement | Verification |
|---|---|---|
| Laravel | ≥ 11.27.1 | php artisan --version |
illuminate/contracts |
≥ 11.28 (11.x line) | composer show |
spatie/laravel-settings |
≥ 3.7.2, pinned explicitly | composer show |
livewire/livewire |
Present and current | composer show |
| Front end | Blade-rendered authenticated layout | Code review |
If any box is unchecked, the integration is not a one-day job and the plan should say so before an engineer discovers it mid-sprint.
Migration path — three stages, each with a gate
--ai. Five Markdown files for the highest-friction screen plus four adjacent tasks. Mount the drawer at the layout root behind a flag, authenticated users only, internal staff only. Gate: does a real user find the right article in the right language on the first try?billing.invoices.index, onboarding.step-2) so that migration is mechanical rather than a re-keying project.Compatibility and pinning
finity-labs/lin-codex:0.4.4 and spatie/laravel-settings:^3.7.2, commit composer.lock. Avoid ^0.4 in production — a single-maintainer pre-1.0 package can ship behavior changes in adjacent patches, and the plaintext-key incident shows what that costs.vendor:publish --force on the migrations tag before migrate. A stale published set will not pick up encrypt_codex_ai_api_key.Sequencing relative to other work
Maintenance
Support
Scaling
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
Plaintext API key in settings.payload |
No error; secret exposed in DB, screenshots, logs | Publish migrations, migrate on every environment; leave api_key null and supply the key via config/ai.php |
| Wrong article shown for a screen | Silent; users stop trusting the drawer | Key articles to route names, not URLs; enforce in review |
| Sensitive content visible to all | Silent; no built-in scoping | Wrap the component in an authorization check; partition content at the source for tenants |
| Drawer in a guest layout | Component mounts, auth-scoped queries fail silently | Authenticated layout only, at the root, never nested inside another Livewire component |
| Stale Markdown after content deploy | Article correct in repo, wrong in app | Skip article-index caching or add cache clear to the deploy script |
| Mixed-language search results | Results in unintended locales | Verify locale behavior in the pilot; namespace article keys per locale |
| Doc drift on command/tag names | Wasted setup time | php artisan list | grep -i codex; confirm tags in the provider |
Ramp-up
--ai, keep the key out of the database, and remove the entire encryption surface from the threat model. Most teams will never use it.How can I help you explore Laravel packages today?