LavaLust at a Glance

LavaLust is a lightweight, open-source PHP framework designed to help developers build web applications quickly without sacrificing simplicity or performance. This page gives a high-level overview of what makes LavaLust a practical choice.

Free and Open-Source

LavaLust is released under the MIT License, which means you can use it freely in personal and commercial projects with no licensing fees or restrictions. The source code is publicly available and open to community contributions on GitHub.

Lightweight and Fast

Unlike heavier frameworks that load dozens of libraries on every request, LavaLust follows a load-only-what-you-need philosophy. The core footprint is small, boot time is minimal, and you are never forced to carry dependencies your application does not use.

Characteristic

Details

Small core

The framework’s core files are minimal — no bloat out of the box

On-demand loading

Libraries, helpers, and models are loaded only when called

No heavy dependencies

Ships without mandatory third-party packages

Low memory footprint

Suitable for shared hosting and resource-constrained environments

Model–View–Controller (MVC)

LavaLust is built around the Model–View–Controller architectural pattern, which separates an application into three distinct layers. This keeps business logic, presentation, and data access cleanly decoupled and makes the codebase easier to maintain and scale.

Layer

Location

Responsibility

Model

app/models/

Communicates with the database; encapsulates business logic and data rules

View

app/views/

Renders the HTML (or JSON/XML) output returned to the client

Controller

app/controllers/

Receives the HTTP request, coordinates the model and view, and returns a response

A typical request flows through the framework like this:

HTTP Request
     
     
[ Router ]    routes.php matches the URI
     
     
[ Controller ]    orchestrates the request
              
            [ Model ]    reads / writes the database
              
     
[ View ]    renders the output
     
     
HTTP Response

Built-in Libraries and Helpers

LavaLust ships with a practical set of built-in tools that cover the most common web development tasks so you do not have to write them from scratch.

Built-in Tool

Purpose

Database (Query Builder)

Fluent interface for building and executing SQL queries safely

Request

Read and validate incoming HTTP data (GET, POST, JSON, headers, cookies)

Response

Build and send HTTP responses (JSON, HTML, redirects, file downloads)

Session

Server-side session management with flash data support

Security

CSRF protection, XSS filtering, and input sanitisation

Form Validation

Declarative rules for validating and sanitising form input

URL Helper

Generate and manipulate URLs and redirect paths

Clean, SEO-Friendly URLs

LavaLust uses a segment-based URL structure rather than traditional query strings. The result is URLs that are readable, bookmarkable, and indexed well by search engines.

Query string approach (not used by LavaLust):

example.com/index.php?class=news&method=article&id=345

Segment-based approach (LavaLust default):

example.com/news/article/345

Each segment maps directly to a controller, method, and parameter:

Segment

Maps to

Example

news

Controller

app/controllers/News.php

article

Method

public function article()

345

Parameter

Passed as $id to the method

Note

By default, public/index.php is included in the URL. It can be removed entirely by adding a simple .htaccess rewrite rule — see the Installation Guide guide for the recommended configuration.