PHPackages                             juzaweb/installer - 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. juzaweb/installer

ActiveLibrary

juzaweb/installer
=================

Juzaweb CMS installer

1.0.5(2mo ago)11.6k↓50%3GPL-2.0PHPPHP ^8.2CI passing

Since Feb 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/juzaweb/installer)[ Packagist](https://packagist.org/packages/juzaweb/installer)[ Docs](https://cms.juzaweb.com)[ RSS](/packages/juzaweb-installer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (12)Used By (3)

Juzaweb CMS Installer
=====================

[](#juzaweb-cms-installer)

[![Tests](https://github.com/juzaweb/installer/actions/workflows/tests.yml/badge.svg)](https://github.com/juzaweb/installer/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A comprehensive installation package for Juzaweb CMS that provides a web-based installation wizard and command-line installation support.

Features
--------

[](#features)

- **Web-based Installation Wizard**: User-friendly interface for installing Juzaweb CMS
- **System Requirements Check**: Validates PHP version and required extensions
- **Permissions Verification**: Ensures proper folder permissions
- **Environment Configuration**: Easy setup of database and application settings
- **Database Installation**: Automated database migration and seeding
- **Admin Account Creation**: Quick setup of the first administrator account
- **Command-line Installation**: Support for automated installation via Artisan command

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

[](#installation)

This package is automatically included with Juzaweb CMS. No separate installation is required.

Requirements
------------

[](#requirements)

### PHP Version

[](#php-version)

- PHP &gt;= 8.2

### Required PHP Extensions

[](#required-php-extensions)

- OpenSSL
- PDO
- Mbstring
- Tokenizer
- JSON
- cURL

### Apache Modules

[](#apache-modules)

- mod\_rewrite

### Folder Permissions

[](#folder-permissions)

The following directories must be writable (775):

- `storage/`
- `bootstrap/cache/`
- `resources/`
- `public/`

Usage
-----

[](#usage)

### Web-based Installation

[](#web-based-installation)

1. Navigate to your application URL in a web browser
2. The installer will automatically redirect you to the installation wizard
3. Follow the step-by-step process:
    - **Welcome**: Introduction to the installer
    - **Requirements**: System requirements verification
    - **Permissions**: Folder permissions check
    - **Environment**: Database and application configuration
    - **Database**: Database installation
    - **Admin**: Create administrator account
    - **Final**: Complete installation

### Command-line Installation

[](#command-line-installation)

Use the Artisan command for automated installation:

```
php artisan install
```

This command will guide you through the installation process via the command line.

Configuration
-------------

[](#configuration)

### Publishing Configuration

[](#publishing-configuration)

To customize the installer configuration, publish the config file:

```
php artisan vendor:publish --tag=installer_config
```

This will create `config/installer.php` where you can customize:

- Minimum PHP version
- Required PHP extensions
- Required Apache modules
- Folder permissions
- Environment form validation rules

### Publishing Assets

[](#publishing-assets)

To publish the installer assets (CSS, JS, images):

```
php artisan vendor:publish --tag=installer-assets
```

Assets will be published to `public/vendor/installer/`.

Middleware
----------

[](#middleware)

The package registers the following middleware:

### `Installed` Middleware

[](#installed-middleware)

- Automatically applied to `theme` and `admin` middleware groups
- Redirects to the installer if the application is not yet installed
- Prevents access to the application until installation is complete

### `CanInstall` Middleware

[](#caninstall-middleware)

- Registered as `install` middleware alias
- Protects the installer routes
- Prevents re-installation if the application is already installed

Routes
------

[](#routes)

The installer provides the following routes under the `/install` prefix:

- `GET /install` - Welcome page
- `GET /install/requirements` - Requirements check
- `GET /install/permissions` - Permissions check
- `GET /install/environment` - Environment configuration form
- `POST /install/environment` - Save environment configuration
- `GET /install/database` - Database installation
- `GET /install/admin` - Admin account creation form
- `POST /install/admin` - Save admin account
- `GET /install/final` - Installation completion

Helper Functions
----------------

[](#helper-functions)

### `isActive()`

[](#isactive)

Set the active class to the current opened menu.

```
/**
 * @param array|string $route Route name(s) to check
 * @param string $className CSS class name (default: 'active')
 * @return string|false Returns the class name if active, empty string or false otherwise
 */
isActive($route, $className = 'active')
```

**Examples:**

```
// Single route
Welcome

// Multiple routes
System Check

// Custom class name
Database
```

Events
------

[](#events)

The package dispatches the following events:

- `Juzaweb\Installer\Events\EnvironmentSaved` - Fired when environment configuration is saved
- `Juzaweb\Installer\Events\LaravelInstallerFinished` - Fired when installation is completed

Testing
-------

[](#testing)

The package includes a comprehensive test suite using PHPUnit and Orchestra Testbench.

### Running Tests

[](#running-tests)

```
# Run all tests
composer test

# Run tests with coverage
composer test-coverage

# Run specific test file
vendor/bin/phpunit tests/Feature/InstallerRoutesTest.php

# Run tests with verbose output
vendor/bin/phpunit --testdox
```

### Test Coverage

[](#test-coverage)

The test suite includes comprehensive coverage for both validation failures and success scenarios:

**Feature Tests:**

- `InstallerRoutesTest` - Tests for all GET routes (welcome, requirements, permissions, environment)
- `EnvironmentPostTest` - Environment configuration POST endpoint
    - **Validation Tests** (6 tests): Required fields, data types, max lengths, input preservation
    - **Success Tests** (4 tests): Valid credentials, database connection, redirect flow, environment file saving
- `AdminPostTest` - Admin account creation POST endpoint
    - **Validation Tests** (11 tests): Required fields, email format, password rules, confirmation, max lengths
    - **Success Tests** (6 tests): User creation, password hashing, various email formats, special characters, success messages
- `InstallerMiddlewareTest` - Tests for middleware behavior and CSRF protection

**Unit Tests:**

- `HelperFunctionsTest` - Tests for the `isActive()` helper function

**Total Test Cases:** 30+ tests covering:

- ✅ Route accessibility
- ✅ Form validation rules (required, format, length)
- ✅ Error handling and redirects
- ✅ Input preservation on validation failure
- ✅ Successful form submissions
- ✅ Database operations (mocked)
- ✅ Password hashing
- ✅ Middleware functionality
- ✅ CSRF protection

### Code Formatting

[](#code-formatting)

The package uses Laravel Pint for code formatting:

```
# Format code
composer format

# Check code style without fixing
vendor/bin/pint --test
```

### Continuous Integration

[](#continuous-integration)

The package uses GitHub Actions for automated testing. Tests run on:

- PHP 8.2 and 8.3
- Laravel 11.x
- Ubuntu latest

The CI workflow runs on every push and pull request to `main`, `master`, and `develop` branches.

Security
--------

[](#security)

- The installer automatically disables itself after successful installation
- Environment files are protected and not accessible via web
- Database credentials are validated before saving
- Admin password is hashed using Laravel's secure hashing

Troubleshooting
---------------

[](#troubleshooting)

### Installation Page Not Loading

[](#installation-page-not-loading)

If the installation page doesn't load:

1. Check that your web server is properly configured
2. Ensure `.htaccess` (Apache) or nginx configuration is correct
3. Verify that `mod_rewrite` is enabled (Apache)

### Permission Errors

[](#permission-errors)

If you encounter permission errors:

```
chmod -R 775 storage bootstrap/cache resources public
chown -R www-data:www-data storage bootstrap/cache resources public
```

### Database Connection Failed

[](#database-connection-failed)

If database connection fails:

1. Verify database credentials
2. Ensure the database exists
3. Check that the database user has proper permissions
4. Confirm the database server is running

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

Support
-------

[](#support)

For support and documentation, visit:

- Homepage:

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~6 days

Total

6

Last Release

66d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3169e8a8781068840e9300a57785089da521287dbe0279fc9cc7e8de1c1d95a9?d=identicon)[juzaweb](/maintainers/juzaweb)

---

Top Contributors

[![juzaweb](https://avatars.githubusercontent.com/u/47020363?v=4)](https://github.com/juzaweb "juzaweb (32 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (8 commits)")

---

Tags

juzawebjuzaweb-cmsinstallerjuzaweb cms

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/juzaweb-installer/health.svg)

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

PHPackages © 2026

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