Luminova Framework

PHP Luminova: Shared Framework Installation for Multi-Project Environments

Last updated: 2026-05-01 08:20:20

Luminova Shared Modules enable multiple projects to run on a single shared framework installation. Core paths are resolved via `.luminova.php`, with strict version enforcement and configurable shared-loading behavior across environments.

Luminova Shared Module Installation allows multiple projects to use a single Luminova framework installation on the same server.

Instead of installing the framework separately in each project, you maintain one central installation and configure applications to reference it.

This approach reduces duplication, enforces consistency, and simplifies maintenance in multi-project environments.

Benefits

  • Reduces duplicate framework files across projects
  • Ensures all projects use the same framework version
  • Simplifies updates by maintaining a single codebase
  • Update once, apply everywhere

How It Works

A standard Luminova project loads all framework components from its local /system and /bootstrap directories.

With Shared Modules, this changes:

  • The project only keeps minimal startup files
  • Core framework code is loaded from a shared installation
  • .luminova.php defines where the shared framework is located

Start local, extend from a shared core.


Required Files (Always Local)

Even when using shared modules, these files must exist inside every project:

  • system/Boot.php → Core boot loader for the application
  • bootstrap/constants.php → Project-specific constants and configuration
  • system/plugins/ → Project-specific Composer dependencies

These files are never shared. They are always loaded locally.


Project Structure

/www/example.com/
├── app/
├── bin/
├── node/
├── public/
├── resources/
├── routes/
├── bootstrap/
│   └── constants.php
├── system/
│   ├── Boot.php
│   └── plugins/
└── .luminova.php

You may safely remove other files inside /system/ because they are loaded from the shared installation.

Note:If Boot.php or constants.php is missing, the application will not start.


Shared Installation Structure

Shared Luminova files are stored in a central directory outside the project.

/www/luminova-modules/3.8.0/
├── bootstrap/
│   ├── functions.php
│   └── worker.php
└── system/
    └── Luminova.php
    └── (Other Modules Except for plugins)

Shared Components

The following are loaded from the shared installation:

  • system/* (Except for plugins/ and Boot.php)
  • bootstrap/functions.php
  • bootstrap/worker.php

Everything else remains project-local.


Boot Configuration File

Luminova uses .luminova.php to control how framework paths are resolved.

It is loaded early by Luminova\Boot, before autoloading starts.

Purpose

  • Define shared framework location
  • Enable or disable shared loading
  • Enforce framework version consistency

Shared Installation Setup

Install Luminova in a central location outside the web root.

Example:

/www/luminova-modules/3.8.0/

Install via Composer:

# /www/luminova-modules/3.8.0/

composer install luminovang/framework

Suggested Structure

Shared models installation directory structure:

/install/Boot/
/src/

This structure is not mandatory, but strongly recommended.

For consistency, you may rename:

  • srcsystem
  • /install/Boot/bootstrap

Project Boot Configuration

Each project defines its shared framework setup in .luminova.php.

// /www/example.com/.luminova.php

return [
    'resolve.paths' => true,

    'luminova.version' => '3.8.0',

    'luminova.paths' => [
        'root'      => '/www/luminova-modules/3.8.0',
        'system'    => '/www/luminova-modules/3.8.0/system',
        'bootstrap' => '/www/luminova-modules/3.8.0/bootstrap',
        'plugins'   => '/www/example.com/system/plugins',
    ],
];

Project Optimization After Setup

After enabling shared modules, clean up the project /system directory:

Keep only:

/system/
├── Boot.php
└── plugins/

Remove all other framework files, then rebuild Composer autoload:

# /www/example.com/

composer dump-autoload --no-dev --optimize

Once configured correctly:

  • Framework is loaded from shared installation
  • Project remains lightweight
  • Updates are centralized
  • Each project stays independent at the application level

Configuration Reference

resolve.paths

resolve.paths (bool)Enables or disables shared framework loading.

  • true → Load framework from shared installation
  • false → Use local project framework only

When to use:

  • Enable in production environments with shared Luminova
  • Disable for debugging, isolation, or standalone testing

When disabled, the project behaves like a fully self-contained installation.


luminova.version

luminova.version (string)Defines the required Luminova framework version for the project.

Behavior:

  • Must match the version of the shared installation
  • If versions do not match, the application will stop during boot

This check is intentional.Running mismatched framework versions can cause silent and hard-to-trace failures.


luminova.paths

luminova.paths (array)Defines the mapping between framework components and their shared locations.

Keys

  • root → Base directory of the shared Luminova installation
  • system → Core framework modules
  • bootstrap → Bootstrap logic and global functions
  • plugins → Project-specific vendor packages and third-party extensions

Rules:

  • All paths must be absolute
  • Trailing slashes are optional
  • These paths are only used when resolve.paths is enabled
  • Invalid paths will cause boot failure