luminovang/luminova

Luminova is a fast, modular PHP framework designed for simplicity, performance, and modern web application development.

Installs: 49

Dependents: 0

Suggesters: 1

Security: 0

Stars: 6

Watchers: 1

Forks: 0

Open Issues: 2

Type:project

pkg:composer/luminovang/luminova

2.3.6 2025-11-22 14:00 UTC

README

Author PHP 8.0+ Source Code Latest Version Framework Source Code Framework Latest Version Software License Total Downloads Endpoint Badge

Local Image

Luminova is a high-performance PHP framework designed for speed, efficiency, and developer productivity. It allows you to customize the framework to your project via the .env file, enabling only the features you need. This modular approach ensures optimal performance while giving you full control over template rendering modes and coding styles.

Within Luminova templates, View objects are accessible directly in your view files. You can call application methods and properties using $this or $self for stricter isolation mode.

Ready to try Luminova with your next projects? Explore the official documentation or join the community for tips, tutorials, and coding insights on our YouTube channel.

Luminova Skeleton This repository gives you everything you need to start a new Luminova project: a clean directory structure, essential configuration files, and the core bootstrapping setup.

Key Features

Luminova comes packed with tools to speed up development while keeping your application organized and performant.

  • Database Builder: ORM for easier CRUD operations and database management.
  • MVC & HMVC Architecture: Supports both MVC and Hierarchical MVC for modular applications.
  • Flexible Routing and Controllers: Fast, dynamic routing with attribute or method-based configuration.
  • HTTP and CLI Routing: Handing dynamic routing for HTTP or CLI, similar to HTTP routing.
  • Templating: Native PHP templating with inheritance, caching, and optional engines like Twig or Smarty.
  • Error Handling: Comprehensive error tracking, including non-fatal inline errors.
  • Session Management: Simplified session handling for authentication and user state.
  • Cloud Storage: Integrations with AWS, Azure, Google Cloud, and more.
  • File Management: Secure file delivery with temporary or permanent URLs.
  • Sitemap Generator: Generate sitemaps easily using NovaKit.
  • Schema Objects: Generate structured schema objects for pages.
  • Command Line Tools: Build full CLI applications with built-in routing support.
  • CLI Tooling: Command Line Helper for application development/production (php novakit).
  • AI Models: Extend your application with AI-powered features.
  • Flexible Database Failover: Instant failover support for backup databases.
  • Security: Implements multiple security layers to protect user data.
  • Request Handling: Securely process incoming and outgoing HTTP requests.
  • Email: Send emails with support for rendering full template content.
  • Translation & Localization: Build multilingual applications.
  • Encryption: Supports multiple encryption handlers and methods.
  • Services: Share classes and objects across your codebase with caching support.

Requirements

  • PHP 8.0+
  • Composer
  • ext-mbstring enabled
  • ext-json enabled
  • psr/http-client installed
  • psr/log installed
  • ext-json enabled
  • Web server (Apache, Nginx, or PHP built-in)

Installation

Create a new luminova project using Composer:

composer create-project luminovang/luminova my-project

Encryption Key

Generate your application encryption key:

php novakit generate:key

Start Development Server

To start PHP development server.

Run the following novakit command:

php novakit server

Visit: http://localhost:8000

Sitemap Generator

To generate your website XML sitemap:

Use the below novakit command:

php novakit sitemap

Directory Structure

app/
    │── Controllers/     # Route handlers
    │── Config/          # Application settings
    │── Models/          # Application data models
    │── Views/           # UI templates
    │── Modules/         # HMVC modules (optional)
bootstrap/      # Core Helper Functions
bin/            # Novakit Console Commands
public/         # Front Controller (Framework entry point)
resources/
        │── Views/     # MVC Template files
routes/         # Routes for Method-Based Routing
writeable/      # Private Storage, Logs, cache, Sessions, and Temp Files
system/         # Core Modules
    │── plugins/       # ThirdParty Vendor Files

Basic Usage

Defining Routes

Luminova supports flexible routing using PHP Attributes or Method-Based Routing.

Attribute Routing

Enable attribute routing by setting the environment variable:

feature.route.attributes = true

Example:

namespace App\Controllers\Http;

use Luminova\Base\Controller;
use Luminova\Attributes\Route;
use Luminova\Attributes\Prefix;

#[Prefix('/(:base)', exclude: ['api'])]
class MainController extends Controller
{
    #[Route('/', methods: ['GET'])]
    public function index(): int 
    {
        return $this->view('index');
    }
}

Method-Based Routing

Disable attribute routing by setting:

feature.route.attributes = false

Example:

namespace App\Controllers\Http;

use Luminova\Base\Controller;

class MainController extends Controller
{
    public function index(): int
    {
        return $this->view('index');
    }
}

Then register your route:

// /routes/web.php
$route->get('/', 'MainController::index');

Using a Callback Handler:

// /routes/web.php
use Luminova\Routing\Router;
use function Luminova\Funcs\view;

$router->get('/', function (): int {
    return view('index');
});

Rendering Templates

Inside a Controller

return $this->view(
    string $template,           // Template name
    array $options = [],        // View options
    string $type = View::HTML,  // Template content type
    int $status = 200           // HTTP status code
);

Alternative Using Template Property ($tpl):

return $this->tpl->view(
    string $template,           // Template name
    string $type = View::HTML   // Template content type
)->render(
    array $options = [],        // View options
    int $status = 200           // HTTP status code
);

Global Helper Function:

You can render views outside of a controller using the view() helper:

use function Luminova\Funcs\view;

return view(
    string $template,           // Template name
    array $options = [],        // View options
    string $type = View::HTML,  // Template content type
    int $status = 200           // HTTP status code
);

To learn more about Luminova, see the official documentation.

Quick Tips

Q: My session works locally but not on production. A: Update $sessionDomain in /app/Config/Session.php to match your production domain (e.g., '.' . APP_HOST). Also check Cookie.php configuration.

Q: CSS or images are broken on production. A: Ensure app.environment.mood is set to production in your environment file to serve assets correctly.

Contributing

If your contribution targets the core framework or its docs, use these repositories instead:

For this skeleton repository, pull requests should focus on:

  • Improving the project structure
  • Fixing default configuration files
  • Enhancing developers experience

Feedback

We welcome your feedback! Contact us at peter@luminova.ng with suggestions, feature requests, or tutorial ideas.

Don’t forget to ⭐ Luminova on GitHub. Your support helps us continue improving the framework and adding new features.

License

Luminova is open-source and released under the MIT License.