iconify/json
Iconify JSON is a Composer package that bundles thousands of open-source icon sets as JSON data, letting PHP projects search, load, and render icons locally without external API calls. It includes metadata, aliases, and SVG path data for flexible icon workflows.
Architecture fit. iconify/json is not a PHP library — it is a versioned data corpus of ~150k icons across 100+ sets, shipped as consolidated per-set JSON files plus metadata. Its architectural role in a Laravel app is a data layer behind an icon resolver, not a runtime dependency. That fits cleanly with Laravel's service-provider + facade idiom: one IconifyRepository reading from a configured filesystem path, one Cache-backed resolver, one Blade component. The package's value is breadth and licensing-permissiveness of the icon inventory, not any code it contributes.
Integration feasibility. Three viable paths, in descending order of preference:
blade-icons + an Iconify driver) that already vendors the JSON — fastest, lowest ownership cost.resources/icons/ (or read from node_modules) and write a thin reader service ourselves — more control, more ownership.All three are feasible within a single sprint. Path 1 is the recommended default.
Technical risk.
prefix:name as a soft reference.Key questions for the team.
Stack fit. Laravel 10/11, PHP 8.1+. The package has no framework coupling, so it composes with whatever rendering layer we already use. For Blade, expose <x-icon name="mdi:home" />; for a JS front end, expose GET /icons/{set}/{name}.svg behind cache headers. Both share the same resolver and cache key space.
Migration path.
composer.json or a lockfile.IconifyRepository (read + parse + cache) and the Blade component. No call sites change yet.Compatibility. Coexists with any existing SVG icon package, with one caveat: component name collisions on x-icon if another package already registers it — namespace ours explicitly. No database, queue, or Node build step is strictly required if we consume a Composer-vendored copy; a Node step is only needed if we pull from node_modules.
Sequencing. License audit → set selection → data ingestion → resolver + cache → Blade component / HTTP endpoint → call-site migration → legacy removal. The audit gates everything; do not let a "just try it" spike ship a GPL set into a proprietary product.
Maintenance. Upstream moves quickly. Pin the version, review upgrades as a scheduled task (monthly is sufficient), and automate the diff as a bot-opened PR. Diffs are large but mechanically reviewable — additions only, unless a set is renamed.
Support. Iconify is a well-run community org but has no PHP maintainer; if we take path 2, we own the wrapper outright. Assign a named owner and write a one-page runbook covering cache busting and set updates.
Scaling. File reads are cheap, but only if we read one consolidated JSON per set and cache the parsed array — never walk per-icon files. For high-traffic surfaces, pre-generate a sprite or inline critical icons at build time and serve the HTTP endpoint through a CDN. OPcache handles the PHP side; Laravel's cache handles the parse cost.
Failure modes to design for.
Ramp-up. Low. A developer familiar with Blade components reaches productivity in half a day; the only new concepts are the prefix:name convention and the JSON shape (icons, aliases, width, height, chars). Budget the real time on the license audit and the call-site migration, not the code.
How can I help you explore Laravel packages today?