PHPackages                             ysugimoto/flame - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ysugimoto/flame

ActiveLibrary[Framework](/categories/framework)

ysugimoto/flame
===============

Frontend Integration library for CodeIgniter4

v0.5.2(2w ago)052MITPHPPHP ^8.0CI passing

Since Aug 10Pushed 2w ago1 watchersCompare

[ Source](https://github.com/ysugimoto/flame)[ Packagist](https://packagist.org/packages/ysugimoto/flame)[ RSS](/packages/ysugimoto-flame/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (18)Versions (5)Used By (0)

flame
=====

[](#flame)

`flame` is the frontend integration library for [CodeIgniter4](https://github.com/codeigniter4/codeigniter4).

Collaborate with vite frontend
------------------------------

[](#collaborate-with-vite-frontend)

This library loads manifest file which is generated via `vite` with [flame-vite-plugin](https://github.com/ysugimoto/flame-vite-plugin). You can specify loading asset files like `` and `` by helper function.

 ```
sequenceDiagram
  autonumber
    Vite->>flame: Build with flame-vite-plugin
    CodeIgniter->>flame: Load Manifest
```

      Loading For the generating manifest file, see [flame-vite-plugin](https://github.com/ysugimoto/flame-vite-plugin) documenration.

Installation
------------

[](#installation)

You can install via [packagist](https://packagist.org/packages/ysugimoto/flame).

```
composer require --dev ysugimto/flame
```

And then run the CodeIgniter's command.

```
php spark flame:setup
```

The above command generated package configuration in your `app/Config/Flame.php`. And also you need to load the `flame` helper. Modify configiration of your autoloader.

```
# app/Config/Autoload.php

class Autoload extends AutoloadConfig
{
    ...
    public $helpers = ["flame"];
    ...
}
```

Usage
-----

[](#usage)

Note

You need to genearte manifest file before.

After the setup, you can use the `flame` helper function in your view files.

```

```

We suggest to put this hepler calls inside the `` tag or before the `` tag.

### Preload

[](#preload)

To improve script/css loading performance, you can configrure the [preload](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload). To enable preloading, you can also use `flame_preload` helper function.

```

```

This function displays `` tag so need to be called inside the `` tag.

Alias
-----

[](#alias)

On developing backend, you might not consider about what asset file sould be loaded on view file. Then you can specify asset name as alias like:

```

```

On the above case, the `@main` alias will be resolved in the manifest file so you don't take care of the asset filename. To use the alias loading, see [Alias](https://github.com/ysugimoto/flame-vite-plugin?tab=readme-ov-file#alias) section in the vite plugin.

DevServer / HMR
---------------

[](#devserver--hmr)

`vite` can runs dev server with HMR and the `flame` also can synchronize with it. For example, `vite` command will start dev server like `http://localhost:5173`, and also `flame-vite-plugin` generates manifest file as **dev mode**. The `flame` helper function automatically recognize the manifest is dev mode or not, and generates `` tags with HMR mode. It is useful for developing frontend view with CodeIgniter. When you change the frontend file, the view that is displayed by CodeIgniter will reload automatically.

Manifest Loading
----------------

[](#manifest-loading)

Currently we support a way of loading manifest file via:

- Local FileSystem
- HTTP Request

The default setting is `Local FileSystem` but sometimes your frontend will be served via Cloud Storage service like `AWS S3`, `Google Cloud Storage` for some Single-Page-Application.

On this case, you can use `HTTP Request` manifest loading by changind configuration file.

```
// app/Config/Flame.php

class Flame extends FlameConfig
{
    ...
    public FetchMode $mode = FetchMode::HTTP;
    public string $baseUrl = "https://[yourdomain]/";
    ...
}
```

See phpdocs in the configiuration file in detail.

Contribution
------------

[](#contribution)

- Fork this repository
- Customize / Fix problem
- Send PR :-)
- Or feel free to create issues for us. We'll look into it

Author
------

[](#author)

Yoshiaki Sugimoto

License
-------

[](#license)

MIT

###  Health Score

40

↑

FairBetter than 86% of packages

Maintenance96

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~224 days

Total

4

Last Release

18d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1000401?v=4)[Yoshiaki Sugimoto](/maintainers/ysugimoto)[@ysugimoto](https://github.com/ysugimoto)

---

Top Contributors

[![ysugimoto](https://avatars.githubusercontent.com/u/1000401?v=4)](https://github.com/ysugimoto "ysugimoto (26 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ysugimoto-flame/health.svg)

```
[![Health](https://phpackages.com/badges/ysugimoto-flame/health.svg)](https://phpackages.com/packages/ysugimoto-flame)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
