Skip to content
프로젝트

소개

LavaLust는 PHP로 웹 사이트를 개발하는 사람들을 위한 경량 웹 프레임워크입니다(MVC 패턴 사용). 객체 지향 방식으로 코드를 쉽게 작성할 수 있도록 돕고, 자주 필요한 작업을 위한 라이브러리 모음과 코딩 시간을 줄여 주는 헬퍼 함수도 제공합니다.

웹 및 앱 개발

이 수치를 측정하는 방법

What you can do

  • 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

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-3
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

LavaLust Framework

A lightweight, fast PHP framework built for developers who want clean MVC architecture without unnecessary complexity or performance overhead.

License: MIT PHP Version GitHub Stars


Overview

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.


Features

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

Requirements

  • PHP 8.2 or higher
  • A web server with URL rewriting support (Apache .htaccess or Nginx config)
  • Composer (optional, for dependency management)

Installation

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.


Quick Start

1. Define a Route

File: app/config/routes.php

$router->get('/', 'Welcome::index');
$router->get('/about', 'Welcome::about');
$router->post('/users/store', 'Users::store');

2. Create a Controller

File: app/controllers/Welcome.php

<?php

class Welcome extends Controller
{
    public function index()
    {
        $data['title'] = 'Home';
        $this->call->view('welcome', $data);
    }

    public function about()
    {
        $this->call->view('about');
    }
}

3. Create a View

File: app/views/welcome.php

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><?= $title ?></title>
</head>
<body>
    <h1>Welcome to LavaLust Framework</h1>
    <p>Lightweight. Fast. MVC.</p>
</body>
</html>

4. Create a Model

File: app/models/User_model.php

<?php

class User_model extends Model
{
    protected $table = 'users';

    public function getAll()
    {
        return $this->db->table($this->table)->get()->getResult();
    }

    public function findById(int $id)
    {
        return $this->db->table($this->table)
                        ->where('id', $id)
                        ->get()
    }
}

Project Structure

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)

Configuration

Database

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'      => ''
);

Base URL

File: app/config/config.php

$config['base_url'] = 'http://localhost:3000/';

Building a REST API

LavaLust supports REST API development out of the box. Controllers can return JSON responses for API endpoints.

<?php

class Api extends Controller
{
    $this->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');

Philosophy

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:

  • Rapid prototyping — Get an application running in minutes
  • Learning MVC — Understand how each architectural layer works
  • Lightweight production apps — Deploy without dragging in unused dependencies
  • Teaching PHP development — Clear conventions, readable source code

Documentation

Full documentation is available at https://lavalust.netlify.app

Topics covered include:

  • Installation and server configuration
  • Routing: static, dynamic, and grouped routes
  • Controllers and request handling
  • Models and query builder
  • Views, layouts, and partials
  • Built-in libraries (sessions, form validation, file upload)
  • Helper functions
  • REST API development
  • Security best practices

Contributing

Contributions are welcome. To contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature-name
  3. Commit your changes: git commit -m "Add your feature description"
  4. Push to your branch: git push origin feature/your-feature-name
  5. Open a pull request against main

Please ensure your code follows the existing style conventions and includes relevant documentation or comments where appropriate.


Roadmap

  • CLI tool for generating controllers, models, and migrations
  • Middleware support
  • Improved query builder with relationship support
  • Enhanced error handling and debugging tools

License

LavaLust Framework is open-source software licensed under the MIT License.


Links

관련 프로젝트 살펴보기

불러오는 중…