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.0(1y ago)013MITPHPPHP ^8.0

Since Aug 10Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (9)Versions (3)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

22

—

LowBetter than 23% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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 ~1 days

Total

2

Last Release

635d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/980b98659afec39a8ad563348b8a8a1c47b483a323b3138442a7cf9d9b7b6547?d=identicon)[ysugimoto](/maintainers/ysugimoto)

---

Top Contributors

[![ysugimoto](https://avatars.githubusercontent.com/u/1000401?v=4)](https://github.com/ysugimoto "ysugimoto (22 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/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M255](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M591](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M119](/packages/cakephp-chronos)

PHPackages © 2026

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