LavaLust is a lightweight Web Framework - (using MVC pattern) - for people who are developing web sites using PHP. It helps you write code easily using Object-O
LavaLust is a lightweight Web Framework - (using MVC pattern) - for people who are developing web sites using PHP. It helps you write code easily using Object-O
A lightweight, fast PHP framework built for developers who want clean MVC architecture without unnecessary complexity or performance overhead.
LavaLust is an open-source PHP framework that follows the MVC (Model–View–Controller) architectural pattern. It is designed for developers who need a structured, maintainable, and scalable foundation — without the bloat of heavier modern frameworks.
Whether you are building a simple web application, a REST API, or a teaching project, LavaLust provides the right tools with minimal friction.
| Feature | Description |
|---|---|
| MVC Architecture | Clean separation of Models, Views, and Controllers for organized, maintainable code |
| Built-in Routing | Flexible URL routing that maps requests to controllers with minimal configuration |
| Libraries & Helpers | Reusable components for sessions, forms, validation, and database access |
| Modular Design | Scalable structure that supports clean organization as your application grows |
| REST API Support | First-class support for building RESTful APIs using LavaLust conventions |
| ORM-like Models | Simplified, readable database interaction without a heavy abstraction layer |
.htaccess or Nginx config)Clone the repository:
git clone https://github.com/ronmarasigan/lavalust.git
cd lavalust
Or download a release directly:
wget https://github.com/ronmarasigan/lavalust/archive/refs/heads/main.zip
unzip main.zip
Configure your web server to point to the project root and ensure mod_rewrite (Apache) or equivalent is enabled.
File: app/config/routes.php
$router->get('/', 'Welcome::index');
$router->get('/about', 'Welcome::about');
$router->post('/users/store', 'Users::store');
File: app/controllers/Welcome.php
call->view('welcome', $data);
}
public function about()
{
$this->call->view('about');
}
}
File: app/views/welcome.php
Welcome to LavaLust Framework
Lightweight. Fast. MVC.
File: app/models/User_model.php
db->table($this->table)->get()->getResult();
}
public function findById(int $id)
{
return $this->db->table($this->table)
->where('id', $id)
->get()
}
}
lavalust/
├── app/
│ ├── config/ # Application configuration (database, routes, etc.)
│ ├── controllers/ # Controller classes
│ ├── models/ # Model classes
│ ├── views/ # View templates
│ └── libraries/ # Custom libraries and helpers
├── scheme/ # Core framework files (do not modify)
├── public/ # Publicly accessible entry point
│ └── index.php
└── runtime/ # Cache, logs, and uploads (must be writable)
File: app/config/database.php
$database['main'] = array(
'driver' => getenv('DB_DRIVER') ?: '',
'hostname' => getenv('DB_HOST') ?: '',
'port' => getenv('DB_PORT') ?: '',
'username' => getenv('DB_USER') ?: '',
'password' => getenv('DB_PASSWORD') ?: '',
'database' => getenv('DB_NAME') ?: '',
'charset' => getenv('DB_CHARSET') ?: '',
'dbprefix' => getenv('DB_PREFIX') ?: '',
// Optional for SQLite
'path' => ''
);
File: app/config/config.php
$config['base_url'] = 'http://localhost:3000/';
LavaLust supports REST API development out of the box. Controllers can return JSON responses for API endpoints.
call->library('api');
public function users()
{
$this->api->require_method('GET');
$auth = $this->api->require_jwt();
$this->call->model('User_model');
$users = $this->User_model->getAll();
$this->api->respond(['data' => $users]);
}
}
Route definition:
$router->get('/api/users', 'Api::users');
LavaLust is built on a single principle: minimal core, maximum control.
Modern frameworks often add layers of abstraction that benefit large enterprise teams but get in the way of developers who want to understand exactly what their code is doing. LavaLust provides structure and utilities without hiding the underlying logic — making it an excellent choice for:
Full documentation is available at https://lavalust.netlify.app
Topics covered include:
Contributions are welcome. To contribute:
git checkout -b feature/your-feature-namegit commit -m "Add your feature description"git push origin feature/your-feature-namemainPlease ensure your code follows the existing style conventions and includes relevant documentation or comments where appropriate.
LavaLust Framework is open-source software licensed under the MIT License.
No open issues yet, or sync has not completed.