krystal-sf/ux-common
A shared UX toolkit for Laravel/PHP projects, offering common UI helpers and conventions that keep interfaces consistent across Krystal applications. Use it as a lightweight foundation for reusable front-end patterns and smoother developer workflows.
Architecture fit. Poor for a Laravel estate. The package is described as "common files for Krystal Symfony UX Projects" — a shared artifact for a family of Symfony applications built on Twig, Symfony UX (Turbo/Stimulus), Flex recipes, and bundle DI configuration. Laravel's rendering contract is entirely different: Blade instead of Twig, service providers instead of bundles, Livewire/Alpine instead of Turbo/Stimulus, Vite instead of Encore/AssetMapper. A TPM should record this as a framework-bound artifact, not a portable utility, and treat the description's framing as a hard architectural exclusion rather than a reason to attempt an adapter.
Integration feasibility. composer require will resolve and may even install, but it imports symfony/framework-bundle, twig/twig, and symfony/ux-* transitive weight into an application that already ships its own container, view engine, and asset pipeline. That is redundant surface area at best and dependency resolution conflict at worst, against zero offsetting benefit. The only realistic consumption model is asset vendoring — copying Stimulus controllers and stylesheets into resources/js and resources/css under our own build and versioning — and translating any Twig components into Blade by hand. From a program-management standpoint that is a fork-and-own decision, and it should be scoped and staffed as such, not ticketed as "add dependency."
Technical risk. High, but driven almost entirely by maturity signals rather than any judgement on code quality. Score 0, zero stars, zero dependents, an intentionally terse description, and no observable release cadence. This is the profile of an internal extraction published for the maintaining organization's CI convenience. Assume no semver contract, no documented public API, no deprecation policy, no security response process, and single-maintainer bus factor. There is a secondary behavioral risk if Turbo is part of the payload: Turbo's navigation model overlaps with Livewire's SPA-style navigation and produces intermittent, hard-to-reproduce UI defects when both are active.
Key questions. These are the gates before any further engineering spend:
dev-main?Stack fit. Partial, front-end only, and generously so. Model the payload as roughly 20–40% portable (Stimulus controllers, CSS, design tokens) and 60–80% non-portable (Twig templates, bundle wiring, PHP helpers, Symfony event subscribers). A TPM should explicitly write down the write-off: we are not building a Twig-to-Blade adapter layer. View-engine adapters are a permanent maintenance tax with no product payoff and no stakeholder willing to fund them.
Migration path. Fork to a private repository rather than maintaining a live Composer dependency. Triage contents into three buckets: portable (JS/CSS), translatable (Twig → Blade, one-to-one where the component actually earns its keep), and discard (bundle class, DI extension, event subscribers, Symfony-specific glue). Rebuild the portable slice on our Vite pipeline with our own versioning and changelog. Pin the upstream commit hash in the fork's README purely for provenance, so future maintainers can diff.
Compatibility. Verify three things before writing code: PHP constraint overlap with our supported Laravel versions, Stimulus major version against whatever the front end already standardizes on, and whether the CSS assumes a preprocessor or token system we do not use. If Turbo ships in the package, force the decision up front — we are a Turbo shop or a Livewire shop, not both. That is a roadmapping decision, not an implementation detail.
Sequencing. Timeboxed, each step with an explicit exit:
Recommendation. Do not adopt as a Composer dependency. Fund at most a one-week evaluation spike against the front-end assets only. If the portable slice turns out small or duplicative — the likely outcome given the signals — close the evaluation, harvest the pattern, and build the shared Blade component package internally on our own release cadence. The transferable idea is the architecture: a single ux-common-style package consumed by N application repositories, with app-specific overrides layered on top. That is reproducible in Laravel with a private Composer package in days.
Maintenance. Consuming it means maintaining someone else's roadmap: we cannot schedule fixes, and upstream refactors land on Krystal's priorities. Forking means we absorb the full cost but gain control — the correct trade given the alternative is unmaintainable. With zero dependents, assume the code is not battle-tested in the wild and budget discovery time for rough edges rather than expecting a stable baseline.
Support. No SLA, no documentation, no evidence of an active issue queue, no community triage. Every "how does this work" question terminates in reading source. For a TPM this is a staffing implication: internal documentation for any adopted component set is a prerequisite deliverable, not a nice-to-have, and it should appear as a line item in the plan rather than an assumption.
Scaling. A non-issue if we vendor only the front-end assets — they scale with the asset pipeline like any other JS and CSS. If we instead consume the bundle directly across multiple Laravel applications and CI environments, expect Composer resolution complexity to multiply and container/DI overhead for services Laravel will never invoke. That overhead compounds per app and is exactly the kind of cost that looks trivial at one app and becomes a recurring tax at five.
Failure modes. The risk register should name these explicitly:
Ramp-up. Low for a front-end engineer fluent in Stimulus and component-scoped CSS — the mental model is conventional. High for anyone expecting Laravel idioms; the Symfony-versus-Laravel convention gap is the dominant onboarding friction and should be documented before the first pull request, not discovered during review. Net TPM position: one week to evaluate, one named owner, and a hard decision gate before any line from this repository enters a production Laravel codebase.
How can I help you explore Laravel packages today?