PHPackages                             mountz/civite - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mountz/civite

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mountz/civite
=============

a library helper for integrating vite with codeigniter 4

1.2.2(11mo ago)018mitPHPPHP ^8.1

Since Jun 13Pushed 11mo agoCompare

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

READMEChangelogDependencies (1)Versions (9)Used By (0)

🔥 CiVite – Vite + Tailwind + CodeIgniter 4 Integration
======================================================

[](#-civite--vite--tailwind--codeigniter-4-integration)

**CiVite** brings fast front-end development to CodeIgniter 4 using [Vite](https://vitejs.dev/) and Tailwind CSS — with an easy `php spark vite:install` command. No boilerplate, just plug and play!

---

📦 Installation
--------------

[](#-installation)

```
composer require mountz/civite
```

> ✅ CodeIgniter 4 is required and will be installed automatically if not present.

---

🚀 Usage
-------

[](#-usage)

### 1. Generate `package.json` &amp; `vite.config.js`

[](#1-generate-packagejson--viteconfigjs)

Run this once after install:

```
php spark vite:init
```

It will generate the following in your project root:

- `package.json`
- `vite.config.js`

Install Node dependencies:

```
bun install
# or
npm install
```

Start Vite dev server:

```
bun run dev
# or
npm run dev
```

Change vite port: if u run vite with another port dont forget to add VITE\_ORIGIN = localhost:port in your env

---

### 2. Load Vite Assets in Your Views

[](#2-load-vite-assets-in-your-views)

In your layout/view files:

```

```

This will:

- Inject `` during dev
    - By default it will inject code inside resources/
- Load from `build/manifest.json` in production

---

🛠 Features
----------

[](#-features)

✅ Detects dev mode via `.hot` file
✅ Works with Bun or Node
✅ Supports hot module reload
✅ Autoloads `vite()` helper
✅ CLI installer (`vite:install`)
✅ Minimal config
✅ Tailwind &amp; Laravel Vite Plugin ready

---

🔧 Configuration (vite.config.js)
--------------------------------

[](#-configuration-viteconfigjs)

Here's the generated config:

```
import tailwindcss from '@tailwindcss/vite'
import laravel from 'laravel-vite-plugin'
import { defineConfig } from 'vite'

export default defineConfig({
  server: {
    host: 'localhost',
    port: 5173,
    hmr: { host: 'localhost' },
    cors: true,
    origin: 'http://localhost:5173'
  },
  plugins: [
    tailwindcss(),
    laravel({
      input: [
        'resources/main.js',
        'resources/css/app.css'
      ],
      refresh: true,
    })
  ],
})
```

---

📁 File Structure
----------------

[](#-file-structure)

```
/app
/public
/resources
  ├─ css/app.css
  └─ js/app.js
/vite.config.js
/package.json

```

---

💡 Requirements
--------------

[](#-requirements)

- PHP 8.1+
- CodeIgniter 4.4+
- Bun (`https://bun.sh`) or Node.js

---

```

---

## 📜 License

MIT © Ardi Saputra
GitHub: [mountz1](https://github.com/mountz1)

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance52

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

8

Last Release

338d ago

Major Versions

v0.1.3 → v1.02025-06-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/06d3fef8fe44f63d95a4f4fb5d7dedaf235908a5ee20fd518b2d39dc3aa07202?d=identicon)[MountZ1](/maintainers/MountZ1)

---

Top Contributors

[![MountZ1](https://avatars.githubusercontent.com/u/119827998?v=4)](https://github.com/MountZ1 "MountZ1 (11 commits)")

### Embed Badge

![Health badge](/badges/mountz-civite/health.svg)

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

###  Alternatives

[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10943.0k3](/packages/hermawan-codeigniter4-datatables)[jason-napolitano/codeigniter4-cart-module

A basic port of the codeigniter 3 cart module for CodeIgniter 4.

5814.8k](/packages/jason-napolitano-codeigniter4-cart-module)

PHPackages © 2026

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