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(1y ago)019mitPHPPHP ^8.1

Since Jun 13Pushed 1y agoCompare

[ Source](https://github.com/MountZ1/civite)[ Packagist](https://packagist.org/packages/mountz/civite)[ RSS](/packages/mountz-civite/feed)WikiDiscussions main Synced 1w 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

30

—

LowBetter than 61% of packages

Maintenance45

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

430d ago

Major Versions

v0.1.3 → v1.02025-06-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/119827998?v=4)[Ardi Saputra](/maintainers/MountZ1)[@MountZ1](https://github.com/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

[codeigniter4/appstarter

CodeIgniter4 starter app

1811.8M](/packages/codeigniter4-appstarter)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)[hermawan/codeigniter4-datatables

Serverside Datatables library for CodeIgniter4

10949.8k4](/packages/hermawan-codeigniter4-datatables)[jason-napolitano/codeigniter4-cart-module

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

5915.6k](/packages/jason-napolitano-codeigniter4-cart-module)[maniaba/asset-connect

AssetConnect is a file management library for CodeIgniter 4 that allows you to associate files with any entity in your application

1016.0k](/packages/maniaba-asset-connect)

PHPackages © 2026

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